Remove RegisterWallabagGuzzleSubscribersPass

This commit is contained in:
Yassine Guedidi 2024-02-02 22:48:03 +01:00
parent 03111e510c
commit c690a19bd7
3 changed files with 1 additions and 26 deletions

View file

@ -205,6 +205,7 @@ services:
Wallabag\CoreBundle\Helper\HttpClientFactory:
calls:
- ['addSubscriber', ['@Wallabag\CoreBundle\Guzzle\AuthenticatorSubscriber']]
- ['addSubscriber', ['@Wallabag\CoreBundle\Guzzle\FixupMondeDiplomatiqueUriSubscriber']]
RulerZ\RulerZ:
alias: rulerz

View file

@ -1,24 +0,0 @@
<?php
namespace Wallabag\CoreBundle\DependencyInjection\CompilerPass;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
use Wallabag\CoreBundle\Guzzle\FixupMondeDiplomatiqueUriSubscriber;
use Wallabag\CoreBundle\Helper\HttpClientFactory;
class RegisterWallabagGuzzleSubscribersPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container): void
{
$definition = $container->getDefinition(HttpClientFactory::class);
// manually add subscribers for some websites
$definition->addMethodCall(
'addSubscriber', [
new Reference(FixupMondeDiplomatiqueUriSubscriber::class),
]
);
}
}

View file

@ -4,7 +4,6 @@ namespace Wallabag\CoreBundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use Wallabag\CoreBundle\DependencyInjection\CompilerPass\RegisterWallabagGuzzleSubscribersPass;
use Wallabag\CoreBundle\Import\ImportCompilerPass;
class WallabagCoreBundle extends Bundle
@ -14,6 +13,5 @@ class WallabagCoreBundle extends Bundle
parent::build($container);
$container->addCompilerPass(new ImportCompilerPass());
$container->addCompilerPass(new RegisterWallabagGuzzleSubscribersPass());
}
}