Skip to content

compat: upgrade to PHPUnit 13 and migrate tests - #922

Merged
shyim merged 3 commits into
mainfrom
chore/phpunit13-compatibility
Nov 2, 2026
Merged

shyim merged 3 commits into
mainfrom
chore/phpunit13-compatibility

Conversation

@shyim

@shyim shyim commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Upgrade PHPUnit from 11.5 to 13.4, incorporating the PHPUnit update proposed in #921. Keep Symfony component constraints at ^8.0 to allow all stable Symfony 8 releases.

Migrate deprecated expectExceptionMessage() calls to expectExceptionMessageIsOrContains() and use static::createStub() for test doubles without invocation expectations. Preserve mocks that verify method calls. This resolves the PHPStan deprecation errors, the nested PHPStan rule test failure, and PHPUnit notices introduced by the upgrade.

Validation:

  • PHPUnit 13.4.6: 105 tests and 332 assertions pass on PHP 8.4.27 and 8.5.12, with notices and deprecations treated as failures (coverage disabled locally).
  • PHPStan passes.
  • PHP-CS-Fixer dry run, Composer validation, and Git whitespace checks pass.

This PR includes the updates from #921 on a separate branch; the Dependabot branch is unchanged.

dependabot Bot and others added 3 commits November 2, 2026 07:23
Updates the requirements on [symfony/console](https://github.com/symfony/console), [symfony/dependency-injection](https://github.com/symfony/dependency-injection), [symfony/filesystem](https://github.com/symfony/filesystem), [symfony/process](https://github.com/symfony/process), [symfony/config](https://github.com/symfony/config), [symfony/http-client](https://github.com/symfony/http-client), [symfony/finder](https://github.com/symfony/finder) and [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) to permit the latest version.

Updates `symfony/console` to 8.1.10
- [Release notes](https://github.com/symfony/console/releases)
- [Changelog](https://github.com/symfony/console/blob/8.2/CHANGELOG.md)
- [Commits](symfony/console@v8.0.0...v8.1.10)

Updates `symfony/dependency-injection` to 8.1.10
- [Release notes](https://github.com/symfony/dependency-injection/releases)
- [Changelog](https://github.com/symfony/dependency-injection/blob/8.2/CHANGELOG.md)
- [Commits](symfony/dependency-injection@v8.0.0...v8.1.10)

Updates `symfony/filesystem` to 8.1.9
- [Release notes](https://github.com/symfony/filesystem/releases)
- [Changelog](https://github.com/symfony/filesystem/blob/8.2/CHANGELOG.md)
- [Commits](symfony/filesystem@v8.0.0...v8.1.9)

Updates `symfony/process` to 8.1.10
- [Release notes](https://github.com/symfony/process/releases)
- [Changelog](https://github.com/symfony/process/blob/8.2/CHANGELOG.md)
- [Commits](symfony/process@v8.0.0...v8.1.10)

Updates `symfony/config` to 8.1.10
- [Release notes](https://github.com/symfony/config/releases)
- [Changelog](https://github.com/symfony/config/blob/8.2/CHANGELOG.md)
- [Commits](symfony/config@v8.0.0...v8.1.10)

Updates `symfony/http-client` to 8.1.10
- [Release notes](https://github.com/symfony/http-client/releases)
- [Changelog](https://github.com/symfony/http-client/blob/8.2/CHANGELOG.md)
- [Commits](symfony/http-client@v8.0.0...v8.1.10)

Updates `symfony/finder` to 8.1.10
- [Release notes](https://github.com/symfony/finder/releases)
- [Changelog](https://github.com/symfony/finder/blob/8.2/CHANGELOG.md)
- [Commits](symfony/finder@v8.0.0...v8.1.10)

Updates `phpunit/phpunit` to 13.4.5
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/13.4.5/ChangeLog-13.4.md)
- [Commits](sebastianbergmann/phpunit@11.5.0...13.4.5)

---
updated-dependencies:
- dependency-name: symfony/console
  dependency-version: 8.1.10
  dependency-type: direct:production
  dependency-group: dependencies
- dependency-name: symfony/dependency-injection
  dependency-version: 8.1.10
  dependency-type: direct:production
  dependency-group: dependencies
- dependency-name: symfony/filesystem
  dependency-version: 8.1.9
  dependency-type: direct:production
  dependency-group: dependencies
- dependency-name: symfony/process
  dependency-version: 8.1.10
  dependency-type: direct:production
  dependency-group: dependencies
- dependency-name: symfony/config
  dependency-version: 8.1.10
  dependency-type: direct:production
  dependency-group: dependencies
- dependency-name: symfony/http-client
  dependency-version: 8.1.10
  dependency-type: direct:production
  dependency-group: dependencies
- dependency-name: symfony/finder
  dependency-version: 8.1.10
  dependency-type: direct:production
  dependency-group: dependencies
- dependency-name: phpunit/phpunit
  dependency-version: 13.4.5
  dependency-type: direct:development
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
@shyim
shyim merged commit d3e4913 into main Nov 2, 2026
5 checks passed
@shyim
shyim deleted the chore/phpunit13-compatibility branch November 2, 2026 07:49
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.

1 participant