-
Notifications
You must be signed in to change notification settings - Fork 27
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
Do not use absolute paths for storing found plugins #17
Comments
I'm having the same issue, so I would be happy to implement the fix if somebody will help me with details. |
Hi, 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'm not comfortable with including relative paths. So unless someone comes up with a safe solution, this will remain open. |
Hi, would using something like the below be acceptable, so it's using paths relative to 'install_path' => __DIR__ . '/../../../phpstan/phpstan-phpunit', |
@zorac I've created a PR to implement your suggestion. I based it on the vendor dir, though. Any thoughts appreciated! |
I know we are in a specific case, but for people having this issue when
@ondrejmirtes told us to modify the composer vendor path (#23 (comment)), but the simplest solution for us was to update the volume mount. So make sure your composer container working-dir is the same as your php container working dir : our docker-compose example :
This conf allowed us to use the extension-installer without anything else. |
ugh, I'd been working around this but just updated phpstorm today and it detects phpstan and its errors for days everytime anything changes and it rechecks the config... what do we need to fix this? |
@neclimdul Not sure if it's related to this issue, but I'd need more details, your description isn't sufficient. |
its the same. development happens in container(lando) and phpstorm happens locally. paths are different. |
Same as @neclimdul, our services run in containers but PHPStan integration with PhpStorm runs locally, and the integration is so nice, it's difficult to live without. Right now I'm editing |
Alright, so I fixed it in a straightforward way: 66c7adc You'll be able to use it if you meet these dependencies:
Thanks everyone :) |
Alright, PHPStan 0.12.62 is out! Starting with |
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. |
The usage of absolute paths causes issues when the execution context of the project changes, e.g. when mounting into a container or simply moving the project directory.
Examples of breakage: #5 phpstan/phpstan#2269
Let's explore ways to work around that issue. I think the installation target of the PHPStan binary inside of
vendor
should be deterministic, can we just use a path relative to that?The text was updated successfully, but these errors were encountered: