php - Runtime Notice: Declaration of in symfony2 -


I develop on different systems using PHP 5.4 on them and on the other I have PHP version 5.5.9.

If I open my project with 5.4 version then it's all good and there are no error reports. But if I try to open the same project with PHP 5.5.9, then I found the following error and symphony stop:

ContextErrorException: Runtime Notification: Event \ UserBundle \ Manager \ Announcement of EventManager :: getRepository () should be compatible with the event \ UserBundle \ Manager \ AbstractManager :: getRepository ($ entity = NULL) ...

I have now read that php Strict warning can produce this error. But in my PHP.ini error setting, this is:

E_ALL & amp; ~ E_DEPRECATED & amp; ~ E_STRICT

Anyone can help me fix this problem?

The problem is that the method you are overridden is getRepository basis method < Code> getRepository ($ entity = null) . To stop the error (by making it compatible), simply add $ entity = null to declare the method.

As a problem of real errors (showing and not shown) I can not help you It is possible that things have become more strict in the new version. I had recently notices that a new version will not be allowed to declare an abstract in a class and will also be announced in an interface along with it, so this is possible.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -