3

I just upgraded a project's Symfony framework from 2.3 to 2.7

But now I ran into an error:

Class Not Found Exception in appDevDebugProjectContainer.php line 4227: 
Attempted to load class "Twig_Extensions_Extension_Text" from the global 
namespace. Did you forget a "use" statement?

I am pretty new to Symfony and a lot of stuff are still quite overwhelming for me. Can somebody please help me out with this?

Thank you

1
  • i know its old, but i run into this again, and i dont want to use the outdated lib. i found a service with the class "Twig_Extensions_Extension_Text" in my "services.yml".. just remove it Commented Mar 16, 2022 at 12:29

1 Answer 1

13

This class doesn't come with the twig/twig package, but with the twig/extensions package (docs).

Make sure you have this package installed by running composer show -i and searching (or by using grep) in the output for this package name.

If you haven't, install the package:

$ composer require twig/extensions
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.