Skip to content
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

in context of anonymous class is hard to understand/locate #6312

Closed
mvorisek opened this issue Jan 6, 2022 · 2 comments
Closed

in context of anonymous class is hard to understand/locate #6312

mvorisek opened this issue Jan 6, 2022 · 2 comments

Comments

@mvorisek
Copy link
Contributor

mvorisek commented Jan 6, 2022

Feature request

 ------ ----------------------------------------------------------------------------- 
  Line   src/Persistence/Sql/Mssql/PlatformTrait.php (in context of anonymous class)  
 ------ ----------------------------------------------------------------------------- 
  13     Call to method...

it is impossible to locate such anonymous class only from the output

This is a feature request to always report a file path relative to the ../vendor directory togetger with (in context of anonymous class message, preferably with line number of the first class declaration. Expected example output:

 ------ ----------------------------------------------------------------------------- 
  Line   src/Persistence/Sql/Mssql/PlatformTrait.php (in context of anonymous class
         declared in src/Database.php:123)
 ------ ----------------------------------------------------------------------------- 
  13     Call to method...

as OOP is commonly used, the declaration location can even be/prefearably a FQ method name, example:

 ------ ----------------------------------------------------------------------------- 
  Line   src/Persistence/Sql/Mssql/PlatformTrait.php (in context of anonymous class
         declared in MyCorp\Database::createPlatform() method)
 ------ ----------------------------------------------------------------------------- 
  13     Call to method...
@ondrejmirtes
Copy link
Member

Implemented: phpstan/phpstan-src@10e4602

@github-actions
Copy link

github-actions bot commented Feb 7, 2022

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants