Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.8] Fix fake dispatcher issue #28238

Merged
merged 1 commit into from
Apr 17, 2019

Conversation

TBlindaruk
Copy link
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
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
Contributor

@TBlindaruk Thanks.

@TBlindaruk
Copy link
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