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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH Actions: various updates #346

Commits on Aug 29, 2022

  1. Configuration menu
    Copy the full SHA
    d1afb64 View commit details
    Browse the repository at this point in the history
  2. GH Actions: enable error reporting

    The default setting for `error_reporting` used by the SetupPHP action is `error_reporting=E_ALL & ~E_DEPRECATED & ~E_STRICT` and `display_errors` is set to `Off`.
    
    For the purposes of CI/test runs, I'd recommend running with `-1` and `display_errors=On` to ensure **all** PHP notices are shown.
    jrfnl committed Aug 29, 2022
    Configuration menu
    Copy the full SHA
    a15a05f View commit details
    Browse the repository at this point in the history
  3. PHPUnit: update configuration

    PHPUnit >= 9.5.10 and >= 8.5.21 contain a particular (IMO breaking) change:
    
    > * PHPUnit no longer converts PHP deprecations to exceptions by default (configure `convertDeprecationsToExceptions="true"` to enable this)
    
    Let's unpack this:
    
    Previously (PHPUnit < 9.5.10/8.5.21), if PHPUnit would encounter a PHP native deprecation notice, it would:
    1. Show a test which causes a deprecation notice to be thrown as **"errored"**,
    2. Show the **first** deprecation notice it encountered and
    3. PHPUnit would exit with a **non-0 exit code** (2), which will fail a CI build.
    
    As of PHPUnit 9.5.10/8.5.21, if PHPUnit encounters a PHP native deprecation notice, it will no longer do so. Instead PHPUnit will:
    1. Show a test which causes a PHP deprecation notice to be thrown as **"risky"**,
    2. Show the **all** deprecation notices it encountered and
    3. PHPUnit will exit with a **0 exit code**, which will show a CI build as passing.
    
    As this repo is generally used in CI by other repos, IMO it is important to fix deprecations _early_ to prevent being the reason for workflows of users of this repo to fail.
    
    This commit reverts PHPUnit to the previous behaviour by adding `convertDeprecationsToExceptions="true"` to the PHPUnit configuration.
    It also adds the other related directives for consistency.
    
    Refs:
    * https://github.com/sebastianbergmann/phpunit/blob/9.5/ChangeLog-8.5.md
    * https://github.com/sebastianbergmann/phpunit/blob/9.5/ChangeLog-9.5.md
    jrfnl committed Aug 29, 2022
    Configuration menu
    Copy the full SHA
    65b5fb6 View commit details
    Browse the repository at this point in the history
  4. GH Actions/CI: run the test suite against PHP 8.1 and PHP 8.2

    I intended to just add a build against PHP 8.2, but realized the tests aren't run against PHP 8.1 yet when looking at the script.
    
    Both the PHP 8.1 test run as well as the PHP 8.2 test run will currently fail. Some of my other open PRs are stepping stones to fix this.
    
    Once those open PRs are merged, there should be just five failures left on PHP 8.1, which I'm leaving for someone else to address.
    As for PHP 8.2: the remaining test failures there look to be mostly related to external dependencies (Prophecy, Symfony/Console). Once those have release PHP 8.2 ready versions, it can be evaluated if there is anything more that needs addressing in this repo.
    jrfnl committed Aug 29, 2022
    Configuration menu
    Copy the full SHA
    27dbb52 View commit details
    Browse the repository at this point in the history
  5. GH Actions: disallow for Symfony/Flex composer plugin

    As discussed in the ticket, as of July 1st 2022, Composer requires explicit permission to be given for Composer plugins to be run when using Composer 2.2+.
    See: https://blog.packagist.com/composer-2-2/#more-secure-plugin-execution
    
    On top of that the website which Symfony Flex tries to access during its install is not responding anymore when using old Flex versions in which those API calls haven't been updated yet.
    Also see: https://symfony.com/blog/upgrade-flex-on-your-symfony-projects
    
    Combining the above two issues and having done some test runs on GH Actions, I've come to the conclusion that not allowing the `symfony/flex` plugin and disabling the running of plugins during the install step solves the problems without any impact on the tests.
    
    So that is what this commit now does.
    jrfnl committed Aug 29, 2022
    Configuration menu
    Copy the full SHA
    91bf834 View commit details
    Browse the repository at this point in the history
  6. Composer: limit allowed PHPUnit 9.x version

    The PHPUnit 8.5.29/9.5.23 patch update removed the dependency on Prophecy, which means that projects using Prophecy now need to require it themselves:
    
    > sebastianbergmann/phpunit 5033: Do not depend on phpspec/prophecy
    
    See: https://github.com/sebastianbergmann/phpunit/blob/main/ChangeLog-9.5.md
    
    This, however, has its own problems, what with the `phpspec/propephy-phpunit` layer not allowing installation with PHPUnit < 9.
    
    So, for now, this limits PHPUnit to a version before the dependency was dropped.
    jrfnl committed Aug 29, 2022
    Configuration menu
    Copy the full SHA
    e645961 View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2022

  1. Configuration menu
    Copy the full SHA
    c5b15f2 View commit details
    Browse the repository at this point in the history