Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support specific composer version pinning #77

Merged
merged 1 commit into from
Apr 6, 2022
Merged

feat: support specific composer version pinning #77

merged 1 commit into from
Apr 6, 2022

Conversation

gsdevme
Copy link
Contributor

@gsdevme gsdevme commented Mar 31, 2022

Seems like Composer 2.3 has dropped support for PHP 7.1, therefore now when using this action on a 7.1 project it needs to be composer 2.2 (LTS)

version - Choose which version of Composer you want to use (1 or 2)

phar_url="https://getcomposer.org"
if [ "$ACTION_VERSION" == "latest" ]
then
	phar_url="${phar_url}/composer-stable.phar"
else
	phar_url="${phar_url}/composer-${ACTION_VERSION}.phar"
fi

Problem the current locations are not the download locations, to allow for the LTS to be downloaded it seems the urls need to be changed so the follow combinations can be made.

https://getcomposer.org/download/latest-2.2.x/composer.phar
https://getcomposer.org/download/latest-2.x/composer.phar
https://getcomposer.org/download/latest-1.x/composer.phar
https://getcomposer.org/download/latest-stable/composer.phar

Given this is changing from 2 and 1 it will likely need a major version (7) release. (if acceptable)

uses: php-actions/composer@v6
uses: php-actions/composer@v7
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming if accepted a v7 would be tagged

@gsdevme
Copy link
Contributor Author

gsdevme commented Apr 1, 2022

Let me know if there is anything else Im missing here @g105b if you have time to review.

@g105b
Copy link
Member

g105b commented Apr 1, 2022

Hey @gsdevme , this looks great, thanks! I hadn't noticed that the support was dropped. I'll give this a test on https://github.com/php-actions/example-composer later and get this merged if all goes well.

@gsdevme
Copy link
Contributor Author

gsdevme commented Apr 6, 2022

I've given it at a test on our pipeline usage in a matrix build and its resolved the issue Im seeing 👍

The issue

Screenshot 2022-04-06 at 11 08 54

Using forked version for anyone else who sees the issue for now.

Screenshot 2022-04-06 at 11 08 21

@g105b
Copy link
Member

g105b commented Apr 6, 2022

Great, thanks so much for this. I'll make a v7 release soon.

@g105b g105b merged commit 07d9028 into php-actions:master Apr 6, 2022
@gsdevme gsdevme deleted the feat_support_specific_version_pinning branch April 6, 2022 17:57
@gsdevme gsdevme restored the feat_support_specific_version_pinning branch April 8, 2022 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants