Skip to content

Commit 4a6a794

Browse files
committed
bug #47129 [FrameworkBundle] remove the ChatterInterface alias when the chatter service is removed (xabbuh)
This PR was merged into the 5.4 branch. Discussion ---------- [FrameworkBundle] remove the ChatterInterface alias when the chatter service is removed | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #47122 | License | MIT | Doc PR | Commits ------- 5c726c0 remove the ChatterInterface alias when the chatter service is removed
2 parents f7a2c37 + 5c726c0 commit 4a6a794

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,10 @@
162162
use Symfony\Component\Notifier\Bridge\Vonage\VonageTransportFactory;
163163
use Symfony\Component\Notifier\Bridge\Yunpian\YunpianTransportFactory;
164164
use Symfony\Component\Notifier\Bridge\Zulip\ZulipTransportFactory;
165+
use Symfony\Component\Notifier\ChatterInterface;
165166
use Symfony\Component\Notifier\Notifier;
166167
use Symfony\Component\Notifier\Recipient\Recipient;
168+
use Symfony\Component\Notifier\TexterInterface;
167169
use Symfony\Component\Notifier\Transport\TransportFactoryInterface as NotifierTransportFactoryInterface;
168170
use Symfony\Component\PropertyAccess\PropertyAccessor;
169171
use Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor;
@@ -2489,11 +2491,13 @@ private function registerNotifierConfiguration(array $config, ContainerBuilder $
24892491
$container->getDefinition('chatter.transports')->setArgument(0, $config['chatter_transports']);
24902492
} else {
24912493
$container->removeDefinition('chatter');
2494+
$container->removeAlias(ChatterInterface::class);
24922495
}
24932496
if ($config['texter_transports']) {
24942497
$container->getDefinition('texter.transports')->setArgument(0, $config['texter_transports']);
24952498
} else {
24962499
$container->removeDefinition('texter');
2500+
$container->removeAlias(TexterInterface::class);
24972501
}
24982502

24992503
if ($this->mailerConfigEnabled) {

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@
5353
use Symfony\Component\HttpKernel\DependencyInjection\LoggerPass;
5454
use Symfony\Component\HttpKernel\Fragment\FragmentUriGeneratorInterface;
5555
use Symfony\Component\Messenger\Transport\TransportFactory;
56+
use Symfony\Component\Notifier\ChatterInterface;
57+
use Symfony\Component\Notifier\TexterInterface;
5658
use Symfony\Component\PropertyAccess\PropertyAccessor;
5759
use Symfony\Component\Security\Core\Security;
5860
use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader;
@@ -2022,7 +2024,9 @@ public function testNotifierWithoutTransports()
20222024

20232025
$this->assertTrue($container->hasDefinition('notifier'));
20242026
$this->assertFalse($container->hasDefinition('chatter'));
2027+
$this->assertFalse($container->hasAlias(ChatterInterface::class));
20252028
$this->assertFalse($container->hasDefinition('texter'));
2029+
$this->assertFalse($container->hasAlias(TexterInterface::class));
20262030
}
20272031

20282032
public function testIfNotifierTransportsAreKnownByFrameworkExtension()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy