Skip to content

Commit 3d757be

Browse files
committed
wip
1 parent daaa8e3 commit 3d757be

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

packages/event-bus/src/GenericEventBus.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ private function getCallable(array $eventHandlers): EventBusMiddlewareCallable
6666

6767
$callable($event);
6868

69-
if (is_object($event) && reflect($event)->hasAttribute(WithoutPropagation::class) || $eventHandler->handler->handler->hasAttribute(WithoutPropagation::class)) {
69+
if (is_object($event) && reflect($event)->hasAttribute(StopsPropagation::class) || $eventHandler->handler->handler->hasAttribute(StopsPropagation::class)) {
7070
break;
7171
}
7272
}

packages/event-bus/src/WithoutPropagation.php renamed to packages/event-bus/src/StopsPropagation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
use Attribute;
66

77
#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD)]
8-
final readonly class WithoutPropagation
8+
final readonly class StopsPropagation
99
{
1010
}

tests/Fixtures/Events/EventWithoutPropagation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace Tests\Tempest\Fixtures\Events;
44

5-
use Tempest\EventBus\WithoutPropagation;
5+
use Tempest\EventBus\StopsPropagation;
66

7-
#[WithoutPropagation]
7+
#[StopsPropagation]
88
final readonly class EventWithoutPropagation
99
{
1010
}

tests/Fixtures/Events/HandlersForEventWithListenerWithoutPropagation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
use Tempest\Container\Singleton;
66
use Tempest\EventBus\EventHandler;
7-
use Tempest\EventBus\WithoutPropagation;
7+
use Tempest\EventBus\StopsPropagation;
88

99
#[Singleton]
1010
final class HandlersForEventWithListenerWithoutPropagation
1111
{
1212
public int $count = 0;
1313

14-
#[EventHandler, WithoutPropagation]
14+
#[EventHandler, StopsPropagation]
1515
public function a(EventForListenerWithoutPropagation $event): void
1616
{
1717
$this->count++;

0 commit comments

Comments
 (0)