In PHP 9.1, the use of expectException(PHPUnit\Framework\Error\*) has
been deprecated, that is, when a Notice/Warning/Error/Deprecated
problem is reported. Instead, these new assertions must be used:
- expectDeprecation() for E_DEPRECATED and E_USER_DEPRECATED
- expectNotice() for E_NOTICE, E_USER_NOTICE, and E_STRICT
- expectWarning() for E_WARNING and E_USER_WARNING
- expectError() for everything else
More info:
https://github.com/sebastianbergmann/phpunit/blob/9.0.0/ChangeLog-9.0.mdhttps://github.com/sebastianbergmann/phpunit/issues/3775
Regexp to find all them:
ag 'expectException.*(Notice|Warning|Error|Deprecated)