Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #32933 [PhpUnitBridge] fixed PHPUnit 8.3 compatibility: method ha…
…ndleError was renamed to __invoke (karser) This PR was merged into the 3.4 branch. Discussion ---------- [PhpUnitBridge] fixed PHPUnit 8.3 compatibility: method handleError was renamed to __invoke | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | #32879 <!-- #-prefixed issue number(s), if any --> | License | MIT The PHPUnit method [handleError](https://github.com/sebastianbergmann/phpunit/blob/8.2.5/src/Util/ErrorHandler.php#L38) was renamed to [__invoke](https://github.com/sebastianbergmann/phpunit/blob/8.3/src/Util/ErrorHandler.php#L71) in v8.3. So we should check in Symfony [DeprecationErrorHandler](https://github.com/symfony/symfony/blob/v4.3.3/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php) if method `handleError` exists, otherwise call `__invoke` It works with phpunit v8.2.5 and 8.3.2. The PHPUnit handler is called when I trigger some error, e.g `iconv('fdsfs', 'fsdfds', '');` Commits ------- 0c9539f [PhpUnitBridge] fixed PHPUnit 8.3 compatibility: method handleError was renamed to __invoke
- Loading branch information