Skip to content

Commit

Permalink
Merge pull request #343 from FlorentTorregrosa/342-php81
Browse files Browse the repository at this point in the history
Issue #342 by Grimreaper: PHP 8.1 compatibility. First try.
  • Loading branch information
ademarco authored Aug 22, 2022
2 parents fd1657b + 5a6c050 commit 6a20799
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
PHP_VERSION: ["7.4", "8.0"]
PHP_VERSION: ["7.4", "8.0", "8.1"]
env:
PHP_VERSION: ${{ matrix.php_version }}
steps:
Expand Down
4 changes: 4 additions & 0 deletions src/Definition/ArrayAccessDefinitionTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,31 @@ trait ArrayAccessDefinitionTrait {
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset) {
return array_key_exists($offset, $this->definition);
}

/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset) {
return $this->definition[$offset] ?? NULL;
}

/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function offsetSet($offset, $value) {
$this->definition[$offset] = $value;
}

/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function offsetUnset($offset) {
unset($this->definition[$offset]);
}
Expand Down

0 comments on commit 6a20799

Please sign in to comment.