Upgrade 1-11.38

This commit is contained in:
xesmyd
2026-03-30 14:10:30 +02:00
parent f2a7e6d1fc
commit ac648ef29d
24665 changed files with 69682 additions and 2205004 deletions
@@ -11,11 +11,13 @@
namespace Symfony\Bundle\TwigBundle\CacheWarmer;
use Psr\Container\ContainerInterface;
use Symfony\Component\DependencyInjection\ServiceSubscriberInterface;
use Symfony\Component\Finder\Finder;
use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Bundle\FrameworkBundle\CacheWarmer\TemplateFinderInterface;
use Symfony\Component\Templating\TemplateReference;
use Twig\Environment;
use Twig\Error\Error;
/**
@@ -26,18 +28,14 @@ use Twig\Error\Error;
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class TemplateCacheCacheWarmer implements CacheWarmerInterface
class TemplateCacheCacheWarmer implements CacheWarmerInterface, ServiceSubscriberInterface
{
protected $container;
protected $finder;
private $paths;
/**
* Constructor.
*
* @param ContainerInterface $container The dependency injection container
* @param TemplateFinderInterface $finder The template paths cache warmer
* @param array $paths Additional twig paths to warm
* @param array $paths Additional twig paths to warm
*/
public function __construct(ContainerInterface $container, TemplateFinderInterface $finder = null, array $paths = array())
{
@@ -93,6 +91,16 @@ class TemplateCacheCacheWarmer implements CacheWarmerInterface
return true;
}
/**
* {@inheritdoc}
*/
public static function getSubscribedServices()
{
return array(
'twig' => Environment::class,
);
}
/**
* Find templates in the given directory.
*