Skip to content

Conversation

@vjik
Copy link
Member

@vjik vjik commented Dec 23, 2025

Q A
Is bugfix? ✔️
New feature?
Breaks BC?

When a trace gets inside error handler closure, PHP uses "file" and "line" where the error occurred, but "function", "class", "type" and "args" from the closure. See example:

Array
(
    [file] => /projects/yiisoft/yii-dev-tool/dev/error-handler/tests/ErrorHandlerTest.php
    [line] => 107
    [function] => {closure:Yiisoft\ErrorHandler\ErrorHandler::register():127}
    [class] => Yiisoft\ErrorHandler\ErrorHandler
    [type] => ->
    [args] => Array
        (
            [0] => 2
            [1] => Undefined array key "undefined"
            [2] => /projects/yiisoft/yii-dev-tool/dev/error-handler/tests/ErrorHandlerTest.php
            [3] => 107
        )

)

@vjik vjik added the status:code review The pull request needs review. label Dec 23, 2025
@vjik vjik requested a review from a team December 23, 2025 09:25
@codecov
Copy link

codecov bot commented Dec 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.78%. Comparing base (20e9432) to head (5162997).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #160   +/-   ##
=========================================
  Coverage     80.78%   80.78%           
  Complexity      215      215           
=========================================
  Files            20       20           
  Lines           666      666           
=========================================
  Hits            538      538           
  Misses          128      128           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vjik vjik merged commit 3418351 into master Dec 23, 2025
28 checks passed
@vjik vjik deleted the error-backtrace branch December 23, 2025 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:code review The pull request needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants