psalm / psalm-plugin-wordpress

WordPress stubs and plugin for Psalm
MIT License
69 stars 18 forks source link

Fix not finding vendor paths, closes #9 #10

Closed ktomk closed 3 years ago

ktomk commented 3 years ago

Previously paths to dependencies were resolved against the current working directory and the plugin crashed early if the current working directory is different.

This has been tested against a scenario where psalm is available as tools/psalm in the project and the composer.json lies within the tools/ folder.

I had problems to get the tests in the project successfully running, this was tested within the real project that caused the fatal error (for project tests, see #11, wanted to have this PR for the fix alone).

NOTE: The directory paths have been kept as long as possible for the better. There are problems that remain, left for a future commit:

ktomk commented 3 years ago

Thanks for having me @joehoyle and looking forward the next release (no hurry please, currently operating from my fork and all is fine).