dotkernel / dot-twigrenderer

DotKernel component providing twig extensions and customizations
https://docs.dotkernel.org/dot-twigrenderer/
MIT License
7 stars 1 forks source link

crash when zend-expressive-twigrender is 2.5.0 #6

Closed arhimede closed 4 years ago

arhimede commented 4 years ago

zend-expressive-twigrenderer 2.4.0 everything if fine zend-expressive-twigrenderer 2.5.0 is crashing at :

Got error 'PHP message: PHP Fatal error: Uncaught Error: Class 'Twig_Extension' not found in /var/www/vhosts/v3.dotkernel.net/httpdocs/vendor/dotkernel/dot-twigrenderer/src/Extension/AuthenticationExtension.php:19\nStack trace:\n#0 /var/www/vhosts/v3.dotkernel.net/httpdocs/vendor/composer/ClassLoader.php(444): include()\n#1 /var/www/vhosts/v3.dotkernel.net/httpdocs/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/var/www/vhosts...')\n#2 [internal function]: Composer\Autoload\ClassLoader->loadClass('Dot\\Twig\\Extens...')\n#3 /var/www/vhosts/v3.dotkernel.net/httpdocs/vendor/dotkernel/dot-twigrenderer/src/Factory/AuthenticationExtensionFactory.php(28): spl_autoload_call('Dot\\Twig\\Extens...')\n#4 /var/www/vhosts/v3.dotkernel.net/httpdocs/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(764): Dot\Twig\Factory\AuthenticationExtensionFactory->__invoke(Object(Zend\ServiceManager\ServiceManager), 'Dot\\Twig\\Extens...', NULL)\n#5 /var/www/vhosts/v3.dotkernel.net/httpdocs/vendor/zendfr...'

alexmerlin commented 4 years ago

Issue is now fixed.

Cause:

dot-twigrenderer was using Twig's backward compatibility class aliases (Twig_*) which were removed in the latest version of Twig (v3.0.0)

Solution:

Replaced calls to PSR-0 class names with their PSR-4 equivalents. 309ad75