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

Composer Installer does not allow specifying LTS version #10682

Closed
Brandon0 opened this issue Mar 31, 2022 · 6 comments
Closed

Composer Installer does not allow specifying LTS version #10682

Brandon0 opened this issue Mar 31, 2022 · 6 comments
Labels
Milestone

Comments

@Brandon0
Copy link

With the newest 2.3.X releases breaking on systems running older PHP versions, it would be nice to be able to programmatically install the latest LTS release. Using the installer tool provided, when I run this command:

php installer.php --version=2.2.x

I get the following output:

The defined install version (2.2.x) does not match release pattern.

And I expected this to happen:
The latest 2.2.X LTS version to be installed (currently 2.2.10).

Using the latest installer tool:

❯ php -r "echo hash_file('sha384', 'installer.php') . PHP_EOL;"
906a84df04cea2aa72f40b5f787e49f22d4c2f19492ac310e8cba5b96ac8b64115ac402c8cd292b8a03482574915d1a8

Current workaround is to pin composer to the 2.2.10 version specifically.

@jrfnl
Copy link
Contributor

jrfnl commented Apr 1, 2022

Just came here to nearly exactly the same issue.

Would be great if the self-update command would either accept 2.2 as a version and get the latest in the 2.2.x series or if there would be a --2lts option or something like it.

@Seldaek
Copy link
Member

Seldaek commented Apr 1, 2022

Yes I plan to add a --2.2 flag to both installer and self-update.

@jrfnl
Copy link
Contributor

jrfnl commented Apr 1, 2022

@Seldaek I knew you were awesome and you just confirmed it once again 💗

Seldaek added a commit to composer/getcomposer.org that referenced this issue Apr 1, 2022
@Seldaek Seldaek added this to the 2.2 milestone Apr 1, 2022
@Seldaek Seldaek added the Feature label Apr 1, 2022
@Seldaek
Copy link
Member

Seldaek commented Apr 1, 2022

Fixed for self-update in 956d44c - available as of 2.2.11 / 2.3.3.

I'll tackle the installer script some other time.

@jrfnl
Copy link
Contributor

jrfnl commented Apr 1, 2022

Much appreciated!

@Seldaek
Copy link
Member

Seldaek commented Apr 29, 2022

OK now the installer script finally has --2.2 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants