Skip to content

Commit e1dd251

Browse files
author
Bernhard Schmitt
committed
Revert "Merge branch 'master' into 2.0"
This reverts commit 1529b88, reversing changes made to c5da4fd.
1 parent 1529b88 commit e1dd251

227 files changed

Lines changed: 2681 additions & 8679 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ indent_size = 2
1414
[{package.json,.babelrc,.eslintrc,.stylelintrc}]
1515
indent_size = 2
1616

17-
[*.{css,js,ts,neon}]
17+
[*.{css,js,ts}]
1818
indent_style = tab
1919

2020
[Makefile]
@@ -24,4 +24,4 @@ indent_style = tab
2424
indent_style = tab
2525

2626
[*.md]
27-
trim_trailing_whitespace = false
27+
trim_trailing_whitespace = false

.github/workflows/qa.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: CI
22

3-
on: [push, pull_request]
3+
on: [push]
44

55
jobs:
66
coding-standard:
@@ -51,11 +51,16 @@ jobs:
5151
run: |
5252
composer install
5353
54-
- name: Run phpstan
54+
- name: Run phpstan on Tests/
5555
run: |
5656
bin/phpstan analyse \
57+
--autoload-file Build/BuildEssentials/PhpUnit/UnitTestBootstrap.php \
5758
--level 8 \
58-
Tests/Unit Classes
59+
Tests/Unit
60+
61+
- name: Run phpstan on Classes/
62+
run: |
63+
bin/phpstan analyse --level 8 Classes
5964
6065
unit-tests:
6166
runs-on: ubuntu-20.04

Classes/Command/ComponentCommandController.php

100644100755
Lines changed: 14 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,24 @@
88
use Neos\Flow\Annotations as Flow;
99
use Neos\Flow\Cli\CommandController;
1010
use PackageFactory\AtomicFusion\PresentationObjects\Domain\Component\ComponentGenerator;
11-
use PackageFactory\AtomicFusion\PresentationObjects\Domain\Component\ComponentName;
12-
use PackageFactory\AtomicFusion\PresentationObjects\Domain\Enum\EnumGenerator;
13-
use PackageFactory\AtomicFusion\PresentationObjects\Domain\PackageKey;
14-
use PackageFactory\AtomicFusion\PresentationObjects\Domain\PackageResolver;
15-
use PackageFactory\AtomicFusion\PresentationObjects\Infrastructure\DefensiveConfirmationFileWriter;
11+
use PackageFactory\AtomicFusion\PresentationObjects\Domain\Value\ValueGenerator;
1612

1713
/**
18-
* The command controller for kick-starting PresentationObject components
14+
* The command controller for kickstarting PresentationObject components
1915
*/
2016
class ComponentCommandController extends CommandController
2117
{
2218
/**
2319
* @Flow\Inject
24-
* @var PackageResolver
20+
* @var ComponentGenerator
2521
*/
26-
protected $packageResolver;
22+
protected $componentGenerator;
2723

2824
/**
29-
* @Flow\InjectConfiguration(path="componentGeneration.colocate")
30-
* @var bool
25+
* @Flow\Inject
26+
* @var ValueGenerator
3127
*/
32-
protected $colocate;
28+
protected $valueGenerator;
3329

3430
/**
3531
* Create a new PresentationObject component and factory
@@ -45,35 +41,20 @@ class ComponentCommandController extends CommandController
4541
* The following values are allowed for types:
4642
*
4743
* * string, int, float, bool
48-
* * slot
4944
* * Value class names created with <u>component:kickstartvalue</u> in the same
5045
* component namespace
5146
* * Component class names created with <u>component:kickstart</u> in the same
5247
* package
5348
* * ImageSource
5449
* * Uri
55-
* * array<...> with any of the above as an argument
5650
*
5751
* @param string $name The name of the new component
58-
* @param bool $listable If set, an additional list type will be generated
59-
* @param bool $yes If set, no confirmation is going to be required for overwriting files
52+
* @param null|string $packageKey Package key of an optional target package, if not set the configured default package or the first available site package will be used
6053
* @return void
61-
* @throws \Neos\Utility\Exception\FilesException
6254
*/
63-
public function kickStartCommand(string $name, bool $listable = false, bool $yes = false): void
55+
public function kickStartCommand(string $name, ?string $packageKey = null): void
6456
{
65-
$componentGenerator = new ComponentGenerator(
66-
new DefensiveConfirmationFileWriter($this->output, $yes)
67-
);
68-
$package = $this->packageResolver->resolvePackage();
69-
70-
$componentGenerator->generateComponent(
71-
ComponentName::fromInput($name, PackageKey::fromPackage($package)),
72-
$this->request->getExceedingArguments(),
73-
$package->getPackagePath(),
74-
$this->colocate,
75-
$listable
76-
);
57+
$this->componentGenerator->generateComponent($name, $this->request->getExceedingArguments(), $packageKey);
7758
}
7859

7960
/**
@@ -90,25 +71,12 @@ public function kickStartCommand(string $name, bool $listable = false, bool $yes
9071
* @param string $componentName The name of the component the new pseudo-enum belongs to
9172
* @param string $name The name of the new pseudo-enum
9273
* @param string $type The type of the new pseudo-enum (must be one of: "string", "int")
93-
* @param array|string[] $values A comma-separated colon list of names:values for the new pseudo-enum, e.g. a,b,c , a:1,b:2,c:3 or a:1.2,b:2.4,c:3.6
94-
* @param bool $yes If set, no confirmation is going to be required for overwriting files
74+
* @param array|string[] $values A comma-separated list of values for the new pseudo-enum
75+
* @param null|string $packageKey Package key of an optional target package, if not set the configured default package or the first available site package will be used
9576
* @return void
9677
*/
97-
public function kickStartEnumCommand(string $componentName, string $name, string $type, array $values = [], bool $yes = false): void
78+
public function kickStartValueCommand(string $componentName, string $name, string $type, array $values = [], ?string $packageKey = null): void
9879
{
99-
$enumGenerator = new EnumGenerator(
100-
new \DateTimeImmutable(),
101-
new DefensiveConfirmationFileWriter($this->output, $yes)
102-
);
103-
$package = $this->packageResolver->resolvePackage();
104-
105-
$enumGenerator->generateEnum(
106-
ComponentName::fromInput($componentName, PackageKey::fromPackage($package)),
107-
$name,
108-
$type,
109-
$values,
110-
$package->getPackagePath(),
111-
$this->colocate
112-
);
80+
$this->valueGenerator->generateValue($componentName, $name, $type, $values, $packageKey);
11381
}
11482
}

Classes/Domain/AbstractImmutableArrayObject.php

Lines changed: 0 additions & 52 deletions
This file was deleted.

Classes/Domain/Component/AbstractComponentArray.php

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)