Skip to content

Upgrading yoast/phpunit-polyfills 2 to 3

Breaking2.0.5 → 3.1.2Breaking3Platform1New4Changed4Fixed1Other7

BreakingUpgrade verdict

3 breaking changes and a platform requirement change.

  • The temporary AssertAttributeHelper trait is gone; tests using it must be refactored.
  • The ExpectExceptionObject trait is removed because older PHPUnit versions are no longer supported.
  • Tests calling expectExceptionMessageMatches() from outside the test class will break because the method is now protected.
  • The package now requires PHP 7.0 or newer.
4 items need code or config changes

PHP requirement changed in 3.0.0: >=5.6 → >=7.0.

Breaking3
Removes the Yoast\PHPUnitPolyfills\Helpers\AssertAttributeHelper trait.
Yoast\PHPUnitPolyfills\Helpers\AssertAttributeHelper
Removes the Yoast\PHPUnitPolyfills\Polyfills\ExpectExceptionObject trait, no longer needed after dropping PHPUnit < 6.4 support.
Yoast\PHPUnitPolyfills\Polyfills\ExpectExceptionObject
Changes the visibility of expectExceptionMessageMatches() from public to protected, matching PHPUnit 11.0.
expectExceptionMessageMatches()
Platform1
Removes support for PHP < 7.0.

Generated by DepDelta from published PHP source. Not mixed with prose notes.

  • removed: static method Autoload.loadExpectExceptionObject()
  • added: static method Autoload.loadAssertArrayWithListKeys()
  • added: static method Autoload.loadAssertContainsOnly()
  • added: static method Autoload.loadAssertObjectNotEquals()
  • added: static method Autoload.loadExpectUserDeprecation()