Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 29f99a1

Browse files
committed
fix(SessionTracker): remove automatic session capturing for Lumen 5.3+
`session()` is not available after Lumen 5.3 - this change prevents session tracking setup if the method is not available
1 parent a992206 commit 29f99a1

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
Changelog
22
=========
33

4+
## TBD
5+
6+
### Fixes
7+
8+
* Disabled automatic session capturing for Lumen 5.3+ (where `session()` is not available)
9+
[#358](https://github.com/bugsnag/bugsnag-laravel/pull/358)
10+
411
## 2.16.0 (2019-06-17)
512

613
### Enhancements
714

815
* Add Laravel/Lumen version string to report and session payloads (device.runtimeVersions)
916
[#352](https://github.com/bugsnag/bugsnag-laravel/pull/352)
1017

11-
## Fixes
18+
### Fixes
1219

1320
* Changed caching TTL to use DateTime instead.
1421
[#344](https://github.com/bugsnag/bugsnag-laravel/pull/344)

src/BugsnagServiceProvider.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,12 @@ protected function setupPaths(Client $client, $base, $path, $strip, $project)
372372
*/
373373
protected function setupSessionTracking(Client $client, $endpoint, $events)
374374
{
375+
// Session support removed in Lumen 5.3 - only setup automatic session
376+
// tracking if the session function is avaiable
377+
if (!function_exists('session')) {
378+
return;
379+
}
380+
375381
$client->setAutoCaptureSessions(true);
376382
if (!is_null($endpoint)) {
377383
$client->setSessionEndpoint($endpoint);

0 commit comments

Comments
 (0)