From 99848d82a72417cc70d3d57cbae0887040ca7fbe Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Thu, 11 Apr 2024 16:37:03 +0200 Subject: [PATCH 1/3] Add stub for Compound::getConstraints() --- extension.neon | 2 ++ .../Component/Validator/Constraints/Composite.stub | 9 +++++++++ .../Component/Validator/Constraints/Compound.stub | 14 ++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 stubs/Symfony/Component/Validator/Constraints/Composite.stub create mode 100644 stubs/Symfony/Component/Validator/Constraints/Compound.stub diff --git a/extension.neon b/extension.neon index 09837d28..1eb888ab 100644 --- a/extension.neon +++ b/extension.neon @@ -96,6 +96,8 @@ parameters: - stubs/Symfony/Component/Serializer/Normalizer/NormalizableInterface.stub - stubs/Symfony/Component/Serializer/Normalizer/NormalizerInterface.stub - stubs/Symfony/Component/Validator/Constraint.stub + - stubs/Symfony/Component/Validator/Constraints/Composite.stub + - stubs/Symfony/Component/Validator/Constraints/Compound.stub - stubs/Symfony/Component/Validator/ConstraintViolationInterface.stub - stubs/Symfony/Component/Validator/ConstraintViolationListInterface.stub - stubs/Symfony/Contracts/Cache/CacheInterface.stub diff --git a/stubs/Symfony/Component/Validator/Constraints/Composite.stub b/stubs/Symfony/Component/Validator/Constraints/Composite.stub new file mode 100644 index 00000000..8344ea94 --- /dev/null +++ b/stubs/Symfony/Component/Validator/Constraints/Composite.stub @@ -0,0 +1,9 @@ + $options + * @return array + */ + abstract protected function getConstraints(array $options): array; +} From 3fbf634b2495adaa1dc4b7300293f8abf74128d8 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Wed, 6 Mar 2024 17:17:02 +0100 Subject: [PATCH 2/3] Synchronize stub with symfony --- .../Component/Validator/ConstraintViolationInterface.stub | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stubs/Symfony/Component/Validator/ConstraintViolationInterface.stub b/stubs/Symfony/Component/Validator/ConstraintViolationInterface.stub index e7f2b8a2..fd1c7b9b 100644 --- a/stubs/Symfony/Component/Validator/ConstraintViolationInterface.stub +++ b/stubs/Symfony/Component/Validator/ConstraintViolationInterface.stub @@ -3,7 +3,9 @@ namespace Symfony\Component\Validator; /** - * @method string __toString() Converts the violation into a string for debugging purposes. Not implementing it is deprecated since Symfony 6.1. + * @method Constraint|null getConstraint() Returns the constraint whose validation caused the violation. Not implementing it is deprecated since Symfony 6.3. + * @method mixed getCause() Returns the cause of the violation. Not implementing it is deprecated since Symfony 6.2. + * @method string __toString() Converts the violation into a string for debugging purposes. Not implementing it is deprecated since Symfony 6.1. */ interface ConstraintViolationInterface { From f4b9407fa3203aebafd422ae8f0eb1ef94659a80 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Sat, 13 Apr 2024 10:28:03 +0200 Subject: [PATCH 3/3] Synchronize stub with symfony --- stubs/Symfony/Component/Validator/Constraints/Compound.stub | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/Symfony/Component/Validator/Constraints/Compound.stub b/stubs/Symfony/Component/Validator/Constraints/Compound.stub index 3227009b..6a36c6bf 100644 --- a/stubs/Symfony/Component/Validator/Constraints/Compound.stub +++ b/stubs/Symfony/Component/Validator/Constraints/Compound.stub @@ -7,7 +7,7 @@ use Symfony\Component\Validator\Constraint; abstract class Compound extends Composite { /** - * @param array $options + * @param array $options * @return array */ abstract protected function getConstraints(array $options): array;