Skip to content

[Validator] Remove necessity to set constraint_validator alias #16805

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

Closed
webmozart opened this issue Dec 2, 2015 · 2 comments
Closed

[Validator] Remove necessity to set constraint_validator alias #16805

webmozart opened this issue Dec 2, 2015 · 2 comments
Labels
DX DX = Developer eXperience (anything that improves the experience of using Symfony) Good first issue Ideal for your first contribution! (some Symfony experience may be required) Validator

Comments

@webmozart
Copy link
Contributor

Right now, when adding a constraint validator to the DI configuration, you need to do:

services:
    my_validator:
        class: Acme\Constraints\MyValidator
        tags:
            - { name: validator.constraint_validator, alias: Acme\Constraints\MyValidator }

It should not be necessary to pass that alias, but right now it is.

@webmozart webmozart added Validator Good first issue Ideal for your first contribution! (some Symfony experience may be required) DX DX = Developer eXperience (anything that improves the experience of using Symfony) labels Dec 2, 2015
@sstok
Copy link
Contributor

sstok commented Dec 3, 2015

👍

@Mx-Glitter
Copy link
Contributor

I propose #16841 to fix this.

fabpot added a commit that referenced this issue Feb 23, 2016
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #17074).

Discussion
----------

Fix constraint validator alias being required

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #16805
| License       | MIT
| Doc PR        | symfony/symfony-docs#6055

This is my first contribution, so everything might not be in perfect order.

Follow-up of #16841 on the right branch.

Commits
-------

5136c30 Fix constraint validator alias being required
@fabpot fabpot closed this as completed Feb 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DX DX = Developer eXperience (anything that improves the experience of using Symfony) Good first issue Ideal for your first contribution! (some Symfony experience may be required) Validator
Projects
None yet
Development

No branches or pull requests

4 participants