Add PHP 8.1 compatibility

Return type of FriendsOfBehat\SymfonyExtension\Mink\MinkParameters::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
This commit is contained in:
Ruud Kamphuis
2021-11-13 10:23:18 +01:00
parent b53b0a238b
commit 8a48661921

View File

@@ -4,6 +4,8 @@ declare(strict_types=1);
namespace FriendsOfBehat\SymfonyExtension\Mink; namespace FriendsOfBehat\SymfonyExtension\Mink;
use ReturnTypeWillChange;
/** @final */ /** @final */
class MinkParameters implements \Countable, \IteratorAggregate, \ArrayAccess class MinkParameters implements \Countable, \IteratorAggregate, \ArrayAccess
{ {
@@ -25,6 +27,7 @@ class MinkParameters implements \Countable, \IteratorAggregate, \ArrayAccess
return array_key_exists($offset, $this->minkParameters); return array_key_exists($offset, $this->minkParameters);
} }
#[ReturnTypeWillChange]
public function offsetGet($offset) public function offsetGet($offset)
{ {
return $this->minkParameters[$offset] ?? null; return $this->minkParameters[$offset] ?? null;