yoast/phpunit-polyfills breaking changes
yoast/phpunit-polyfills 4.0.0 (February 9, 2025) is its newest release with breaking changes, 26 of them. The first: Drops support for PHPUnit versions below 7.5.0 in yoast/phpunit-polyfills 4.0.0. Every breaking API change we have recorded in yoast/phpunit-polyfills on Packagist: 46 breaking changes in 3 versions. Below, its 3 versions with breaking changes, newest first, removals and renames first, each with its source.
Updated December 4, 2026
On this page
Latest version 4.0.0, released February 9, 2025. BSD-3-Clause license. Source repository
Its 3.0.0 release requires PHP 7.0 or later. PHP end of life dates.
- From 3.0.0 to 4.0.0: 26 breaking changes in 1 version.
- From 2.0.0 to 4.0.0: 35 breaking changes in 2 versions.
yoast/phpunit-polyfills 4.0.0 breaking changes
- Removed
Support for PHPUnit < 7.5.0 has been removed. Test suites on older PHPUnit versions must upgrade PHPUnit or stay on an earlier release. github.com - Removed
Releases in the 4.x series do not support running tests on PHPUnit 10. Test suites on PHPUnit 10 must use an earlier Polyfills release or upgrade PHPUnit. github.com - Removed
Support for PHP < 7.1 has been removed in this release. Users on those PHP versions must stay on an earlier 3.x release. github.com - Removed
Yoast\PHPUnitPolyfills\Autoload::loadAssertEqualsSpecializations
Yoast\PHPUnitPolyfills\Autoload::loadAssertEqualsSpecializations was removed in yoast/phpunit-polyfills 4.0.0 packagist.org - Removed
Yoast\PHPUnitPolyfills\Autoload::loadAssertIsType
Yoast\PHPUnitPolyfills\Autoload::loadAssertIsType was removed in yoast/phpunit-polyfills 4.0.0 packagist.org - Removed
Yoast\PHPUnitPolyfills\Autoload::loadAssertStringContains
Yoast\PHPUnitPolyfills\Autoload::loadAssertStringContains was removed in yoast/phpunit-polyfills 4.0.0 packagist.org - Removed
Yoast\PHPUnitPolyfills\Polyfills\AssertEqualsSpecializations
The AssertEqualsSpecializations trait has been removed because it is no longer needed now that PHPUnit < 7.5 support is dropped. Stop using this trait in test classes. github.com - Removed
Yoast\PHPUnitPolyfills\Polyfills\AssertIsType
The AssertIsType trait has been removed because it is no longer needed now that PHPUnit < 7.5 support is dropped. Stop using this trait in test classes. github.com - Removed
Yoast\PHPUnitPolyfills\Polyfills\AssertStringContains
The AssertStringContains trait has been removed because it is no longer needed now that PHPUnit < 7.5 support is dropped. Stop using this trait in test classes. github.com - Signature changed
Yoast\PHPUnitPolyfills\Autoload::getPHPUnitVersion
Was public static function getPHPUnitVersion(); now public static function getPHPUnitVersion(): string. packagist.org - Signature changed
Yoast\PHPUnitPolyfills\Autoload::load
Was public static function load($className); now public static function load(string $className): bool. packagist.org - Signature changed
Yoast\PHPUnitPolyfills\Autoload::loadAssertArrayWithListKeys
Was public static function loadAssertArrayWithListKeys(); now public static function loadAssertArrayWithListKeys(): void. packagist.org - Signature changed
Yoast\PHPUnitPolyfills\Autoload::loadAssertClosedResource
Was public static function loadAssertClosedResource(); now public static function loadAssertClosedResource(): void. packagist.org - Signature changed
Yoast\PHPUnitPolyfills\Autoload::loadAssertContainsOnly
Was public static function loadAssertContainsOnly(); now public static function loadAssertContainsOnly(): void. packagist.org - Signature changed
Yoast\PHPUnitPolyfills\Autoload::loadAssertFileEqualsSpecializations
Was public static function loadAssertFileEqualsSpecializations(); now public static function loadAssertFileEqualsSpecializations(): void. packagist.org - Signature changed
Yoast\PHPUnitPolyfills\Autoload::loadAssertIgnoringLineEndings
Was public static function loadAssertIgnoringLineEndings(); now public static function loadAssertIgnoringLineEndings(): void. packagist.org - Signature changed
Yoast\PHPUnitPolyfills\Autoload::loadAssertionRenames
Was public static function loadAssertionRenames(); now public static function loadAssertionRenames(): void. packagist.org - Signature changed
Yoast\PHPUnitPolyfills\Autoload::loadAssertIsList
Was public static function loadAssertIsList(); now public static function loadAssertIsList(): void. packagist.org - Signature changed
Yoast\PHPUnitPolyfills\Autoload::loadAssertObjectEquals
Was public static function loadAssertObjectEquals(); now public static function loadAssertObjectEquals(): void. packagist.org - Signature changed
Yoast\PHPUnitPolyfills\Autoload::loadAssertObjectNotEquals
Was public static function loadAssertObjectNotEquals(); now public static function loadAssertObjectNotEquals(): void. packagist.org - Signature changed
Yoast\PHPUnitPolyfills\Autoload::loadAssertObjectProperty
Was public static function loadAssertObjectProperty(); now public static function loadAssertObjectProperty(): void. packagist.org - Signature changed
Yoast\PHPUnitPolyfills\Autoload::loadEqualToSpecializations
Was public static function loadEqualToSpecializations(); now public static function loadEqualToSpecializations(): void. packagist.org - Signature changed
Yoast\PHPUnitPolyfills\Autoload::loadExpectExceptionMessageMatches
Was public static function loadExpectExceptionMessageMatches(); now public static function loadExpectExceptionMessageMatches(): void. packagist.org - Signature changed
Yoast\PHPUnitPolyfills\Autoload::loadExpectUserDeprecation
Was public static function loadExpectUserDeprecation(); now public static function loadExpectUserDeprecation(): void. packagist.org - Signature changed
Yoast\PHPUnitPolyfills\Autoload::loadTestCase
Was public static function loadTestCase(); now public static function loadTestCase(): void. packagist.org - Signature changed
Yoast\PHPUnitPolyfills\Autoload::loadTestListenerDefaultImplementation
Was public static function loadTestListenerDefaultImplementation(); now public static function loadTestListenerDefaultImplementation(): void. packagist.org
yoast/phpunit-polyfills 3.0.0 breaking changes
- Removed
The package no longer supports PHPUnit versions older than 6.4.4. Users on older PHPUnit must upgrade it first. github.com - Removed
The package no longer supports PHP versions older than 7.0. Users on older PHP must stay on an earlier release. github.com - Removed
The package no longer runs on PHPUnit 10.x, though it now allows installing PHPUnit 11.x. Users on PHPUnit 10 cannot use this release. github.com - Removed
Yoast\PHPUnitPolyfills\Autoload::loadExpectExceptionObject
Yoast\PHPUnitPolyfills\Autoload::loadExpectExceptionObject was removed in yoast/phpunit-polyfills 3.0.0 packagist.org - Removed
Yoast\PHPUnitPolyfills\Helpers\AssertAttributeHelper
The helper was only a temporary measure for refactoring tests. Users must refactor any tests that still use it. github.com - Removed
Yoast\PHPUnitPolyfills\Polyfills\ExpectExceptionObject
The trait is no longer needed because support for PHPUnit below 6.4 was dropped. Users must stop using it. github.com - Behavior changed
assertIsList
The assertion failure message now follows the format used by PHPUnit 11.3.1 and later. Tests that match the old message text must be updated. github.com - Behavior changed
assertObjectEquals
The polyfill now behaves the same as PHPUnit's native method, which can change test outcomes. Users should check their object comparisons. github.com - Signature changed
expectExceptionMessageMatches
The method is now protected instead of public, so calls from outside the test class will fail. Users must stop calling it directly. github.com
yoast/phpunit-polyfills 2.0.0 breaking changes
- Removed
Test suites running on PHPUnit older than 5.7.21 are no longer supported by this release. github.com - Removed
Code running on PHP older than 5.6 can no longer use this release; stay on 1.x or upgrade PHP. github.com - Removed
Yoast\PHPUnitPolyfills\Autoload::loadAssertFileDirectory
Yoast\PHPUnitPolyfills\Autoload::loadAssertFileDirectory was removed in yoast/phpunit-polyfills 2.0.0 packagist.org - Removed
Yoast\PHPUnitPolyfills\Autoload::loadAssertNumericType
Yoast\PHPUnitPolyfills\Autoload::loadAssertNumericType was removed in yoast/phpunit-polyfills 2.0.0 packagist.org - Removed
Yoast\PHPUnitPolyfills\Autoload::loadExpectException
Yoast\PHPUnitPolyfills\Autoload::loadExpectException was removed in yoast/phpunit-polyfills 2.0.0 packagist.org - Removed
Yoast\PHPUnitPolyfills\Autoload::loadExpectPHPException
Yoast\PHPUnitPolyfills\Autoload::loadExpectPHPException was removed in yoast/phpunit-polyfills 2.0.0 packagist.org - Removed
Yoast\PHPUnitPolyfills\Polyfills\AssertFileDirectory
The trait is gone because support for PHPUnit below 5.7 was dropped. github.com - Removed
Yoast\PHPUnitPolyfills\Polyfills\AssertNumericType
The trait is gone because support for PHPUnit below 5.7 was dropped. github.com - Removed
Yoast\PHPUnitPolyfills\Polyfills\ExpectException
The trait is gone because support for PHPUnit below 5.7 was dropped. github.com - Removed
Yoast\PHPUnitPolyfills\Polyfills\ExpectPHPException
Tests that expect PHP deprecations, notices, warnings or errors via this trait will break; PHPUnit 10 no longer supports this functionality. github.com
And 1 more in this version. Sign up to see every change
Related packages
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.