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 8.2 build seems out of date or something? #605

Closed
2 of 5 tasks
come-nc opened this issue Jun 14, 2022 · 3 comments
Closed
2 of 5 tasks

PHP 8.2 build seems out of date or something? #605

come-nc opened this issue Jun 14, 2022 · 3 comments
Assignees
Labels
workflow-edit Issue can be fixed by editing the GitHub Action workflow

Comments

@come-nc
Copy link

come-nc commented Jun 14, 2022

Describe the bug

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-latest

PHP versions

8.2

To Reproduce

      - name: Set up php ${{ matrix.php-versions }}
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-versions }}
          tools: phpunit
          extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, gd
          coverage: none

      - name: PHPUnit
        working-directory: tests
        run: phpunit --configuration phpunit-autotest.xml

Expected behavior

I should get the same errors as when running phpunit locally with php 8.2 built from git, especially a lot of errors and warnings about Using ${var} in strings is deprecated, use {$var} instead at and Creation of dynamic property Class::$property is deprecated at.

Screenshots/Logs

I get almost no more errors than with php 8.1.

Additional context

How is the PHP 8.2 nightly built? Is it from master branch?

Are you willing to submit a PR?

@come-nc come-nc added the bug Something isn't working label Jun 14, 2022
@jrfnl
Copy link
Contributor

jrfnl commented Jun 14, 2022

@come-nc This looks like basically a duplicate of #469 where I asked the same regarding PHP 8.1.

The short of it is that the default php.ini is the production ini file and that if you want to see deprecations, you need to either set the ini-file option to develop or set (a variation of) the following ini-values: zend.assertions=1, error_reporting=-1, display_errors=On.

Hope this helps ;-)

@jrfnl
Copy link
Contributor

jrfnl commented Jun 14, 2022

Oh and before I forget: also make sure you have convertDeprecationsToExceptions="true" set in your phpunit.xml.dist file as the default value for that attribute was changed to false in PHPUnit 9.5.10, which means that builds won't fail on deprecations anymore.

@come-nc
Copy link
Author

come-nc commented Jun 14, 2022

That was it, thank you very much!

So to fix it just add:
ini-file: development

@come-nc come-nc closed this as completed Jun 14, 2022
@shivammathur shivammathur added workflow-edit Issue can be fixed by editing the GitHub Action workflow and removed bug Something isn't working labels Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
workflow-edit Issue can be fixed by editing the GitHub Action workflow
Projects
None yet
Development

No branches or pull requests

3 participants