diff --git a/Neos.Flow/Classes/Annotations/IgnoreValidation.php b/Neos.Flow/Classes/Annotations/IgnoreValidation.php index 52d833a040..a3d3d8eeb9 100644 --- a/Neos.Flow/Classes/Annotations/IgnoreValidation.php +++ b/Neos.Flow/Classes/Annotations/IgnoreValidation.php @@ -28,7 +28,7 @@ final class IgnoreValidation { /** * Name of the argument to skip validation for. (Can be given as anonymous argument.) - * @var string + * @var string|null */ public $argumentName; @@ -38,9 +38,9 @@ final class IgnoreValidation */ public $evaluate = false; - public function __construct(string $argumentName, bool $evaluate = false) + public function __construct(string $argumentName = null, bool $evaluate = false) { - $this->argumentName = ltrim($argumentName, '$'); + $this->argumentName = $argumentName ? ltrim($argumentName, '$') : null; $this->evaluate = $evaluate; } } diff --git a/Neos.Flow/Tests/Functional/Mvc/Fixtures/Controller/NestedObject.php b/Neos.Flow/Tests/Functional/Mvc/Fixtures/Controller/NestedObject.php new file mode 100644 index 0000000000..c7d9471550 --- /dev/null +++ b/Neos.Flow/Tests/Functional/Mvc/Fixtures/Controller/NestedObject.php @@ -0,0 +1,26 @@ +collection = new ArrayCollection(); + $this->nested = new NestedObject(); } /**