Skip to content

Commit fb70194

Browse files
authored
UPGRADING: update information re: return type for internal methods (php#7182)
As discussed in 7051.
1 parent e748dca commit fb70194

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

UPGRADING

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ PHP 8.1 UPGRADE NOTES
6060
. Most non-final internal methods now require overriding methods to declare a
6161
compatible return type, otherwise a deprecated notice is emitted during
6262
inheritance validation.
63+
In case the return type cannot be declared for an overriding method due to
64+
PHP cross-version compatibility concerns, a `#[ReturnTypeWillChange]`
65+
attribute can be added to silence the deprecation notice.
6366
RFC: https://wiki.php.net/rfc/internal_method_return_types
6467

6568
- Fileinfo:

0 commit comments

Comments
 (0)