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

Fix auth context not working for Laravel >=5.3 #81

Merged
merged 1 commit into from
Jul 8, 2017

Conversation

stayallive
Copy link
Collaborator

Because of changes in how the session is loaded in Laravel 5.3 we can no longer rely on getting the user inside the register method of the service provider. But there is an authenticated event introduced making it easy to simply listen for it and we can be sure the user is available.

Fixes #73

Because of changes in how the session is loaded in Laravel 5.3 we can no longer rely on getting the user inside the register method of the service provider. But there is an authenticated event introduced making it easy to simply listen for it and we can be sure the user is available.

Fixes #73
@stayallive stayallive merged commit b8232fb into master Jul 8, 2017
@stayallive stayallive deleted the fix-auth-context branch July 8, 2017 13:46
@jconroy
Copy link

jconroy commented Dec 7, 2017

@stayallive @dcramer quick question - are these changes also needed for Lumen?

@stayallive
Copy link
Collaborator Author

Hey @jconroy,

The SentryLaravelEventHandler we modified here is also used for Lumen (Lumen is basicly a stripped down version of Laravel) so the changes here also affect the Lumen integration.

I am sure you are asking because something is not working, could you open an issue with details if so? Than we can take a look why that is!

@jconroy
Copy link

jconroy commented Dec 7, 2017

ok thanks @stayallive was just going off that the service providers are still different

src/Sentry/SentryLaravel/SentryLaravelServiceProvider.php
src/Sentry/SentryLaravel/SentryLumenServiceProvider.php

I am sure you are asking because something is not working,

We just noticed we've been getting very odd (just straight incorrect) user id tagging in sentry and we can't put our finger on where the issue lies. We can see the events mention the correct user in the stack traces and breadcrumbs etc. but every so often the tag is wrong and it makes debugging very confusing. I'm not sure it could be to do with merging functionality in Sentry trying to be too smart or something else. If I find something in the code I'll be sure to create an issue.

@stayallive
Copy link
Collaborator Author

stayallive commented Dec 7, 2017

@jconroy this sounds like some events might occur before your own user integration can run and you see the default id set by Sentry instead of your own or the other way around, but please do make an new issue with what kind of errors this occurs so we can dig in.

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.

3 participants