mailer_debug.php 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\DependencyInjection\Loader\Configurator;
  11. use Symfony\Component\Mailer\DataCollector\MessageDataCollector;
  12. use Symfony\Component\Mailer\EventListener\MessageLoggerListener;
  13. return static function (ContainerConfigurator $container) {
  14. $container->services()
  15. ->set('mailer.data_collector', MessageDataCollector::class)
  16. ->args([
  17. service('mailer.message_logger_listener'),
  18. ])
  19. ->tag('data_collector', [
  20. 'template' => '@WebProfiler/Collector/mailer.html.twig',
  21. 'id' => 'mailer',
  22. ])
  23. ->set('mailer.message_logger_listener', MessageLoggerListener::class)
  24. ->tag('kernel.event_subscriber')
  25. ->tag('kernel.reset', ['method' => 'reset'])
  26. ;
  27. };