Skip to content

Fix lineno in backtrace of multi-line function calls #8818

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

iluuu1994
Copy link
Member

Closes GH-8810

@derickr Do you see any issues with this for Xdebug?

@iluuu1994
Copy link
Member Author

Actually, this should also handle the following:

(new A())
    ->b()
    ->c();

so we'll need some more tweaks.

@iluuu1994
Copy link
Member Author

iluuu1994 commented Jun 17, 2022

The line number should now always be the lineno of the function/method name:

foo // <- This line
(
)

$foo
    ->
    bar  // <- This line
    (
    )

Foo
    ::
    bar  // <- This line
    (
    )

new
    Foo  // <- This line
    (
    )

The only exception is when the LHS is dynamic:

(function () {

})
( // <- This line
    'foo',
)

'foo'
    ( // <- This line
        'bar',
    )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong line number reported in case of a multiline parameter list
1 participant