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

Tests: add separate configuration file for PHPUnit 10 #111

Merged
merged 1 commit into from
Apr 1, 2023

Commits on Apr 1, 2023

  1. Tests: add separate configuration file for PHPUnit 10

    The configuration file specification has undergone changes in PHPUnit 9.3 and 10.0.
    
    Most notably:
    * In PHPUnit 9.3, the manner of specifying the code coverage configuration has changed.
    * In PHPUnit 10.0, a significant number of attributes of the `<phpunit>` element were removed or renamed.
    
    While the `--migrate-configuration` command can upgrade a configuration for the changes in the format made in PHPUnit 9.3, some of the changes in the configuration format in PHPUnit 10 don't have one-on-one replacements and/or are not taken into account.
    
    With that in mind, I deem it more appropriate to have a dedicated PHPUnit configuration file for PHPUnit 10 to ensure the test run will behave as intended.
    
    This commit adds this dedicated configuration file for PHPUnit 10+.
    
    Includes:
    * Ignoring the new file for package archives.
    * Allowing for a local override file.
    * Adding scripts to the `composer.json` file to run the tests using this new configuration file.
    * Updating the GH Actions `test` workflow to trigger the tests on PHPUnit 10 with this configuration file.
    
    Take note that the `cacheDirectory` option has been set to the same value as PHPUnit natively already used in PHPUnit 8 and 9, even though this is a different value as is used by default in PHPUnit 10.
    
    Ref:
    * https://github.com/sebastianbergmann/phpunit/blob/main/ChangeLog-10.0.md#1000---2023-02-03
    jrfnl committed Apr 1, 2023
    Configuration menu
    Copy the full SHA
    a361745 View commit details
    Browse the repository at this point in the history