Closed cjunge-work closed 3 years ago
@ondrejmirtes any chance this could be merged?
Hi, we work with Docker and the composer image. We have the same problem and any though on this PR would be greatly appreciated. Even if it is a big no. By the way, thanks for all the great stuff here !
Hi, I'm not sure about the implications of this, it would need a lot of testing. We'd first need an extensive test suite that would allow us testing this on Linux/Windows using GitHub Actions making sure we didn't break anything.
When looking at the implementation, I already know that this is wrong:
$vendorPos = strpos(__DIR__, 'vendor');
if ($vendorPos === false) {
return;
}
Composer users can change their vendor-dir
using configuration: https://getcomposer.org/doc/06-config.md#vendor-dir
I stand by my comment from #17:
I'm fine if this utility isn't usable by everyone. It can afford to only solve the happy path for its users. The only thing it does is to save typing a few lines in your phpstan.neon.
I plan to tackle this myself, thank you.
Build the GeneratedConfig file using relative paths so PHPStan can be run inside/outside containers/CI, etc.
Fixes #17