Skip to content
This repository has been archived by the owner on Jul 4, 2018. It is now read-only.

Fatal error: Class 'validator.email' not found #932

Closed
BlackScorp opened this issue Mar 28, 2014 · 4 comments
Closed

Fatal error: Class 'validator.email' not found #932

BlackScorp opened this issue Mar 28, 2014 · 4 comments

Comments

@BlackScorp
Copy link

Hello guys,

following dependencies https://github.com/Opentribes/Core/blob/develop/composer.json#L27

following usage https://github.com/Opentribes/Core/blob/develop/silex/Validator/Registration.php#L38

following error message: Fatal error: Class 'validator.email' not found in vendor\silex\silex\src\Silex\ConstraintValidatorFactory.php on line 85

this worked view days ago https://travis-ci.org/Opentribes/Core/builds

after composer update today i have this error, changing to earlier versions does not fix the error.

@davedevelopment
Copy link
Contributor

Caused by #9140, looks like someone correctly pointed out in the comments that they were effectively coupling the constraint to the validator factory and specifically a service called validator.email, but it was disregarded.

@fabpot
Copy link
Member

fabpot commented Mar 29, 2014

ping @egulias

@egulias
Copy link

egulias commented Mar 29, 2014

I'm on this

@BlackScorp
Copy link
Author

oh i thought i was not a real issue since i didnt used stable releases..

fabpot added a commit to symfony/symfony that referenced this issue Mar 30, 2014
…validator.email' not found" (egulias)

This PR was merged into the 2.5-dev branch.

Discussion
----------

[Validator][Email] - When standalone "Fatal error: Class 'validator.email' not found"

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | silexphp/Silex#932
| License       | MIT
| Doc PR        | no

When using the validator as an standalone component a bug was introduced by overriding the `validatedBy()` method in the `Email` constraint.
This PR removes the override and implements a way for the DI to get the right validator.

Another way would be modifying the definition of validator to change the alias instead of having the FQCN in the xml

Commits
-------

e79b3a9 Change in validator.email service alias to match the validator FQCN
@fabpot fabpot closed this as completed Mar 30, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

4 participants