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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Action erroring out on with incorrect invalid composer.json
report
#206
Comments
FYI: I've got a fix lined up for this, as well as the test for it, I just can't get the test to be recognized by Unfortunately, I'm out of luck with the (otherwise very informative) How would you like me to proceed ? |
Go ahead and push your fix and open the PR for it. I can help with the expect tests. |
Pulled as draft in #213 |
As far as I can see, the `--no-check-lock` argument has been available since Composer 1.0, so adding this argument to the `composer validate` command should be safe and should prevent the issues as reported in #206. Includes tests (though the test isn't running properly yet). Fixes #206 Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
Description
Okay, so this is a "fun" one 馃槙. If I make a simple
--no-update
change ahead of running thecomposer-install
action, it will error out saying thecomposer.json
file is invalid, while in actual fact thecomposer.json
file is perfectly valid, but the (committed)lock
file is out of date (which may be completely intentional).Making a
--no-update
change ahead of running thecomposer-install
action is a common way to ensure the caching done viacomposer-install
is used optimally, while still being able to make select changes depending on the PHP version the workflow is being run on.Steps to reproduce
composer.lock
filecomposer .... --no-update
command or other Composer command which won't runupdate
, likecomposer config --unset platform.php
composer update
via the action and see it fail.composer validate --strict
: it will indicate thecomposer.json
is valid, but thelock
file is out of date.Example code to reproduce the issue: https://github.com/jrfnl/composer-install-action-bug
Action run showing the bug: https://github.com/jrfnl/composer-install-action-bug/actions/runs/1620893221
Expected behavior
That the
composer-install
action doesn't error out on thelock
file being out of date as this may be wholly intentional, especially if a (selective)composer update
is being run via thecomposer-install
action.Environment details
The text was updated successfully, but these errors were encountered: