问题
Everything is ok in my dev environment on my local machine. However, on my new staging server, I get an error on my registration page only (as far as I can see):
PHP Fatal error: Class 'Symfony\Component\Validator\Constraints\notNull' not found in /var/www/sf-ysu/shared/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/AbstractLoader.php on line 63
I use capifony for deployment, which means my vendor directory is symlinked to another location. This might have something to do with it, but I'm not sure.
Does anyone have clue?
回答1:
Seems like you have Windows on your local machine and Windows is case insensitive. Make sure you use the NotNull
constraint — not notNull
.
来源:https://stackoverflow.com/questions/12249406/symfony2-constraint-class-not-found