Skip to content

Commit 9c0ce8f

Browse files
Merge branch '6.4' into 7.0
* 6.4: Sync .github/expected-missing-return-types.diff [WebProfilerBundle] Fix the design of the compact toolbar button [AssetMapper] Improve link generation script fix merge consistently use dates in UTC in Doctrine connection tests Add missing Chinese(zh_TW) translations [Intl] [Emoji] Fix emoji files (remove wrong characters / add missing data) [Translation] Crowdin Bridge: use the project language mapping [VarExporter] Nitpicking in README.md [DoctrineBridge] Adapt deprecation message to include ODM bundle attribute name Added missing Serbian (sr_Cyrl) translation [Validator] Add missing Serbian translation [Validator] Add missing arabic translation [Validator] updated Albanian translation [Clock] Fix calling `mockTime()` in `setUpBeforeClass()`
2 parents ed21c02 + da33f27 commit 9c0ce8f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ContainerAwareEventManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ private function initializeSubscribers(): void
200200
continue;
201201
}
202202

203-
throw new \InvalidArgumentException(sprintf('Using Doctrine subscriber "%s" is not allowed, declare it as a listener instead.', get_debug_type($listener)));
203+
throw new \InvalidArgumentException(sprintf('Using Doctrine subscriber "%s" is not allowed. Register it as a listener instead, using e.g. the #[AsDoctrineListener] or #[AsDocumentListener] attribute.', \is_object($listener) ? get_debug_type($listener) : $listener));
204204
}
205205
}
206206

Tests/ContainerAwareEventManagerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function testUsingDoctrineSubscribersThrows()
4242
$this->evm = new ContainerAwareEventManager($this->container, [new MySubscriber(['foo'])]);
4343

4444
$this->expectException(\InvalidArgumentException::class);
45-
$this->expectExceptionMessage('Using Doctrine subscriber "Symfony\Bridge\Doctrine\Tests\MySubscriber" is not allowed, declare it as a listener instead.');
45+
$this->expectExceptionMessage('Using Doctrine subscriber "Symfony\Bridge\Doctrine\Tests\MySubscriber" is not allowed. Register it as a listener instead, using e.g. the #[AsDoctrineListener] or #[AsDocumentListener] attribute.');
4646
$this->evm->getListeners('foo');
4747
}
4848

0 commit comments

Comments
 (0)