Skip to content

Commit

Permalink
Merge branch '4.4' into 5.3
Browse files Browse the repository at this point in the history
* 4.4:
  Fix return types for PHP 8.1
  • Loading branch information
derrabus committed Aug 4, 2021
2 parents a603e57 + fa0b12a commit 4b78e55
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions OptionsResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,7 @@ public function resolve(array $options = [])
* @throws OptionDefinitionException If there is a cyclic dependency between
* lazy options and/or normalizers
*/
#[\ReturnTypeWillChange]
public function offsetGet($option, bool $triggerDeprecation = true)
{
if (!$this->locked) {
Expand Down Expand Up @@ -1199,6 +1200,7 @@ private function verifyTypes(string $type, $value, array &$invalidTypes, int $le
*
* @see \ArrayAccess::offsetExists()
*/
#[\ReturnTypeWillChange]
public function offsetExists($option)
{
if (!$this->locked) {
Expand All @@ -1215,6 +1217,7 @@ public function offsetExists($option)
*
* @throws AccessException
*/
#[\ReturnTypeWillChange]
public function offsetSet($option, $value)
{
throw new AccessException('Setting options via array access is not supported. Use setDefault() instead.');
Expand All @@ -1227,6 +1230,7 @@ public function offsetSet($option, $value)
*
* @throws AccessException
*/
#[\ReturnTypeWillChange]
public function offsetUnset($option)
{
throw new AccessException('Removing options via array access is not supported. Use remove() instead.');
Expand All @@ -1243,6 +1247,7 @@ public function offsetUnset($option)
*
* @see \Countable::count()
*/
#[\ReturnTypeWillChange]
public function count()
{
if (!$this->locked) {
Expand Down

0 comments on commit 4b78e55

Please sign in to comment.