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

Duplicate code does not generate a helpfull message #10937

Open
Hackwar opened this issue Apr 25, 2024 · 0 comments
Open

Duplicate code does not generate a helpfull message #10937

Hackwar opened this issue Apr 25, 2024 · 0 comments

Comments

@Hackwar
Copy link

Hackwar commented Apr 25, 2024

Feature request

Hello, contributor from Joomla again. I've been chasing an issue for way to long the last few days where phpstan reported a method to be missing, even though it is in our composer dependencies. We have a wrapper for filesystem operations and that wrapper is a standalone package which we add via composer. For system updates via browser however we have a bootstrap file which contains parts of that wrapper. That allows us to upgrade the dependency and still have a b/c version of that available. It also simplifies booting our app.

The problem now is, that the dependency is in our vendor directory and is properly parsed. Afterwards however it is parsing the bootstrap file in our normal codebase and seems to overwrite the information from the vendor folder. Since in our case the bootstrap file only contains slimmed down versions of the wrapper classes, phpstan now reports unknown static methods.

It would be good if phpstan would report when it finds the same class multiple times to protect against that.

Did PHPStan help you today? Did it make you happy in any way?

No response

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

No branches or pull requests

2 participants