Make WordPress Core

Changeset 51594


Ignore:
Timestamp:
08/10/2021 05:34:30 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Code Modernization: Silence the deprecation warning for missing return type in phpunit/tests/compat.php.

This fixes the "Deprecated: Return type of CountableFake::count() should be compatible with Countable::count(): int" warning on PHP 8.1.

PHP native interfaces now have declared return types and methods in classes implementing these interfaces need to either have the return type declared (in a covariant compatible manner with the PHP native interface method declaration), or need to silence the deprecation warning using the #[ReturnTypeWillChange] attribute.

Follow-up to [51517], [51529], [51530], [51531], [51532].

Props jrf.
See #53635.

File:
1 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.