Skip to content

Commit 6868120

Browse files
committed
minor #40671 [Notifier] Mercure bridge: bump mercure dependency to 0.5 (azjezz, mtarld)
This PR was merged into the 5.3-dev branch. Discussion ---------- [Notifier] Mercure bridge: bump mercure dependency to 0.5 | Q | A | ------------- | --- | Branch? | 5.x | Bug fix? | no | New feature? | yes | Deprecations? | no | License | MIT | Doc PR | symfony/symfony-docs#15179 Bump Mercure bridge's `symfony/mercure` dependency to 0.5 to deal with hubs instead of publishers. --- To be able to use `HandlerRegistry::all` method, this PR needs symfony/mercure#50 to be merged and released. Commits ------- 498f96f1a8 Drop support of mercure:^0.4 d3306fdc92 add support for symfony/mercure:^0.5
2 parents 43af5d6 + 6ab9710 commit 6868120

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
use Symfony\Bundle\FrameworkBundle\Routing\AnnotatedRouteControllerLoader;
2727
use Symfony\Bundle\FrameworkBundle\Routing\RouteLoaderInterface;
2828
use Symfony\Bundle\FullStack;
29+
use Symfony\Bundle\MercureBundle\MercureBundle;
2930
use Symfony\Component\Asset\PackageInterface;
3031
use Symfony\Component\BrowserKit\AbstractBrowser;
3132
use Symfony\Component\Cache\Adapter\AdapterInterface;
@@ -44,8 +45,6 @@
4445
use Symfony\Component\Console\Command\Command;
4546
use Symfony\Component\DependencyInjection\Alias;
4647
use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
47-
use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument;
48-
use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument;
4948
use Symfony\Component\DependencyInjection\ChildDefinition;
5049
use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass;
5150
use Symfony\Component\DependencyInjection\ContainerBuilder;
@@ -95,6 +94,7 @@
9594
use Symfony\Component\Mailer\Bridge\Sendgrid\Transport\SendgridTransportFactory;
9695
use Symfony\Component\Mailer\Bridge\Sendinblue\Transport\SendinblueTransportFactory;
9796
use Symfony\Component\Mailer\Mailer;
97+
use Symfony\Component\Mercure\HubRegistry;
9898
use Symfony\Component\Messenger\Bridge\AmazonSqs\Transport\AmazonSqsTransportFactory;
9999
use Symfony\Component\Messenger\Bridge\Amqp\Transport\AmqpTransportFactory;
100100
use Symfony\Component\Messenger\Bridge\Beanstalkd\Transport\BeanstalkdTransportFactory;
@@ -2408,7 +2408,7 @@ private function registerNotifierConfiguration(array $config, ContainerBuilder $
24082408

24092409
if (ContainerBuilder::willBeAvailable('symfony/mercure-notifier', MercureTransportFactory::class, $parentPackages) && ContainerBuilder::willBeAvailable('symfony/mercure-bundle', MercureBundle::class, $parentPackages)) {
24102410
$container->getDefinition($classToServices[MercureTransportFactory::class])
2411-
->replaceArgument('$publisherLocator', new ServiceLocatorArgument(new TaggedIteratorArgument('mercure.publisher', null, null, true)));
2411+
->replaceArgument('$registry', new Reference(HubRegistry::class));
24122412
} elseif (ContainerBuilder::willBeAvailable('symfony/mercure-notifier', MercureTransportFactory::class, $parentPackages)) {
24132413
$container->removeDefinition($classToServices[MercureTransportFactory::class]);
24142414
}

0 commit comments

Comments
 (0)