Skip to content

Commit

Permalink
Merge branch 'add-firing-phase' of github.com:hirethunk/verbs into ad…
Browse files Browse the repository at this point in the history
…d-firing-phase
  • Loading branch information
DanielCoulbourne committed Nov 7, 2024
2 parents 5b3332c + 4e9a33f commit e431c57
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions examples/Bank/src/Events/AccountOpened.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace Thunk\Verbs\Examples\Bank\Events;

use Thunk\Verbs\Event;
use Thunk\Verbs\Facades\Verbs;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Mail;
use Thunk\Verbs\Examples\Bank\Models\Account;
use Thunk\Verbs\Examples\Bank\Mail\WelcomeEmail;
use Thunk\Verbs\Attributes\Autodiscovery\StateId;
use Thunk\Verbs\Event;
use Thunk\Verbs\Examples\Bank\Mail\WelcomeEmail;
use Thunk\Verbs\Examples\Bank\Models\Account;
use Thunk\Verbs\Examples\Bank\States\AccountState;
use Thunk\Verbs\Facades\Verbs;

class AccountOpened extends Event
{
Expand Down
1 change: 0 additions & 1 deletion src/Lifecycle/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ protected function getMountHooks(Event $event): Collection
$hooks = $this->hooksFor($event, Phase::Mount);

if (method_exists($event, 'mount')) {
dump($event);
$hooks->prepend(Hook::fromClassMethod($event, 'mount')->forcePhases(Phase::Mount));
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/MountHookTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Thunk\Verbs\Facades\Verbs;
use Thunk\Verbs\Lifecycle\Phase;


it('can modify props on events in the mount phase', function () {
Verbs::registerListener(Listener::class);

Expand All @@ -21,6 +20,7 @@
class EventWithNullProp extends Event
{
public ?string $name = null;

public string $album;
}

Expand Down

0 comments on commit e431c57

Please sign in to comment.