spatie/laravel-permission

Wrong octane event listener

giunashvili opened this issue · 2 comments

$dispatcher->listen(function (\Laravel\Octane\Events\OperationTerminated $event) {
// @phpstan-ignore-next-line
$event->sandbox->make(PermissionRegistrar::class)->clearPermissionsCollection();
});
}

In octane there is no \Laravel\Octane\Events\OperationTerminated event. there is Laravel\Octane\Contracts\OperationTerminated event.

image

Permissions cleanup won't work like this.

You are right, first was Events\RequestTerminated, then it was changed to OperationTerminated, but events remained