Closed blackandred closed 4 years ago
I now understood that this may be also fixed in the emanueleminotto/twig-cache-bundle
.
I don't know what solution would you preffer.
The second solution:
Put a method to the ProfilerExtension.php
:
/**
* @return string
*/
public function getName()
{
return parent::class;
}
https://github.com/EmanueleMinotto/TwigCacheBundle/blob/master/Twig/ProfilerExtension.php
I fixed this by adding the following to config.yml
:
services:
asm89_cache:
class: Asm89\Twig\CacheExtension\Extension
arguments: ["@twig_cache.strategy.lifetime"]
tags:
- { name: twig.extension }
Have the same issue. Any news on this PR ?
I can confirm that this PR fixes the issue. I would appreciate it to merge this commit.
Any chances to get this merged in?
No?
Using __CLASS__
resolves the issue. Can we get this merged?
It's 2019 already lol.
Seems this was worked around in various places in the meantime. I did just release 1.4.0 with the fix. :)
The "Asm89\Twig\CacheExtension\Extension" extension is not enabled.
I just did a
composer update
and spent a lot of time on figuring out why the application is not working. Then next day in the morning I just got an idea and it worked. Here is the patch.The problem occurs when I'm using the
emanueleminotto/twig-cache-bundle
, it has a class that extends this one, and then probably the child class is registered as service.