Closed davidsteinsland closed 9 years ago
Out of curiosity, what is the use case for an empty project root?
This particular variable is set to tell airbrake what folder your files are in so it can truncate paths, to keep them shorter.
If this override was desired, what I would counter with is that it should only be overriding if the variable === null, thus allowing an empty string to be valid.
However, I'm doubtful of the utility of this override.
Perhaps I have misunderstood the purpose of that variable … In Airbrake, backtraces links to your github project, but with the whole DOCUMENT_ROOT appended to each file (which of course does not exist in Github). I thought that the projectRoot
was the one telling Airbrake to append a path, not remove it ...
Shouldn't
initialize
be called before load? https://github.com/dbtlr/php-airbrake/blob/87fb638ba669e2d2602599ed6ada3ff8e5634d78/src/Airbrake/Record.php#L52-L53If I want to reset
projectRoot
and set it to''
(empty string), it will be set to a default value when initialize is called: https://github.com/dbtlr/php-airbrake/blob/master/src/Airbrake/Configuration.php#L79