Skip to content

Commit

Permalink
Merge pull request #36 from bordoni/fix/php-81-compatibility
Browse files Browse the repository at this point in the history
Add PHP 8.1 compatibility but allowing backwards compatibility
  • Loading branch information
lucatume authored Dec 20, 2021
2 parents 370ad65 + f9fa72e commit d27373c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/tad/DI52/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ public function setVar($key, $value) {
* @return void
* @since 5.0.0
*/
#[\ReturnTypeWillChange]
public function offsetSet($offset, $value) {
if ($value instanceof tad_DI52_ProtectedValue) {
$this->protected[$offset] = true;
Expand Down Expand Up @@ -215,6 +216,7 @@ public function getVar($key) {
*
* @return mixed
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset) {
if (is_object($offset)) {
return is_callable($offset) ? call_user_func($offset, $this) : $offset;
Expand Down Expand Up @@ -546,6 +548,7 @@ public function isBound($classOrInterface) {
* The return value will be casted to boolean if non-boolean was returned.
* @since 5.0.0
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset) {
return isset($this->bindings[$offset]);
}
Expand Down Expand Up @@ -600,6 +603,7 @@ public function bindDecorators($classOrInterface, array $decorators, array $afte
* @return void
* @since 5.0.0
*/
#[\ReturnTypeWillChange]
public function offsetUnset($offset) {
unset(
$this->strings[$offset],
Expand Down

0 comments on commit d27373c

Please sign in to comment.