Symfony2 Constraint Class not found

2019-08-15 02:13发布

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条回答
老娘就宠你
2楼-- · 2019-08-15 02:45

Seems like you have Windows on your local machine and Windows is case insensitive. Make sure you use the NotNull constraint — not notNull.

查看更多
登录 后发表回答