LiipThemeBundle icon indicating copy to clipboard operation
LiipThemeBundle copied to clipboard

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

Open volarname opened this issue 6 years ago • 5 comments

    "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",

volarname avatar Mar 21 '18 20:03 volarname

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.

steevanb avatar Sep 10 '18 12:09 steevanb

Can you show the stack trace for this exception?

xabbuh avatar Sep 10 '18 15:09 xabbuh

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.

emulienfou avatar Sep 28 '18 22:09 emulienfou

so this issue is now fixed?

lsmith77 avatar Oct 05 '18 20:10 lsmith77

Issue related to #194 too

emulienfou avatar Oct 05 '18 20:10 emulienfou