Skip to content

Commit d8e4af2

Browse files
committed
bug #40850 [FrameworkBundle][Notifier] Fix wrong class name usage (jschaedl)
This PR was merged into the 5.3-dev branch. Discussion ---------- [FrameworkBundle][Notifier] Fix wrong class name usage | Q | A | ------------- | --- | Branch? | 5.x | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | - <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT | Doc PR | - <!-- required for new features --> I got the following error message a new symfony installation while trying to require fake-sms and fake-chat: ``` symfony new --version=next --dir=new cd new composer req notifier composer req symfony/fake-chat-notifier ``` ``` Executing script cache:clear [KO] [KO] Script cache:clear returned with error code 1 !! !! In ContainerBuilder.php line 994: !! !! You have requested a non-existent service "notifier.transport_factory.fakechat". !! !! !! Script `@auto`-scripts was called via post-update-cmd Installation failed, reverting ./composer.json and ./composer.lock to their original content. ``` Commits ------- 213ef7f Fix wrong class name usage
2 parents 3fd41ce + 213ef7f commit d8e4af2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2436,12 +2436,12 @@ private function registerNotifierConfiguration(array $config, ContainerBuilder $
24362436
$container->removeDefinition($classToServices[MercureTransportFactory::class]);
24372437
}
24382438

2439-
if (ContainerBuilder::willBeAvailable('symfony/fake-chat-notifier', FakeSmsTransportFactory::class, ['symfony/framework-bundle']) && ContainerBuilder::willBeAvailable('symfony/fake-chat-notifier', FakeSmsTransportFactory::class, ['symfony/notifier']) && ContainerBuilder::willBeAvailable('symfony/fake-chat-notifier', FakeSmsTransportFactory::class, ['symfony/mailer'])) {
2439+
if (ContainerBuilder::willBeAvailable('symfony/fake-chat-notifier', FakeChatTransportFactory::class, ['symfony/framework-bundle', 'symfony/notifier', 'symfony/mailer'])) {
24402440
$container->getDefinition($classToServices[FakeChatTransportFactory::class])
24412441
->replaceArgument('$mailer', new Reference('mailer'));
24422442
}
24432443

2444-
if (ContainerBuilder::willBeAvailable('symfony/fake-sms-notifier', FakeSmsTransportFactory::class, ['symfony/framework-bundle']) && ContainerBuilder::willBeAvailable('symfony/fake-sms-notifier', FakeSmsTransportFactory::class, ['symfony/notifier']) && ContainerBuilder::willBeAvailable('symfony/fake-sms-notifier', FakeSmsTransportFactory::class, ['symfony/mailer'])) {
2444+
if (ContainerBuilder::willBeAvailable('symfony/fake-sms-notifier', FakeSmsTransportFactory::class, ['symfony/framework-bundle', 'symfony/notifier', 'symfony/mailer'])) {
24452445
$container->getDefinition($classToServices[FakeSmsTransportFactory::class])
24462446
->replaceArgument('$mailer', new Reference('mailer'));
24472447
}

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