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/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/Neos.ContentRepository.Core/Classes/SharedModel/Node/NodeAggregateId.php b/Neos.ContentRepository.Core/Classes/SharedModel/Node/NodeAggregateId.php index 8d40704db35..78b5a0c182c 100644 --- a/Neos.ContentRepository.Core/Classes/SharedModel/Node/NodeAggregateId.php +++ b/Neos.ContentRepository.Core/Classes/SharedModel/Node/NodeAggregateId.php @@ -26,18 +26,11 @@ /** * 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)) { - 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 create(): self @@ -47,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; @@ -59,4 +64,9 @@ public function jsonSerialize(): string { return $this->value; } + + private static function hasValidFormat(string $value): bool + { + return preg_match(self::PATTERN, $value) === 1; + } } 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`: diff --git a/composer.json b/composer.json index f6d8da6e73e..ace0517d4ad 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" ], @@ -245,6 +238,9 @@ "manage-resources": true } }, + "provide": { + "neos/contentrepositoryregistry-storageclient": "self.version" + }, "autoload-dev": { "psr-4": { "Neos\\ContentGraph\\PostgreSQLAdapter\\Tests\\": [