Closed Un1matr1x closed 2 years ago
Hi, it looks like the original php-actions/composer install script uses a URL scheme that isn't supported for those version numbers, so will need updating to match the URL pattern used at getcomposer.org.
The script in question downloads the phar file:
https://github.com/php-actions/composer/blob/master/composer-action.bash#L7-L15
It seems the URL scheme should actually look like this:
I'll update this functionality in the week, unless somebody supplies a PR earlier.
Hi,
thanks for taking a look into it. Since I'm unsure how to change the bash-code in a nice way (without many ugly elseifs) I'm not going to write a patch for this.
If you change the code, you might also want to support more/all options from https://getcomposer.org/download/ ?
Good idea, I'll definitely mention this in the docs.
any updates on this topic?
Hey @Un1matr1x, sorry it's been so long but I've finally got around to this issue.
Please see https://github.com/php-actions/example-composer/runs/8196183608 for the current WIP tests. You can click through the various workflow steps that each request a different version using the version
parameter, and if you open up the output of each workflow, you'll see the precise version is properly getting loaded.
I think running so many tests at once from the same IP has timed something out, so I'll look into that next, but it's looking positive so far. it just needed a few minutes to run completely :)
So, thank you @Un1matr1x - your bash skills have worked first time.
Seeing as the issue has been open for a while now, is there anything else you think would help?
If not, I will merge this in. Thank you so much for your contribution!
lgtm & I have no further ideas
I tried to define the composer version as described here in the readme file.
If I only define the major-version the workflow file looks like this
and the workflow passes
if I change the version to 2.2, 2.x or "2.2" they all fail.
The failed workflows can be seen below and the debug logs are also preserved in a private gist
Version | Workflow | Logs 2.2 | failed | log 2.x | failed | log "2.2" | failed | log
What am I doing wrong?