Closed samsonasik closed 2 years ago
@samsonasik Thanks for reporting this. I'll have a look, but this may be more of a Composer issue....
Just out of interest: why are you using create-project
to set up PHP Parallel Lint in the workflow ?
When I look at this, my first instinct would be to change that to using the Phar file via tools: parallel-lint
in the setup-php
step.
Other viable alternatives would be to use composer global install...
or even downloading the Phar file directly.
@samsonasik Okay, I've had a look and I can reproduce the behaviour.
Analysis:
create-project
is "dist"..gitattributes
file, the tests for this project are not included in the distribution archives, which is how you end up with the "missing /tests/
directory" failure.Note: the create-project
command is more for bootstrapping a new project than for using an existing project, so it's not really the best command to use for what you're doing.
Having said that, if you want to keep using create-project
instead of the alternatives I've mentioned above in my previous comment, there are (at least) two ways to prevent the issue and still get a running copy of PHP Parallel Lint:
--no-dev
to the command.
This should be the preferred option as you don't need the dev
dependencies from this package.--prefer-source
or --prefer-install=auto
to the command.
This will get you a complete clone of the project, which includes the tests
directory.I've tested both commands and can confirm that using either option would fix your problem.
Does that help ?
Thank you @jrfnl , it seems with --no-dev
seems make it works 👍 , I created PR https://github.com/php-parallel-lint/PHP-Parallel-Lint/pull/99 to update the readme for it.
Thank for such a quick fix. This broke on our CI and I had no idea what happened.
Good job :+1:
@TomasVotruba You're welcome and for the future, you may still want to consider switching to using the PHAR file via tools
in setup-php
.
@jrfnl PHARs proven to be very bad for debugging. Composer packages are much easier to work with.
with latest version 1.3.2, it cause error:
1.3.1 seems working ok, ref https://github.com/rectorphp/rector-src/runs/5275779357?check_suite_focus=true#step:13:39