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

Wrong version of php-cs-fixer installed #485

Closed
1 of 2 tasks
dktapps opened this issue Aug 19, 2021 · 5 comments
Closed
1 of 2 tasks

Wrong version of php-cs-fixer installed #485

dktapps opened this issue Aug 19, 2021 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@dktapps
Copy link

dktapps commented Aug 19, 2021

Describe the bug
It looks like the action always uses the latest release of php-cs-fixer, which isn't always the newest one, since they maintain 2.19 and 3.0 simultaneously.

This leads to php-cs-fixer 3.0-dependent runs breaking spontaneously in the last day or two because the action suddenly started providing 2.19 instead of 3.0, since 2.19.2 is the newest release and not 3.0.2.

Version
2.12.0

Runners

  • GitHub Hosted
  • Self Hosted

Operating systems
ubuntu-20.04

PHP versions
8.0

To Reproduce

Seems this is all that's required: https://github.com/pmmp/PocketMine-MP/blob/stable/.github/workflows/main.yml#L279-L283

Expected behavior
php-cs-fixer 3.0.x should be downloaded since that's what it's been providing for weeks.

Screenshots/Logs
https://github.com/pmmp/PocketMine-MP/runs/3367235033?check_suite_focus=true#step:3:12

Additional context

Are you willing to submit a PR?

@dktapps dktapps added the bug Something isn't working label Aug 19, 2021
@shivammathur
Copy link
Owner

shivammathur commented Aug 19, 2021

@dktapps

Please ask upstream to set 3.0.2 as the latest version in their releases.

Also, you can specify the major version to 3 and specify a GitHub OAuth token with COMPOSER_TOKEN env.
https://github.com/shivammathur/setup-php#wrench-tools-support

- name: Setup PHP and tools
  uses: shivammathur/setup-php@2.12.0
  env:
    COMPOSER_TOKEN: ${{ GITHUB_TOKEN }}
  with:
    php-version: 8.0
    tools: php-cs-fixer:3

If this is not fixed upstream, I will try to find a resolution for this in the next release, but most likely will have to switch to installing php-cs-fixer using composer instead of release phars, which is slower.

@dktapps
Copy link
Author

dktapps commented Aug 19, 2021

I can file the issue, but it's likely a similar problem will crop up again since they regularly release multiple versions simultaneously. It's hard to avoid.

@shivammathur
Copy link
Owner

Fixed in 4d3cfaa, will be in next release.

@shivammathur shivammathur added the awaiting-release Added/Fixed and tested, awaiting release label Aug 20, 2021
@dktapps
Copy link
Author

dktapps commented Aug 20, 2021

Awesome, thank you.

@shivammathur
Copy link
Owner

@shivammathur shivammathur removed the awaiting-release Added/Fixed and tested, awaiting release label Aug 23, 2021
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