Bug report
I use the following syntax to include files:
require __DIR__.DIRECTORY_SEPARATOR.'bootstrap.php';
After upgrading from 2.2.2 to 2.2.3, I get this phpstan error:
8 Path in require() __DIR__ . \DIRECTORY_SEPARATOR . 'bootstrap.php' is
not a file or it does not exist.
🪪 require.fileNotFound
This error only occurs on Linux, not on Windows.
require errors are hard to reproduce on the playground because there no files exist.
I created a PR with a modified test on phpstan/phpstan-src#6027 to demonstrate the problem. From the error message there is seems that on Linux DIRECTORY_SEPARATOR is a backslash.
I don't know why my version shows DIRECTORY_SEPARATOR in the error message and the test results of the PR show the resolved path.
Code snippet that reproduces the problem
phpstan/phpstan-src#6027
Expected output
No errors.
Did PHPStan help you today? Did it make you happy in any way?
PHPStan is a life saver.
Bug report
I use the following syntax to include files:
After upgrading from 2.2.2 to 2.2.3, I get this phpstan error:
This error only occurs on Linux, not on Windows.
requireerrors are hard to reproduce on the playground because there no files exist.I created a PR with a modified test on phpstan/phpstan-src#6027 to demonstrate the problem. From the error message there is seems that on Linux
DIRECTORY_SEPARATORis a backslash.I don't know why my version shows
DIRECTORY_SEPARATORin the error message and the test results of the PR show the resolved path.Code snippet that reproduces the problem
phpstan/phpstan-src#6027
Expected output
No errors.
Did PHPStan help you today? Did it make you happy in any way?
PHPStan is a life saver.