Skip to content

Commit fa0b12a

Browse files
committed
Fix return types for PHP 8.1
1 parent 66a3346 commit fa0b12a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

OptionsResolver.php

+5
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,7 @@ public function resolve(array $options = [])
832832
* @throws OptionDefinitionException If there is a cyclic dependency between
833833
* lazy options and/or normalizers
834834
*/
835+
#[\ReturnTypeWillChange]
835836
public function offsetGet($option/*, bool $triggerDeprecation = true*/)
836837
{
837838
if (!$this->locked) {
@@ -1072,6 +1073,7 @@ private function verifyTypes(string $type, $value, array &$invalidTypes, int $le
10721073
*
10731074
* @see \ArrayAccess::offsetExists()
10741075
*/
1076+
#[\ReturnTypeWillChange]
10751077
public function offsetExists($option)
10761078
{
10771079
if (!$this->locked) {
@@ -1088,6 +1090,7 @@ public function offsetExists($option)
10881090
*
10891091
* @throws AccessException
10901092
*/
1093+
#[\ReturnTypeWillChange]
10911094
public function offsetSet($option, $value)
10921095
{
10931096
throw new AccessException('Setting options via array access is not supported. Use setDefault() instead.');
@@ -1100,6 +1103,7 @@ public function offsetSet($option, $value)
11001103
*
11011104
* @throws AccessException
11021105
*/
1106+
#[\ReturnTypeWillChange]
11031107
public function offsetUnset($option)
11041108
{
11051109
throw new AccessException('Removing options via array access is not supported. Use remove() instead.');
@@ -1116,6 +1120,7 @@ public function offsetUnset($option)
11161120
*
11171121
* @see \Countable::count()
11181122
*/
1123+
#[\ReturnTypeWillChange]
11191124
public function count()
11201125
{
11211126
if (!$this->locked) {

0 commit comments

Comments
 (0)