Skip to content

Update PHPUnit to v11, raise PHP version to 8.2, and update Symfony support - #95

Merged
bmack merged 5 commits into
mainfrom
pr/update-dependencies
Aug 1, 2026
Merged

Update PHPUnit to v11, raise PHP version to 8.2, and update Symfony support#95
bmack merged 5 commits into
mainfrom
pr/update-dependencies

Conversation

@bmack

@bmack bmack commented Aug 1, 2026

Copy link
Copy Markdown
Member

This pull request updates the project to require PHP 8.2 or higher and modernizes dependencies and test code. The main changes include raising the minimum PHP version, updating Symfony and PHPUnit dependencies, and refactoring test annotations to use PHP attributes.

Dependency and environment updates:

  • Increased the minimum required PHP version to 8.2 in composer.json, and updated the supported Symfony package versions to ^6.4 || ^7.4 || ^8.0 (composer.json).
  • Updated the PHPUnit dependency to ^11.5 and the coding standards package to ^0.9 in composer.json.
  • The GitHub Actions workflow in .github/workflows/tests.yml now only tests against PHP 8.2 and above, dropping support for older PHP versions.
  • Updated the PHP version in the README.md CI example to 8.2.
  • Updated phpunit.xml.dist to use the PHPUnit 11.5 schema and added a cache directory.

Test modernization:

Code quality and compatibility:

  • Changed the visibility of getBaseUri() in HttpClientFactory from protected to private to better encapsulate the method.
  • Made minor improvements to test utility methods, such as making the data provider static [1] and removing deprecated code [2].

These changes ensure the codebase is compatible with modern PHP and Symfony versions, improves test reliability and readability, and removes support for legacy PHP versions.

bmack added 4 commits August 1, 2026 09:09
Requires PHPUnit ^11.5 as the only supported version, dropping
PHPUnit 8 and 9. Since PHPUnit 11 requires PHP 8.2, the CI test
matrix is reduced to PHP 8.2-8.5. The runtime PHP requirement
for tailor itself remains unchanged.

Along with the update:

* Convert @test/@dataProvider annotations to PHP attributes,
  as doc-comment metadata is deprecated and will be removed
  in PHPUnit 12
* Make data providers static, as required by PHPUnit 10+
* Migrate phpunit.xml.dist to the PHPUnit 11.5 schema and
  use the new cache directory
* Remove ReflectionMethod/ReflectionProperty::setAccessible()
  calls in tests (no-op since PHP 8.1, deprecated in PHP 8.5)
* Fix code style issue raised by updated php-cs-fixer
The PHP requirement is raised from ^7.2 || ^8.0 to ^8.2, matching
the versions actively tested in CI since the update to PHPUnit 11.
The CI workflow example in the README is updated accordingly.
The Symfony constraints are updated from ^5.4 || ^6.4 || ^7.0
to ^6.4 || ^7.4 || ^8.0 for all four used components.

Since Application::add() was replaced by addCommand() in
symfony/console 7.4 and removed in 8.0, the tailor binary now
picks the available method at runtime to stay compatible with
the whole supported version range.

Verified with both the lowest (symfony 6.4.0) and highest
(symfony 8.1) resolvable dependency set.
The dev-main fallback is no longer needed since v0.9.0 supports
current PHP and php-cs-fixer versions. Also applies a coding
style fix to the tailor binary.
@bmack
bmack requested review from eliashaeussler and o-ba August 1, 2026 07:18
Comment thread bin/tailor Outdated
Comment thread phpunit.xml.dist Outdated
Use Application::addCommands(), which exists in all supported
symfony/console versions, and reference the local PHPUnit XSD
to avoid maintaining a versioned schema URL.
@bmack
bmack merged commit 7018df9 into main Aug 1, 2026
10 checks passed
@bmack
bmack deleted the pr/update-dependencies branch August 1, 2026 16:54
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.

2 participants