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

Should we set the default namespace? #5

Closed
leemason opened this issue May 23, 2016 · 1 comment
Closed

Should we set the default namespace? #5

leemason opened this issue May 23, 2016 · 1 comment

Comments

@leemason
Copy link

I get why its done, make it easier etc.

The test done on the event wont work from what i can see.

Events come through without the leading backslash, regardless of if there are from \App\Events or \Package\Events

php get_class or Class::class never give you the leading backslash.

for example if you fire the event:

event(new Package\Event)

this will never be matched, because:

channel.listen('Package\\Event'); will listen for App\\Events\\Package\\Event

and

channel.listen('\\Package\\Event'); will listen for \\Package\\Event

but the actual event fired will be Package\\Event

i dont have a solution, just thinking of future use cases.

@leemason
Copy link
Author

ok just as i was writting i though of how it can be fixed, if ther are leading backslashes we can just remove them in the event formatter, pr coming soon.

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

No branches or pull requests

2 participants