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:
That any of these directories exist might be coincidence.
The vendor/ folder must not be named "vendor", see vendor-dir
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: