From b40401c651bea5f144d5d64f8f587f29ceddb2a9 Mon Sep 17 00:00:00 2001 From: Bastian Waidelich Date: Sat, 25 May 2024 11:19:01 +0200 Subject: [PATCH 1/5] BUGFIX: Fix composer manifest - Remove empty `provides` (follow-up to #4700) - Remove functional test traces (follow-up to #5036) --- .composer.json | 6 ------ composer.json | 7 ------- 2 files changed, 13 deletions(-) diff --git a/.composer.json b/.composer.json index 6f7f5947917..521bc7e5acb 100644 --- a/.composer.json +++ b/.composer.json @@ -10,8 +10,6 @@ }, "suggest": { }, - "provide": { - }, "scripts": { "lint:phpcs": "../../bin/phpcs --colors", "lint:phpcs:fix": "../../bin/phpcbf --colors", @@ -32,9 +30,6 @@ "FLOW_CONTEXT=Testing/Behat ../../bin/paratest --debug -v --functional --group parallel --processes 2 --colors --stop-on-failure -c ../../Build/BuildEssentials/PhpUnit/FunctionalTests.xml Neos.ContentRepository.BehavioralTests/Tests/Functional/Feature/WorkspacePublication/WorkspaceWritingDuringPublication.php", "FLOW_CONTEXT=Testing/Behat ../../bin/paratest --debug -v --functional --group parallel --processes 2 --colors --stop-on-failure -c ../../Build/BuildEssentials/PhpUnit/FunctionalTests.xml Neos.ContentRepository.BehavioralTests/Tests/Functional/Feature/WorkspacePublication/WorkspaceWritingDuringPublication.php" ], - "test:functional": [ - "../../bin/phpunit --colors --stop-on-failure -c ../../Build/BuildEssentials/PhpUnit/FunctionalTests.xml Neos.ContentRepository.Core/Tests/Functional" - ], "test:behat-cli": "../../bin/behat -f progress --strict --no-interaction", "test:behavioral": [ "@test:behat-cli -c Neos.ContentRepository.BehavioralTests/Tests/Behavior/behat.yml.dist", @@ -56,7 +51,6 @@ ], "test": [ "@test:unit", - "@test:functional", "@test:behavioral", "@test:parallel" ], diff --git a/composer.json b/composer.json index f6d8da6e73e..fe93d929eae 100644 --- a/composer.json +++ b/composer.json @@ -92,9 +92,6 @@ "neos/site-kickstarter": "Helps with creating new site packages for Neos.", "neos/redirecthandler-neosadapter": "Adds automatic redirects for moved/renamed pages" }, - "provide": { - "neos/contentrepositoryregistry-storageclient": "self.version" - }, "scripts": { "lint:phpcs": "../../bin/phpcs --colors", "lint:phpcs:fix": "../../bin/phpcbf --colors", @@ -115,9 +112,6 @@ "FLOW_CONTEXT=Testing/Behat ../../bin/paratest --debug -v --functional --group parallel --processes 2 --colors --stop-on-failure -c ../../Build/BuildEssentials/PhpUnit/FunctionalTests.xml Neos.ContentRepository.BehavioralTests/Tests/Functional/Feature/WorkspacePublication/WorkspaceWritingDuringPublication.php", "FLOW_CONTEXT=Testing/Behat ../../bin/paratest --debug -v --functional --group parallel --processes 2 --colors --stop-on-failure -c ../../Build/BuildEssentials/PhpUnit/FunctionalTests.xml Neos.ContentRepository.BehavioralTests/Tests/Functional/Feature/WorkspacePublication/WorkspaceWritingDuringPublication.php" ], - "test:functional": [ - "../../bin/phpunit --colors --stop-on-failure -c ../../Build/BuildEssentials/PhpUnit/FunctionalTests.xml Neos.ContentRepository.Core/Tests/Functional" - ], "test:behat-cli": "../../bin/behat -f progress --strict --no-interaction", "test:behavioral": [ "@test:behat-cli -c Neos.ContentRepository.BehavioralTests/Tests/Behavior/behat.yml.dist", @@ -139,7 +133,6 @@ ], "test": [ "@test:unit", - "@test:functional", "@test:behavioral", "@test:parallel" ], From f94953306e88cb13c2fe9b6d656f3b4e8b1232f5 Mon Sep 17 00:00:00 2001 From: Bastian Waidelich Date: Sat, 25 May 2024 14:21:27 +0200 Subject: [PATCH 2/5] Make neos/contentgraph-doctrinedbaladapter provide neos/contentrepositoryregistry-storageclient --- Neos.ContentGraph.DoctrineDbalAdapter/composer.json | 3 +++ composer.json | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/composer.json b/Neos.ContentGraph.DoctrineDbalAdapter/composer.json index 6ef1a4dfca2..cd728f3777d 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/composer.json +++ b/Neos.ContentGraph.DoctrineDbalAdapter/composer.json @@ -8,6 +8,9 @@ "docs": "https://docs.neos.io/" }, "license": "GPL-3.0+", + "provide": { + "neos/contentrepositoryregistry-storageclient": "self.version" + }, "require": { "neos/contentrepository-core": "self.version", "doctrine/dbal": "^2.13", diff --git a/composer.json b/composer.json index fe93d929eae..ace0517d4ad 100644 --- a/composer.json +++ b/composer.json @@ -238,6 +238,9 @@ "manage-resources": true } }, + "provide": { + "neos/contentrepositoryregistry-storageclient": "self.version" + }, "autoload-dev": { "psr-4": { "Neos\\ContentGraph\\PostgreSQLAdapter\\Tests\\": [ From 0e314087448ca98c88f2f7eb0a7963a42efd9188 Mon Sep 17 00:00:00 2001 From: Bastian Waidelich Date: Sat, 25 May 2024 19:45:33 +0200 Subject: [PATCH 3/5] FEATURE: Validity test for `NodeAggregateId` strings Related: #3771 --- .../Classes/SharedModel/Node/NodeAggregateId.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Neos.ContentRepository.Core/Classes/SharedModel/Node/NodeAggregateId.php b/Neos.ContentRepository.Core/Classes/SharedModel/Node/NodeAggregateId.php index 8d40704db35..93226c05d7f 100644 --- a/Neos.ContentRepository.Core/Classes/SharedModel/Node/NodeAggregateId.php +++ b/Neos.ContentRepository.Core/Classes/SharedModel/Node/NodeAggregateId.php @@ -26,12 +26,12 @@ /** * A preg pattern to match against node aggregate identifiers */ - public const PATTERN = '/^([a-z0-9\-]{1,64})$/'; + private const PATTERN = '/^([a-z0-9\-]{1,64})$/'; private function __construct( public string $value ) { - if (!preg_match(self::PATTERN, $value)) { + if (!self::hasValidFormat($value)) { throw new \InvalidArgumentException( 'Invalid node aggregate identifier "' . $value . '" (a node aggregate identifier must only contain lowercase characters, numbers and the "-" sign).', @@ -40,6 +40,11 @@ private function __construct( } } + public static function hasValidFormat(string $value): bool + { + return preg_match(self::PATTERN, $value) === 1; + } + public static function create(): self { return new self(UuidFactory::create()); From 88c46ecd4ef05cc20ab8569e34cf43323be1a015 Mon Sep 17 00:00:00 2001 From: Jenkins Date: Sun, 26 May 2024 07:49:50 +0000 Subject: [PATCH 4/5] TASK: Update references [skip ci] --- Neos.Neos/Documentation/References/CommandReference.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Form.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Media.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/Neos.rst | 2 +- Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Neos.Neos/Documentation/References/CommandReference.rst b/Neos.Neos/Documentation/References/CommandReference.rst index 6f08db2d26c..a2c7f2cbd62 100644 --- a/Neos.Neos/Documentation/References/CommandReference.rst +++ b/Neos.Neos/Documentation/References/CommandReference.rst @@ -19,7 +19,7 @@ commands that may be available, use:: ./flow help -The following reference was automatically generated from code on 2024-05-25 +The following reference was automatically generated from code on 2024-05-26 .. _`Neos Command Reference: NEOS.FLOW`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst b/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst index 3e0b117b93c..c673820ac9b 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/FluidAdaptor.rst @@ -3,7 +3,7 @@ FluidAdaptor ViewHelper Reference ################################# -This reference was automatically generated from code on 2024-05-25 +This reference was automatically generated from code on 2024-05-26 .. _`FluidAdaptor ViewHelper Reference: f:debug`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Form.rst b/Neos.Neos/Documentation/References/ViewHelpers/Form.rst index 264726cbb32..25410a4d0b8 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Form.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Form.rst @@ -3,7 +3,7 @@ Form ViewHelper Reference ######################### -This reference was automatically generated from code on 2024-05-25 +This reference was automatically generated from code on 2024-05-26 .. _`Form ViewHelper Reference: neos.form:form`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Media.rst b/Neos.Neos/Documentation/References/ViewHelpers/Media.rst index 98606ff8819..2dd4c541492 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Media.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Media.rst @@ -3,7 +3,7 @@ Media ViewHelper Reference ########################## -This reference was automatically generated from code on 2024-05-25 +This reference was automatically generated from code on 2024-05-26 .. _`Media ViewHelper Reference: neos.media:fileTypeIcon`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst b/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst index 0bfef96b24e..6051530504a 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/Neos.rst @@ -3,7 +3,7 @@ Neos ViewHelper Reference ######################### -This reference was automatically generated from code on 2024-05-25 +This reference was automatically generated from code on 2024-05-26 .. _`Neos ViewHelper Reference: neos:backend.authenticationProviderLabel`: diff --git a/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst b/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst index ccaf1bacc27..cb0c008d6b4 100644 --- a/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst +++ b/Neos.Neos/Documentation/References/ViewHelpers/TYPO3Fluid.rst @@ -3,7 +3,7 @@ TYPO3 Fluid ViewHelper Reference ################################ -This reference was automatically generated from code on 2024-05-25 +This reference was automatically generated from code on 2024-05-26 .. _`TYPO3 Fluid ViewHelper Reference: f:alias`: From 3a6c793a785f5e740022a1d88f86f2479249e846 Mon Sep 17 00:00:00 2001 From: Bastian Waidelich Date: Sun, 26 May 2024 12:54:56 +0200 Subject: [PATCH 5/5] Replace NodeAggregateId::hasValidFormat with NodeAggregateId::tryFromString --- .../SharedModel/Node/NodeAggregateId.php | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/Neos.ContentRepository.Core/Classes/SharedModel/Node/NodeAggregateId.php b/Neos.ContentRepository.Core/Classes/SharedModel/Node/NodeAggregateId.php index 93226c05d7f..78b5a0c182c 100644 --- a/Neos.ContentRepository.Core/Classes/SharedModel/Node/NodeAggregateId.php +++ b/Neos.ContentRepository.Core/Classes/SharedModel/Node/NodeAggregateId.php @@ -31,18 +31,6 @@ private function __construct( public string $value ) { - if (!self::hasValidFormat($value)) { - throw new \InvalidArgumentException( - 'Invalid node aggregate identifier "' . $value - . '" (a node aggregate identifier must only contain lowercase characters, numbers and the "-" sign).', - 1505840197862 - ); - } - } - - public static function hasValidFormat(string $value): bool - { - return preg_match(self::PATTERN, $value) === 1; } public static function create(): self @@ -52,9 +40,21 @@ public static function create(): self public static function fromString(string $value): self { + if (!self::hasValidFormat($value)) { + throw new \InvalidArgumentException( + 'Invalid node aggregate identifier "' . $value + . '" (a node aggregate identifier must only contain lowercase characters, numbers and the "-" sign).', + 1505840197862 + ); + } return new self($value); } + public static function tryFromString(string $value): ?self + { + return self::hasValidFormat($value) ? new self($value) : null; + } + public function equals(self $other): bool { return $this->value === $other->value; @@ -64,4 +64,9 @@ public function jsonSerialize(): string { return $this->value; } + + private static function hasValidFormat(string $value): bool + { + return preg_match(self::PATTERN, $value) === 1; + } }