Recently we made a change to the Laravel notifier to expose the setStripPathRegex and setProjectRootRegex configuration options in the bugsnag-laravel config file — see https://github.com/bugsnag/bugsnag-laravel/pull/398
This PR adds the same configuration options to Symfony, which can be set like so:
bugsnag:
strip_path_regex: '/^some regex$/'
project_root_regex: '/^some other regex$/'
These options take precedence over the existing strip_path and project_root options. For example, if both strip_path and strip_path_regex are set, strip_path_regex will be used and strip_path will be ignored
Tests
The tests for this are mostly copied from the Laravel tests with the small change of using src rather than app for the default project root (which is used if neither project root configuration option is given)
Review
For the submitter, initial self-review:
[x] Commented on code changes inline explain the reasoning behind the approach
[x] Reviewed the test cases added for completeness and possible points for discussion
[x] A changelog entry was added for the goal of this pull request
[x] Check the scope of the changeset - is everything in the diff required for the pull request?
This pull request is ready for:
[ ] Initial review of the intended approach, not yet feature complete
[ ] Structural review of the classes, functions, and properties modified
[x] Final review
For the pull request reviewer(s), this changeset has been reviewed for:
[ ] Consistency across platforms for structures or concepts added or modified
[ ] Consistency between the changeset and the goal stated above
[ ] Internal consistency with the rest of the library - is there any overlap between existing interfaces and any which have been added?
[ ] Usage friction - is the proposed change in usage cumbersome or complicated?
[ ] Performance and complexity - are there any cases of unexpected O(n^3) when iterating, recursing, flat mapping, etc?
[ ] Concurrency concerns - if components are accessed asynchronously, what issues will arise
[ ] Thoroughness of added tests and any missing edge cases
Goal
Recently we made a change to the Laravel notifier to expose the
setStripPathRegex
andsetProjectRootRegex
configuration options in the bugsnag-laravel config file — see https://github.com/bugsnag/bugsnag-laravel/pull/398This PR adds the same configuration options to Symfony, which can be set like so:
These options take precedence over the existing
strip_path
andproject_root
options. For example, if bothstrip_path
andstrip_path_regex
are set,strip_path_regex
will be used andstrip_path
will be ignoredTests
The tests for this are mostly copied from the Laravel tests with the small change of using
src
rather thanapp
for the default project root (which is used if neither project root configuration option is given)Review
For the submitter, initial self-review:
For the pull request reviewer(s), this changeset has been reviewed for: