Skip to content

Commit edcef65

Browse files
Revert "Do not swallow exceptions in event subscribers when PHPUnit's own test suite is running"
This reverts commit aae2542.
1 parent 0077cb2 commit edcef65

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Event/Dispatcher/DirectDispatcher.php

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

1212
use const PHP_EOL;
1313
use function array_key_exists;
14-
use function defined;
1514
use function dirname;
1615
use function sprintf;
1716
use function str_starts_with;
@@ -115,8 +114,7 @@ public function dispatch(Event $event): void
115114
*/
116115
public function handleThrowable(Throwable $t): void
117116
{
118-
if (!defined('PHPUNIT_TESTSUITE') &&
119-
$this->isThrowableFromThirdPartySubscriber($t)) {
117+
if ($this->isThrowableFromThirdPartySubscriber($t)) {
120118
Facade::emitter()->testRunnerTriggeredPhpunitWarning(
121119
sprintf(
122120
'Exception in third-party event subscriber: %s%s%s',

0 commit comments

Comments
 (0)