1
0
mirror of https://github.com/moodle/moodle.git synced 2025-03-26 02:22:51 +01:00
Eloy Lafuente (stronk7) 5f755ac26e MDL-71036 phpunit: Deprecated expectException for notice/warning/error
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.md
https://github.com/sebastianbergmann/phpunit/issues/3775

Regexp to find all them:

ag 'expectException.*(Notice|Warning|Error|Deprecated)
2021-03-11 19:22:24 +01:00
..