Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[TwigBundle] Maximum function nesting level of '100' reached when adding TwigBundle to AppKernel #8299

Copy link
Copy link
Closed
@dirkaholic

Description

@dirkaholic
Issue body actions

I get the following error when I add TwigBundle to the AppKernel:

PHP Fatal error: Maximum function nesting level of '100' reached, aborting! in /vagrant/www/symfony-rest-edition/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php on line 96

I rebuilt my setup here based on the Symfony2 Rest Edition as my system uses nearly the same components: https://github.com/motain/symfony-rest-edition

I originally developed an API in this system and disabled Twig support when I started developing it. So I set the templating engine to php in the config.yml.

After some time of developing I wanted to add the TwigBundle again to make use of the ExceptionController from the FOSRestBundle: https://github.com/FriendsOfSymfony/FOSRestBundle/blob/master/Resources/doc/4-exception-controller-support.md#step-4-exceptioncontroller-support

So I added the TwigBundle to the AppKernel again. In dev environment everything worked fine but when clearing the cache with prod environment I got the described error (PHP Fatal error: Maximum function nesting level of '100' reached, aborting! in /vagrant/www/symfony-rest-edition/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php on line 96). To reproduce this just start:

./app/api/console --env=prod

with a cleared cache (Note: I put my app directory under a separate subdirectory to fully simulate my original working environment which I can not make public).

After nearly 2 days debugging now I noticed that changing the config entry of framework.templating back to twig solved the problem. But anyway I think it is an issue to look at.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.