Skip to content

Commit

Permalink
bug #3464 Fix compat with older Symfony versions (fabpot)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.x branch.

Discussion
----------

Fix compat with older Symfony versions

Commits
-------

f4e1429 Fix compat with older Symfony versions
  • Loading branch information
fabpot committed Jan 5, 2021
2 parents 393c908 + f4e1429 commit 33a9f2e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion extra/twig-extra-bundle/Resources/config/markdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down

0 comments on commit 33a9f2e

Please sign in to comment.