Skip to content

Commit 6a20799

Browse files
authored
Merge pull request #343 from FlorentTorregrosa/342-php81
Issue #342 by Grimreaper: PHP 8.1 compatibility. First try.
2 parents fd1657b + 5a6c050 commit 6a20799

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
runs-on: ubuntu-latest
66
strategy:
77
matrix:
8-
PHP_VERSION: ["7.4", "8.0"]
8+
PHP_VERSION: ["7.4", "8.0", "8.1"]
99
env:
1010
PHP_VERSION: ${{ matrix.php_version }}
1111
steps:

src/Definition/ArrayAccessDefinitionTrait.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,31 @@ trait ArrayAccessDefinitionTrait {
1414
/**
1515
* {@inheritdoc}
1616
*/
17+
#[\ReturnTypeWillChange]
1718
public function offsetExists($offset) {
1819
return array_key_exists($offset, $this->definition);
1920
}
2021

2122
/**
2223
* {@inheritdoc}
2324
*/
25+
#[\ReturnTypeWillChange]
2426
public function offsetGet($offset) {
2527
return $this->definition[$offset] ?? NULL;
2628
}
2729

2830
/**
2931
* {@inheritdoc}
3032
*/
33+
#[\ReturnTypeWillChange]
3134
public function offsetSet($offset, $value) {
3235
$this->definition[$offset] = $value;
3336
}
3437

3538
/**
3639
* {@inheritdoc}
3740
*/
41+
#[\ReturnTypeWillChange]
3842
public function offsetUnset($offset) {
3943
unset($this->definition[$offset]);
4044
}

0 commit comments

Comments
 (0)