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

PHP version 8.3 is not supported yet #58

Open
astronati opened this issue Feb 15, 2024 · 6 comments
Open

PHP version 8.3 is not supported yet #58

astronati opened this issue Feb 15, 2024 · 6 comments

Comments

@astronati
Copy link

No description provided.

@g105b
Copy link
Member

g105b commented Feb 15, 2024

Hi, I'll look into this because it should automatically support all PHP versions that have been officially released on docker hub.

Leave it with me and I'll make sure 8.3 is up and running.

@g105b
Copy link
Member

g105b commented Feb 20, 2024

Hi, please see the example PHPUnit repository. I've added a workflow specifically targetting PHP 8.3:

https://github.com/php-actions/example-phpunit/actions/runs/7971809939/job/21762271183 here's the test passing

Here's the workflow file:

https://github.com/php-actions/example-phpunit/blob/c3497b9146c506b7b695a07af467f80cb116ba6e/.github/workflows/ci-latest.yml#L20

name: CI-latest

on: [push]

jobs:
  build-test:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3

      - uses: php-actions/composer@v6

      - name: PHPUnit Tests
        uses: php-actions/phpunit@master
        env:
          TEST_NAME: Scarlett
        with:
          version: 9.6
          php_version: 8.3
          bootstrap: vendor/autoload.php
          configuration: test/phpunit.xml
          args: --coverage-text

@astronati
Copy link
Author

astronati commented Feb 20, 2024

Hi @g105b, following your example I've added this:

    name: PHPUnit Tests
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: php-actions/composer@v6
        with:
          php_version: 8.3
          memory_limit: -1
          php_extensions: intl zip gd
      - uses: php-actions/phpunit@master
        with:
          version: 9.6
          php_version: 8.3
          bootstrap: vendor/autoload.php
          args: --coverage-text

      - name: Run PHPUnit Tests
        run: php bin/phpunit --stop-on-failure

but I obtain following error:

Screenshot 2024-02-20 at 20 38 06

Any suggestion? 🙏

@g105b
Copy link
Member

g105b commented Feb 21, 2024

Hi @astronati , yes I think you're running into a common misconception, and highlighting that I've got to do a better job at documenting this.

It looks like you're running PHPUnit within the Actions container in this step:

- uses: php-actions/phpunit@master

but then you're trying to run PHPUnit again using the build runner's native PHP version with run: php bin/phpunit --stop-on-failure

I believe the second step is unnecessary, and if you look in your Actions log at the previous step, you'll see a running PHPUnit.

As an explanation:

For efficiency, concurrency, and truly isolating workflows, the php-actions Github Actions have been built to work using Composite Docker containers. This allows you to run them locally too if desired, as once they're containerised, the whole environment is portable.

This comes with the side effect of not actually affecting the build runner's environment at all. So any version of PHP that is on the build runner is purely coincidental, and nothing to do with your previous steps (Ubuntu ships with PHP version 8.1.2-1ubuntu.2.14, for example).

@astronati
Copy link
Author

Hi @g105b it seems I have reached a step ahead, but then I'm having an issue. Why does step exit with a non zero code?

Screenshot 2024-03-29 at 18 45 43

@g105b
Copy link
Member

g105b commented Jul 29, 2024

Are you still having an issue with non-zero exit codes? I'm trying to tidy up some issues and I can't replicate this myself, so I'm assuming it was a specific case with your project's files? Happy to help if it's still an issue for you.

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

No branches or pull requests

2 participants