Fix FrameContextifier - #1104
Conversation
ste93cry
left a comment
There was a problem hiding this comment.
Rather than making the abs_path attribute required, which in the case of internal frames would report an incorrect value, I would rather change the frame builder to set its value regardless of whether the $file is equal or not to its stripped value. Technically speaking if $file is not an absolute path we would still report an incorrect value and the integration would try to read a non-existent file, but it should not happen if the frame is built from a real backtrace
|
@ste93cry Thanks for the review. I've applied the changes. Not sure if I should pass sentry-php/src/StacktraceBuilder.php Line 73 in 65030a1 |
Strictly speaking yes, but we should also strip the prefix from the path like we do for the rest of the frames. We should probably call the frame builder also for this "fake" frame 🤔 |
|
@ste93cry You're right. I've squashed my commits so only the required changes are there. Added necessary assertions to |
|
@IonBazan maybe it passed under the radar because I edited the comment after posting it, but would you be so kind to add an entry to the CHANGELOG? |
|
@ste93cry Added the changelog entry - feel free to modify it before release if it does not match the standards. |
This PR fixes #1103 when
$fileis same as absolute path.