-
-
Notifications
You must be signed in to change notification settings - Fork 864
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
Could not read file: xyz.php #3066
Comments
This bug report is missing a link to reproduction on phpstan.org. |
You use a broken autoloader, PHPStan tries to load class name |
@ondrejmirtes - i don't know about that, i searched the whole project for that string and the only occurrence is in phpstan: declare (strict_types=1);
namespace PHPStan\File;
class CouldNotReadFileException extends \PHPStan\AnalysedCodeException
{
public function __construct(string $fileName)
{
parent::__construct(\sprintf('Could not read file: %s', $fileName));
}
} Again, this used to work just fine a while back. Any pointers? |
Show me your phpstan.neon and how you run PHPStan on the command line. |
My phpstan.neon :
We're running phpstan in Docker and we have a bash script which calls it, here's the meaningful part:
|
Please also open this issue until we're sure what exactly is causing the problem, otherwise this will get lost in the list of closed issues. |
Can you try to delete files from your codebase until this problem is no longer happening? Of course you need to keep the file where |
Unfortunately i cannot do that, we're talking here about a huge project. However, i tried to downgrade PHPStan, and version |
Please try the current dev-master, I tried something: phpstan/phpstan-src@d0a9aa1 |
There you go:
And the result:
|
Yeah, sorry about that. Please try the new dev-master ( |
I also removed the Thank you for fixing this, i really appreciate it. Thank you once again. |
OK, cool :) |
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. |
Bug report
We're using PHPStan 0.12.14 and this issue appeared recently, basically PHPStan errors out with hundred of errors like:
And we cannot find out what exactly is causing it, if you take a look bellow, 'callout' is just one of the array keys. Why PHPStan picks that one in particular, i have no idea.
Code snippet that reproduces the problem
Expected output
We're expecting PHPStan to show no error, at least not an error related to loading a file based on a defined array key.
The text was updated successfully, but these errors were encountered: