vendor/knplabs/knp-paginator-bundle/src/DependencyInjection/Compiler/PaginatorConfigurationPass.php line 26

Open in your IDE?
  1. <?php
  2. namespace Knp\Bundle\PaginatorBundle\DependencyInjection\Compiler;
  3. use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
  4. use Symfony\Component\DependencyInjection\ContainerBuilder;
  5. use Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass;
  6. final class PaginatorConfigurationPass implements CompilerPassInterface
  7. {
  8.     /**
  9.      * Populate the listener service ids.
  10.      */
  11.     public function process(ContainerBuilder $container): void
  12.     {
  13.         // use main symfony dispatcher
  14.         if (!$container->hasDefinition('event_dispatcher') && !$container->hasAlias('event_dispatcher')) {
  15.             return;
  16.         }
  17.         foreach ($container->findTaggedServiceIds('knp_paginator.listener') as $serviceId => $tags) {
  18.             trigger_deprecation('knplabs/knp-paginator-bundle''5.5''Using "knp_paginator.listener" tag is deprecated, use "kernel.event_listener" instead.');
  19.         }
  20.         foreach ($container->findTaggedServiceIds('knp_paginator.subscriber') as $serviceId => $tags) {
  21.             trigger_deprecation('knplabs/knp-paginator-bundle''5.5''Using "knp_paginator.subscriber" tag is deprecated, use "kernel.event_subscriber" instead.');
  22.         }
  23.         $pass = new RegisterListenersPass('event_dispatcher''knp_paginator.listener''knp_paginator.subscriber');
  24.         $pass->process($container);
  25.     }
  26. }