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

Bug: Unable to install tools specific versions #899

Open
1 of 2 tasks
deguif opened this issue Jan 8, 2025 · 5 comments
Open
1 of 2 tasks

Bug: Unable to install tools specific versions #899

deguif opened this issue Jan 8, 2025 · 5 comments
Assignees
Labels
awaiting-release Added/Fixed and tested, awaiting release bug Something isn't working

Comments

@deguif
Copy link
Contributor

deguif commented Jan 8, 2025

Describe the bug

When a version is specified on a tool to add during the install, the install script doesn't seem to take the version into account.

Version

  • v2
  • v1

Runners

GitHub Hosted

Operating systems

Ubuntu24.04

PHP versions

PHP 8.4

To Reproduce

          - name: 'Setup PHP'
             uses: 'shivammathur/setup-php@v2'
             with:
                 php-version: '8.4'
                 coverage: 'none'
                 extensions: 'json, mbstring, tokenizer'
                 tools: 'composer-normalize:2.28.3, php-cs-fixer:3.66.2'

Expected behavior

The tools below should have been installed with the specified version :

  • composer-normalize in 2.28.3
  • php-cs-fixer in 3.66.2

Screenshots/Logs

Run shivammathur/setup-php@v2
  with:
    php-version: 8.4
    coverage: none
    extensions: json, mbstring, tokenizer
    tools: composer-normalize:2.28.3, php-cs-fixer:3.66.2
    ini-file: production
/usr/bin/bash /home/runner/work/_actions/shivammathur/setup-php/v2/src/scripts/run.sh

==> Setup PHP
✓ PHP Installed PHP 8.4

==> Setup Extensions
✓ json Enabled
✓ mbstring Enabled
✓ tokenizer Enabled

==> Setup Tools
✓ composer Added composer 2.8.4
✓ composer-normalize Added composer-normalize 2.3.9
✓ php-cs-fixer Added php-cs-fixer 

==> Setup Coverage
✓ none Disabled Xdebug and PCOV

==> Sponsor setup-php
✓ setup-php https://setup-php.com/sponsor

Additional context

No response

Are you willing to submit a PR?

No

@deguif deguif added the bug Something isn't working label Jan 8, 2025
@shivammathur
Copy link
Owner

@deguif
That version is not supported on PHP 8.4.
https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/v3.66.2/php-cs-fixer#L38

setup-php installs it correctly, but when checking the version, it errors out for PHP 8.4, So, once we have a php-cs-fixer version with that updated to support PHP 8.4, it will start showing the version correctly in the logs.

You can follow this PR for the progress

@deguif
Copy link
Contributor Author

deguif commented Jan 8, 2025

Thanks @shivammathur
I don't know why but the version installed is not displayed during the setup. Edit (I just understood what you mean).
There is another issue with the composer-normalize which is not installed in the right version.

@shivammathur shivammathur reopened this Jan 8, 2025
@shivammathur
Copy link
Owner

composer-normalize is also installed correctly, but not picking the correct version in the log as -V parameter shows the composer version it was built against rather than tool version.

This is fixed in 196b96b, will be in the next release.

@shivammathur shivammathur added the awaiting-release Added/Fixed and tested, awaiting release label Jan 8, 2025
@deguif
Copy link
Contributor Author

deguif commented Jan 8, 2025

Thanks @shivammathur for the quick fix and the explanations

@OskarStark
Copy link

composer-normalize is also installed correctly, but not picking the correct version in the log as -V parameter shows the composer version it was built against rather than tool version.

@localheinz is this sth which should be fixed? I would also expect the version of the tool, not the compiled against composer version

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

No branches or pull requests

3 participants