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

ServiceNotFoundException You have requested a non-existent service "twig.loader.filesystem". #188

Open
volarname opened this issue Mar 21, 2018 · 5 comments

Comments

@volarname
Copy link

volarname commented Mar 21, 2018

    "php": ">=7.2.0",
    "liip/theme-bundle": "1.5.2",
    "symfony/symfony": "3.4.6",
    "twig/extensions": "1.5.1",
    "twig/twig": "2.4.7",
    "symfony/twig-bundle": "4.0.6",
@steevanb
Copy link

steevanb commented Sep 10, 2018

Hi,

Same bug here: Symfony 4 marks services as private by default, and Symfony 3.4 allow private services to be accessed with Container::get() but not Symfony 4.

So you can't get twig.loader.filesystem service now.

@xabbuh
Copy link
Contributor

xabbuh commented Sep 10, 2018

Can you show the stack trace for this exception?

@emulienfou
Copy link
Contributor

emulienfou commented Sep 28, 2018

Hello there, same issue here with SF4.1.
It seems the service twig.loader.filesystem existed between Symfony 2.0 to 2.6 and has been renamed since 2.7 to twig.loader.native_filesystem.

To me I don't see an issue to use the service name twig.loader.native_filesystem because in this package the requirement are:

"symfony/framework-bundle": "^2.7|^3.0|^4.0",

Edited

Thanks to @xabbuh the fix should be replacing method getDefinition() by findDefinition() to fix this issue.

@lsmith77
Copy link
Contributor

lsmith77 commented Oct 5, 2018

so this issue is now fixed?

@emulienfou
Copy link
Contributor

Issue related to #194 too

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

5 participants