Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix E_DEPRECATED warnings in Example class on PHP 8.1 #6298

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Codeception/Example.php
Expand Up @@ -12,6 +12,7 @@ public function __construct($data)
$this->data = $data;
}

#[\ReturnTypeWillChange]
/**
* Whether a offset exists
* @link http://php.net/manual/en/arrayaccess.offsetexists.php
Expand All @@ -29,6 +30,7 @@ public function offsetExists($offset)
return array_key_exists($offset, $this->data);
}

#[\ReturnTypeWillChange]
/**
* Offset to retrieve
* @link http://php.net/manual/en/arrayaccess.offsetget.php
Expand All @@ -46,6 +48,7 @@ public function offsetGet($offset)
return $this->data[$offset];
}

#[\ReturnTypeWillChange]
/**
* Offset to set
* @link http://php.net/manual/en/arrayaccess.offsetset.php
Expand All @@ -63,6 +66,7 @@ public function offsetSet($offset, $value)
$this->data[$offset] = $value;
}

#[\ReturnTypeWillChange]
/**
* Offset to unset
* @link http://php.net/manual/en/arrayaccess.offsetunset.php
Expand All @@ -77,6 +81,7 @@ public function offsetUnset($offset)
unset($this->data[$offset]);
}

#[\ReturnTypeWillChange]
/**
* Count elements of an object
* @link http://php.net/manual/en/countable.count.php
Expand All @@ -91,6 +96,7 @@ public function count()
return count($this->data);
}

#[\ReturnTypeWillChange]
/**
* Retrieve an external iterator
* @link http://php.net/manual/en/iteratoraggregate.getiterator.php
Expand Down