Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🩹 Fix deprecation notice in the constraint #139

Merged
merged 2 commits into from
Jan 16, 2023

Conversation

Nek-
Copy link
Collaborator

@Nek- Nek- commented Jan 15, 2023

As @garak highlighted here: #113 (comment) the work in #119 was not complete.

Since Symfony 6.1 we need to add a new attribute HasNamedArguments which is required for constraints using constructors: https://symfony.com/doc/current/validation/custom_constraint.html#creating-the-constraint-class

Nek- added 2 commits January 15, 2023 17:49
The PhoneNumber has a constructor which will not be supported in the
future by Symfony unless the HasNamedArguments attribute is present (for
attributes) or the NamedArgumentConstructor annotations (for annotations).

The work was already done for annotations it was not ok for file
configuration.
The attribute HasNamedArguments exists only for Symfony 6.1+
@maxhelias maxhelias merged commit 23bd0d6 into odolbeau:master Jan 16, 2023
@Nek- Nek- deleted the feat/phone-number-constraint-has-args branch January 16, 2023 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants