问题
After installation of friendsofsymfony/user-bundle I getting this error
FatalThrowableError in Configuration.php line 124:
Type error: Return value of ProxyManager\Configuration::setGeneratorStrategy() must be an instance of ProxyManager\void, none returned
Using Symfony3.2 and PHP 7.1
Maybe have ideas why?
EDIT
I used This tut
https://symfony.com/doc/master/bundles/FOSUserBundle/index.html
And choose "Doctrine ORM User class" for user entity
回答1:
This is because you are using the incorrect php version.
This might happen either because you updated your php version recently or your OS updated it.
Like @Łukasz D. Tulikowski mentioned void
is a php7.1 keywork.
If you check in your cli php -v
you will get probably the correct php version php7.1
Most likely if you add in your code phpinfo();
you will see that the php version is 7.0. This means that the php7.0 mod is still enabled and you need to deactivate that with sudo a2dismod php7.0
(and eventually enable 7.1 - sudo a2enmod php7.1
- but this is probably not the case.)
回答2:
This mean maybe you are using php version 7.0, I had the same problem, I fix it removing php previous versions and then reinstall php 7.2 following thishttps://ayesh.me/Ubuntu-PHP-7.2
来源:https://stackoverflow.com/questions/43304889/fos-user-bundle-proxymanager-configuration-error