Skip to content

[5.8] Fix fake dispatcher issue#28238

Merged
taylorotwell merged 1 commit into
laravel:5.8from
TBlindaruk:fix-fake-dispatcher-issue
Apr 17, 2019
Merged

[5.8] Fix fake dispatcher issue#28238
taylorotwell merged 1 commit into
laravel:5.8from
TBlindaruk:fix-fake-dispatcher-issue

Conversation

@TBlindaruk
Copy link
Copy Markdown
Contributor

Description:
Integration tests proof that it will work with both built-in session guard or any other custom guard whether it has a dispatcher or not.

Note : some build-in guards like Token guard does dispatch any events, hence there is no setDispatcher method or any dispatcher on it.
So there are 2 types of guards.

which I think a contract (interface) is missing here, in order to mark the SessionGuard class or any other custom guard as an event dispatching guard, and enforce setDispatcher and getDispatcher methods on them.)

So the clunky method_exists check won't be needed.

Re-submit: #28131
fixed: #27451

Description:
Integration tests proof that it will work with both built-in session guard or any other custom guard whether it has a dispatcher or not.

Note : some build-in guards like Token guard does dispatch any events, hence there is no `setDispatcher ` method or any dispatcher on it.
So there are 2 types of guards.

which I think a contract (interface) is missing here, in order to mark the SessionGuard class or any other custom guard as an event dispatching guard, and enforce `setDispatcher` and `getDispatcher` methods on them.)

So the clunky `method_exists` check won't be needed.

Re-submit: laravel#28131
fixed: laravel#27451
@TBlindaruk TBlindaruk force-pushed the fix-fake-dispatcher-issue branch from e4d0007 to 4a25686 Compare April 16, 2019 20:42
@taylorotwell taylorotwell merged commit 4a25686 into laravel:5.8 Apr 17, 2019
@taylorotwell
Copy link
Copy Markdown
Member

I made a check to not do anything at all if the auth service has not been resolved yet.

@TBlindaruk TBlindaruk deleted the fix-fake-dispatcher-issue branch April 17, 2019 20:11
@imanghafoori1
Copy link
Copy Markdown
Contributor

@TBlindaruk Thanks.

@TBlindaruk
Copy link
Copy Markdown
Contributor Author

@imanghafoori1, YW

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Event::fake() does not replace dispatcher for guard

3 participants