fix(SessionTracker): remove automatic session capturing for Lumen 5.3+#358
Conversation
c298d8f to
c8c7f38
Compare
`session()` is not available after Lumen 5.3 - this change prevents session tracking setup if the method is not available
c8c7f38 to
29f99a1
Compare
Cawllec
left a comment
There was a problem hiding this comment.
I think this could do with some additional docs, both in the notifier and the platforms docs themselves.
| // Session support removed in Lumen 5.3 - only setup automatic session | ||
| // tracking if the session function is avaiable | ||
| if (!function_exists('session')) { | ||
| return; |
There was a problem hiding this comment.
I think it would be worth adding a log here to mention that sessions are not automatically being tracked, as someone may expect if they set the configuration option.
There was a problem hiding this comment.
I'm struggling to log anything (using Laravel logging) as it calls recursively into the Bugsnag setup code for the BugsnagLogger handling. Is there a lower-level approach that could be used to log?
There was a problem hiding this comment.
Also, given the fact that it doesn't currently work and there should be an alternative solution to allow support for this in the not-too-distant-future, I think it's not too important to log this if it proves difficult.
There was a problem hiding this comment.
Yeah, I hadn't considered the logging straight to Bugsnag aspect. In theory it shouldn't be a problem if the log-level is high enough, but there's no guarantee there, and I haven't actually tried it myself.
In which case it's probably fine to not log.
Cawllec
left a comment
There was a problem hiding this comment.
In light of the comments above, this looks good, although it will probably require a documentation update to note that sessions will not be automatically collected in Laravel.
e25fadb to
c75e77c
Compare
dfdee16 to
99d9726
Compare
Cawllec
left a comment
There was a problem hiding this comment.
This still looks good, testing locally works.
Goal
session()is not available after Lumen 5.3 - this change prevents session tracking setup if themethod is not available.
Changeset
Changed
sessionis not available.Tests
Manually tested that no exception occurs on Lumen and that session information continues to work on Laravel.
Review
For the submitter, initial self-review:
For the pull request reviewer(s), this changeset has been reviewed for: