Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
Removing the alias stuff - not required after symfony/symfony#17074#6746
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| Make sure to use the 'alias_name' when you have configured your validator as a service. Otherwise your validator class | ||
| will be simply instantiated without your dependencies. | ||
| In earlier versions of Symfony, the tag required an ``alias`` key (usually set | ||
| to the class name). This is still allowed your constraint's ``validateBy`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
this sentence is missing something between "This is still allowed" and "your constraint's [...]". Maybe "and" or a comma or just a rewording :)
Also, it should bevalidateBy() (we suffix all methods mentioned by parenthesis)
wouterj commentedJul 10, 2016
Status: Reviewed |
f0cec18 to31afb0eCompare…ymfony#17074 (weaverryan)This PR was merged into the 2.7 branch.Discussion----------Removing the alias stuff - not required aftersymfony/symfony#17074Thanks tosymfony/symfony#17074 (merged all the way back into 2.3), `alias` is not required anymore. So why mention it?As I understand it, validators work like the new form types: it's ok that `validatedBy returns a class name: the validation system will notice that you have a tagged service matching this class and will use that instead of creating it new.Commits-------31afb0e line break2ec049d Removing the alias stuff - not required aftersymfony/symfony#17074
| will be simply instantiated without your dependencies. | ||
| In earlier versions of Symfony, the tag required an ``alias`` key (usually set | ||
| to the class name). This is still allowed your constraint's ``validateBy`` | ||
| method can return this alias (instead of a class name). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@weaverryan The last sentence reads weird. Was it meant to be this way?
Thanks tosymfony/symfony#17074 (merged all the way back into 2.3),
aliasis not required anymore. So why mention it?As I understand it, validators work like the new form types: it's ok that `validatedBy returns a class name: the validation system will notice that you have a tagged service matching this class and will use that instead of creating it new.