Skip to content

Commit 3d1211a

Browse files
committed
Remove HttpMessageMarkupExtension service when Twig is not installed
1 parent f94de3b commit 3d1211a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

DependencyInjection/HttplugExtension.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ public function load(array $configs, ContainerBuilder $container)
8181
$this->configureClients($container, $config);
8282
$this->configurePlugins($container, $config['plugins']); // must be after clients, as clients.X.plugins might use plugins as templates that will be removed
8383
$this->configureAutoDiscoveryClients($container, $config);
84+
85+
if (!class_exists(\Twig_Environment::class)) {
86+
$container->removeDefinition('httplug.collector.twig.http_message');
87+
}
8488
}
8589

8690
/**

0 commit comments

Comments
 (0)