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

Invalid version specification for tools does not raise an error #734

Closed
3 of 5 tasks
driskell opened this issue May 25, 2023 · 3 comments
Closed
3 of 5 tasks

Invalid version specification for tools does not raise an error #734

driskell opened this issue May 25, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@driskell
Copy link

driskell commented May 25, 2023

Describe the bug
When specifying composer:'2.4' it will still install 2.5.7 and not complain (the quotes make the version invalid I think)

Version

  • I have checked releases, and the bug exists in the latest patch version of v1 or v2.
  • v2
  • v1

Runners

  • GitHub Hosted
  • Self Hosted

Operating systems

PHP versions

8.1

To Reproduce

- name: Setup PHP with composer v2
  uses: shivammathur/setup-php@v2
  with:
    php-version: '8.1'
    tools: composer:'2.4'

Expected behavior

Report invalid version (or install 2.4)

Screenshots/Logs

Run shivammathur/setup-php@v2
  with:
    php-version: 8.1
    tools: composer:'2.4'
    ini-file: production
/usr/bin/bash /home/runner/work/_actions/shivammathur/setup-php/v2/src/scripts/run.sh

==> Setup PHP
✓ PHP Updated to PHP 8.1.18

==> Setup Tools
✓ composer Added composer 2.5.7

==> #StandWithUkraine
✓ read-more https://setup-php.com/support-ukraine

Additional context

Are you willing to submit a PR?

@driskell driskell added the bug Something isn't working label May 25, 2023
@driskell
Copy link
Author

Hehehehehe 😆

composer:2.4 works
composer:'2.4' does not and I am kicking myself I didn't spot it earlier

But this does raise the issue that it seems the version number is not validation.

@driskell driskell changed the title Unable to install minor version of composer Invalid version specification for tools does not raise an error May 25, 2023
@shivammathur
Copy link
Owner

shivammathur commented Jun 12, 2023

Fixed in 0be6fa1. Will be in the next release

@shivammathur shivammathur added the awaiting-release Added/Fixed and tested, awaiting release label Jun 12, 2023
@shivammathur
Copy link
Owner

@shivammathur shivammathur removed the awaiting-release Added/Fixed and tested, awaiting release label Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants