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

phpunit 404: Not found with v2.25.3 #743

Closed
3 of 5 tasks
blizzz opened this issue Jun 12, 2023 · 6 comments
Closed
3 of 5 tasks

phpunit 404: Not found with v2.25.3 #743

blizzz opened this issue Jun 12, 2023 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@blizzz
Copy link

blizzz commented Jun 12, 2023

Describe the bug

With today's v2.25.3 the installation of phpunit:9 fails. Going back to 2.25.2 has it succeeding.

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
Ubuntu-20.04

PHP versions
8.0, 8.1, 8.2

To Reproduce

name: PHPUnit foobar

on: pull_request

permissions:
  contents: read

concurrency:
  group: phpunit-foobar-${{ github.head_ref || github.run_id }}
  cancel-in-progress: true

jobs:
  phpunit-foobar:
    runs-on: ubuntu-20.04

    strategy:
      matrix:
        php-versions: ['8.0', '8.1', '8.2']

    steps:
      - name: Checkout server
        uses: actions/checkout@v3
        with:
          submodules: true

      - name: Set up php ${{ matrix.php-versions }}
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-versions }}
          extensions: ctype, curl, dom, fileinfo, gd, imagick, intl, json, mbstring, oci8, openssl, pcntl, pdo_sqlite, posix, sqlite, xml, zip
          tools: phpunit:9
          coverage: none
          ini-file: development
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expected behavior

In the Set Up PHP 8.x step we expect phpunit to be added correctly, like:

✓ phpunit Added phpunit 9.6.9

Screenshots/Logs

Screenshot_20230612_201624

Additional context

When we use setup-php/setup-php@c5fc0d8 (2.25.2) we get the expected behaviour.

Are you willing to submit a PR?
Not familiar with typescript or writing actions :(

@blizzz blizzz added the bug Something isn't working label Jun 12, 2023
@gman-wa
Copy link

gman-wa commented Jun 12, 2023

change

tools: phpunit:9

to

tools: phpunit

it will pull the correct version of phpunit for the version of php you are running per the commit last night

4630172

the readme here needs to be updated.

@blizzz
Copy link
Author

blizzz commented Jun 12, 2023

change

tools: phpunit:9

to

tools: phpunit

it will pull the correct version of phpunit for the version of php you are running per the commit last night

4630172

the readme here needs to be updated.

I am doubtful this is the intention. The version, if specified, is still taken into consideration. And fetching https://phar.phpunit.de/phpunit-9.phar, for instance, would always redirect to the latest phpunit v9 release phar.

And when going through the code it actually looks all right, but the "404: Not Found" is a result from the fetch. My guess is somehow somewhere the destination url is composed wrongly, alas I could not figure out where so far.

@SystemKeeper
Copy link

Requested URL: https://api.github.com/repos/phpunit/phpunit/git/matching-refs/tags%2F9. -> results in 404
Probably should be: https://api.github.com/repos/sebastianbergmann/phpunit/git/matching-refs/tags%2F9. ? At least that works.

@blizzz
Copy link
Author

blizzz commented Jun 12, 2023

Requested URL: https://api.github.com/repos/phpunit/phpunit/git/matching-refs/tags%2F9. -> results in 404 Probably should be: https://api.github.com/repos/sebastianbergmann/phpunit/git/matching-refs/tags%2F9. ? At least that works.

Aye, the repository was changed in that commit, this fits.

@shivammathur
Copy link
Owner

@blizzz @SystemKeeper @gman-wa
Sorry for the regression.

Fixed in 2.25.4

@blizzz
Copy link
Author

blizzz commented Jun 13, 2023

No worries, thank you for the quick fix @shivammathur :)

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

4 participants