You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My project folder contains a folder that is not accecible by phpstan because it doens't have the right permissions.
This folder is added to the exludePahts::analyseAndScan of phpstan.neon:
Hello, why do you have a directory in your project with wrong permissions?
First and foremost, PHPStan would have to have a reason to access the directory for you to have a reason to exclude it - so what happens if you remove the directory from excludePaths? Can you avoid this problem a different way?
It is a cache directory used by the webserver, there is no code in there.
The permissions of files/folders there are owned by www-data
However all checked code is owned by my user.
It should be possible to only include paths that are not the cache directory.
However, that doesn't solve my expectation that the crawler doesn't explore folders it doesn't need for analysis.
Hard to say without the rest of phpstan.neon what are you trying to achieve. You can write your paths and scanDirectories in a way that .../excluded_folder/ is completely avoided.
Activity
mergeable commentedon Jun 24, 2022
This bug report is missing a link to reproduction at phpstan.org/try.
It will most likely be closed after manual review.
ondrejmirtes commentedon Jun 24, 2022
Hello, why do you have a directory in your project with wrong permissions?
First and foremost, PHPStan would have to have a reason to access the directory for you to have a reason to exclude it - so what happens if you remove the directory from
excludePaths? Can you avoid this problem a different way?spaanse commentedon Jun 24, 2022
It is a cache directory used by the webserver, there is no code in there.
The permissions of files/folders there are owned by
www-dataHowever all checked code is owned by my user.
It should be possible to only include paths that are not the cache directory.
However, that doesn't solve my expectation that the crawler doesn't explore folders it doesn't need for analysis.
ondrejmirtes commentedon Jun 24, 2022
Hard to say without the rest of phpstan.neon what are you trying to achieve. You can write your
pathsandscanDirectoriesin a way that.../excluded_folder/is completely avoided.github-actions commentedon Oct 23, 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.