Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

symfony flex support - Call to a member function has() on null #199

Open
Asia321 opened this issue Feb 9, 2018 · 3 comments
Open

symfony flex support - Call to a member function has() on null #199

Asia321 opened this issue Feb 9, 2018 · 3 comments

Comments

@Asia321
Copy link

Asia321 commented Feb 9, 2018

My project is based on symfony 3.4 and flex
after instalation of JMSJobQueueBundle all the controllers extending Symfony\Bundle\FrameworkBundle\Controller\Controller stopped to work - there is no container injected into them, so we get errors:
'Call to a member function has() on null' or 'Call to a member function get() on null', dependent on what kind of container operation we want to do.
Easy to reproduce:
composer.json

"require": {
        "php": "^7.0.8",
        "doctrine/doctrine-bundle": "^1.8",
        "doctrine/orm": "^2.6",
        "jms/job-queue-bundle": "^1.4",
        "symfony/console": "^3.4",
        "symfony/flex": "^1.0",
        "symfony/form": "^3.4",
        "symfony/framework-bundle": "^3.4",
        "symfony/lts": "^3",
        "symfony/translation": "^3.4",
        "symfony/twig-bundle": "^3.4",
        "symfony/validator": "^3.4",
        "symfony/yaml": "^3.4"
 }

and create simple controller using container eg. renders twig template

@andreaswarnaar
Copy link

Did you find any solution?

@andreaswarnaar
Copy link

My solution for now is:
Remove the new JMS\DiExtraBundle\JMSDiExtraBundle() from the $bundles in AppKernel.php

@Aerendir
Copy link

Yes, the problem is that bundle: there are many issues opened about this issue, both on JSDiEXtra bundle page and on the Symfony's one. The first is about seven months old, but nothing were done and problem still exists...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants