Open nunomaduro opened 2 years ago
Hi @nunomaduro - could you explain a bit more about your use case here please? 600 tests sound like a lot to have a direct dependency on Bugsnag. Is there no way for you to isolate those tests from Bugsnag and/or mock Bugsnag to avoid that dependency?
Hi @nunomaduro, have you seen the message from luke-belton above? We would really need to understand your use case in order to consider this PR.
@luke-belton @johnkiely1 I think this originated in this issue: https://github.com/laravel/framework/issues/44214
We will look to review this PR when priorities allow.
This pull request fixes a memory leak of this package with Laravel's unit tests, where the
Illuminate\Foundation\Application
instance is being leaked to PHP's internal shutdown function.In other words, Laravel often creates application instances during tests, and bugsnag is registering (for each new test case) a new shutdown function with those application instances.
With this fix, we're able to decrease the memory usage of a 600 test suite by 14% percent:
Note, #65 equally needs to merged and tagged.