Skip to content

Commit 963b54c

Browse files
Merge branch '11.5' into 12.0
2 parents 8fe3bf3 + 9923859 commit 963b54c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Event/Dispatcher/DirectDispatcher.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
use const PHP_EOL;
1313
use function array_key_exists;
14+
use function defined;
1415
use function dirname;
1516
use function sprintf;
1617
use function str_starts_with;
@@ -115,7 +116,8 @@ public function dispatch(Event $event): void
115116
*/
116117
public function handleThrowable(Throwable $t): void
117118
{
118-
if ($this->isThrowableFromThirdPartySubscriber($t)) {
119+
if (!defined('PHPUNIT_TESTSUITE') &&
120+
$this->isThrowableFromThirdPartySubscriber($t)) {
119121
Facade::emitter()->testRunnerTriggeredWarning(
120122
sprintf(
121123
'Exception in third-party event subscriber: %s%s%s',

0 commit comments

Comments
 (0)