JMS Call to a member function has() on null

Viewed 829

Bundle version 1.3.1 | Symfony version 3.3 | PHP version 7.1.9

Expected behavior

After installing the different bundles (JMSTranslationBundle, JMSDIExtraBundle, checking if i had sensio/framework-extra-bundle), and after i made the right configuration in config.yml and routing_dev.yml, the right behavior should be that the /_trans lead me to a translation interface (working), and change nothing else.

Actual behavior

Getting on a route different from /_trans return Call to a member function has() on null with error 500. Therefore, the whole site is dead, except the translation UI.

Steps to reproduce

Install JMSTranslationBundle, then when asked, install JMSDIExtraBundle to get the web ui After that, test the /_trans. This should work. But when you get to your others routes, they return 500 error

1 Answers

I have exactly the same issue (Sf 3.3.9/PHP 7.1.9). I have to remove the line related to "JMSDiExtraBundle" in AppKernel to make my app works again. This is the only workaround I found, not very efficient.

Very low trace log information, this is what I have:

Stack Trace: enter image description here

Logs:

CRITICAL 19:56:59 php   Call to a member function has() on null
CRITICAL 19:56:59 request   Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: "Call to a member function has() on null" at /Users/stephanfo/PhpstormProjects/openbuy/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php line 233

Exception: enter image description here

Any help would be helpful. Thanks, Stef.

Related