psalm / psalm-plugin-laravel

A Psalm plugin for Laravel
MIT License
301 stars 71 forks source link

Improve testing experience #257

Closed alies-dev closed 1 year ago

alies-dev commented 1 year ago

As a new contributor and MacOS user I found few issues:

weirdan commented 1 year ago

tests/laravel-test.sh and tests/lumen-test.sh simply doesn't work on MaxOS: sed: -I or -i may not be used with stdin, fixed by https://github.com/psalm/psalm-plugin-laravel/commit/b3603decc2f72199a977cb85086c496d067a9d63

That's weird. Looking at the script, there are no attempts to use STDIN. And -i is actually needed, otherwise sed won't change the original file.

weirdan commented 1 year ago

codecept are very slow (I have no idea how to solve it ATM, do you have any ideas?)

Unfortunately, there's no easy way around this. These are e2e tests that run psalm cli for every test case. Psalm scans dependencies every time, so time per case is roughly proportional to the size of vendor folder.

alies-dev commented 1 year ago

@weirdan You are right, it doesn't modify composer.json. composer supports cli command like:

composer config repositories.psalm-plugin-laravel '{"type": "path", "url": "../psalm-plugin-laravel"}'

and it works:

image

not sure why it haven't used at the original commit.

I will try to find a time to debug it and fix tomorrow