diff --git a/extra/twig-extra-bundle/Resources/config/markdown.php b/extra/twig-extra-bundle/Resources/config/markdown.php index d8ab94a4224..dd5774d0335 100644 --- a/extra/twig-extra-bundle/Resources/config/markdown.php +++ b/extra/twig-extra-bundle/Resources/config/markdown.php @@ -16,13 +16,14 @@ use Twig\Extra\Markdown\MarkdownRuntime; return static function (ContainerConfigurator $container) { + $service = function_exists('Symfony\Component\DependencyInjection\Loader\Configurator\service') ? 'Symfony\Component\DependencyInjection\Loader\Configurator\service' : 'Symfony\Component\DependencyInjection\Loader\Configurator\ref'; $container->services() ->set('twig.extension.markdown', MarkdownExtension::class) ->tag('twig.extension') ->set('twig.runtime.markdown', MarkdownRuntime::class) ->args([ - service('twig.markdown.default'), + $service('twig.markdown.default'), ]) ->tag('twig.runtime')