Created
February 18, 2026 08:52
-
-
Save fritzmg/93ffd7a802b875c839797a9212b64df5 to your computer and use it in GitHub Desktop.
Disable AutoRefreshTemplateHierarchyListener
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // src/ContaoManager/Plugin.php | |
| declare(strict_types=1); | |
| namespace App\ContaoManager; | |
| use Contao\ManagerPlugin\Config\ConfigPluginInterface; | |
| use Symfony\Component\Config\Loader\LoaderInterface; | |
| use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; | |
| use Symfony\Component\DependencyInjection\ContainerBuilder; | |
| class Plugin implements ConfigPluginInterface | |
| { | |
| public function registerContainerConfiguration(LoaderInterface $loader, array $managerConfig): void | |
| { | |
| $loader->load( | |
| static function (ContainerBuilder $container): void { | |
| $container->addCompilerPass(new class() implements CompilerPassInterface { | |
| public function process(ContainerBuilder $container): void | |
| { | |
| $container->removeDefinition('contao.twig.loader.auto_refresh_template_hierarchy_listener'); | |
| } | |
| }); | |
| }, | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment