You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PHP 8.4 deprecates implicitly nullable parameters, i.e. typed parameter with a `null` default value, which are not explicitly declared as nullable.
See <https://wiki.php.net/rfc/deprecate-implicitly-nullable-types>
Ideally, we would just change the type hint `?DOMElement` but <https://wiki.php.net/rfc/nullable_types> was only introduced in PHP 7.1, while we still support PHP 5.6.
This patch is a somewhat hacky alternative to <#264> that fixes those warnings without breaking backwards compatibility or removing PHP < 7.1 support.
We remove the offending formal arguments in favour of obtaining them with `func_get_arg()` and checking their type ourselves.
The PHPDoc param annotations were updated to match the actual types of the now virtual arguments.
The downside is that it removes PHP 7.4’s parameter contravariance checks (https://wiki.php.net/rfc/covariant-returns-and-contravariant-parameters) so future re-introduction of the formal arguments would be a BC break.
0 commit comments