Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Class Not Found Exception Error

Tags:

symfony

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 Answers

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
like image 77
Wouter J Avatar answered Jul 23 '26 00:07

Wouter J



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!