Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 138fd23

Browse files
bug #48587 [TwigBundle] Alias BodyRendererInterface (n3o77)
This PR was merged into the 6.2 branch. Discussion ---------- [TwigBundle] Alias BodyRendererInterface | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | In the [Sending Messages Async](https://symfony.com/doc/current/mailer.html#sending-messages-async) ( symfony/symfony-docs@4fbbc16 ) docs the BodyRenderer is mentioned and used in the example. But there's no alias yet, not sure if this was intentional `@fabpot`? But it would be nice if it works right away without the need to add the alias manually. Commits ------- 248e792 [TwigBundle] Alias BodyRendererInterface
2 parents 4e8c602 + 248e792 commit 138fd23

File tree

1 file changed

+2
-0
lines changed
  • src/Symfony/Bundle/TwigBundle/Resources/config

1 file changed

+2
-0
lines changed

src/Symfony/Bundle/TwigBundle/Resources/config/mailer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use Symfony\Bridge\Twig\Mime\BodyRenderer;
1515
use Symfony\Component\Mailer\EventListener\MessageListener;
16+
use Symfony\Component\Mime\BodyRendererInterface;
1617

1718
return static function (ContainerConfigurator $container) {
1819
$container->services()
@@ -22,5 +23,6 @@
2223

2324
->set('twig.mime_body_renderer', BodyRenderer::class)
2425
->args([service('twig')])
26+
->alias(BodyRendererInterface::class, 'twig.mime_body_renderer')
2527
;
2628
};

0 commit comments

Comments
 (0)