-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
PHP 8.1 requires the offsetGet function to be compatible with the ArrayAccess declaration, i.e. to have a mixed return type. Without this, the Chain library produces deprecation notices like this:
PHP Deprecated: Return type of Cocur\Chain\AbstractChain::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in .../vendor/cocur/chain/src/AbstractChain.php on line 46
Mixed type is only available in PHP 8, Chain supports 7.2, so the only way to meet the new requirements is to add the #[\ReturnTypeWillChange]
attribute.
dretsa
Metadata
Metadata
Assignees
Labels
No labels