update DebugScope error message#1688
Conversation
Make the scope id in error messages consistent between the detached-with-error and not-detached cases, by using spl_object_id($this->scope) in the former to match the latter.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1688 +/- ##
============================================
- Coverage 68.48% 68.45% -0.04%
Complexity 2878 2878
============================================
Files 430 430
Lines 8759 8757 -2
============================================
- Hits 5999 5995 -4
- Misses 2760 2762 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 5 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
src/Context/DebugScope.php
Outdated
| trigger_error(sprintf( | ||
| 'Scope: unexpected call to Scope::detach() for scope #%d, scope was already detached %s', | ||
| spl_object_id($this), | ||
| spl_object_id($this->scope), |
There was a problem hiding this comment.
I think using $this would be more correct, cause as API user you see DebugScope as actual scope.
If you got some bug and start logging spl_object_id($scope), you will get different id's and wold not be able to get sence of what's going on.
There was a problem hiding this comment.
yes, that makes sense. Thanks for the feedback, updated.
Make the scope id in error messages consistent between the detached-with-error and not-detached cases, by using spl_object_id($this->scope) in the former to match the latter.
Closes: #1687