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

Upgrade PHPUnit to v11 #217

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

jonkerw85
Copy link
Contributor

@jonkerw85 jonkerw85 commented Mar 18, 2025

Description:
This pull request updates PHPUnit from ^8.2 to ^11.0. It adds missing : void return type declarations for test methods and updates the visibility of setUp() methods to protected in line with PHPUnit best practices. The upgrade from version 8 to version 10 was done using Laravel Shift. The upgrade to PHPUnit version 11 was done manually, with the only necessary change being renaming the file ToolkitServiceParameterTest to match the class name ProgramParameterTest to resolve a deprecation warning.

Changes:

  • Updated phpunit/phpunit to ^11.0 in composer.json.
  • Added : void return type hints to test methods.
  • Changed setUp() method visibility from public to protected.
  • Renamed ToolkitServiceParameterTest.php to ProgramParameterTest.php for consistency with class name of the file.

laravel-shift and others added 6 commits March 18, 2025 05:59
From the [PHPUnit 8 release notes][1], the `TestCase` methods below now declare a `void` return type:

- `setUpBeforeClass()`
- `setUp()`
- `assertPreConditions()`
- `assertPostConditions()`
- `tearDown()`
- `tearDownAfterClass()`
- `onNotSuccessfulTest()`

[1]: https://phpunit.de/announcements/phpunit-8.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants