Skip to content

Commit bcec53d

Browse files
authored
Merge pull request #40 from driesvints/php81-attributes
Implement ReturnTypeWillChange attributes
2 parents e04ff03 + 1b1d084 commit bcec53d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/tests.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ jobs:
3838
- php: '8.0'
3939
coverage: false
4040
composer-flags: '--ignore-platform-req=php'
41+
- php: '8.1'
42+
coverage: false
43+
composer-flags: '--ignore-platform-req=php'
4144

4245
steps:
4346
- uses: actions/checkout@v2
@@ -51,9 +54,9 @@ jobs:
5154

5255
- run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
5356

54-
- name: "Use PHPUnit 9.3+ on PHP 8"
57+
- name: "Use PHPUnit 9.3+ on PHP 8.0 & PHP 8.1"
5558
run: composer require --no-update --dev phpunit/phpunit:^9.3
56-
if: "matrix.php == '8.0'"
59+
if: "matrix.php == '8.0' || matrix.php == '8.1'"
5760

5861
- run: composer update --no-progress ${{ matrix.composer-flags }}
5962

src/Data.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ public function export(): array
204204
/**
205205
* {@inheritdoc}
206206
*/
207+
#[\ReturnTypeWillChange]
207208
public function offsetExists($key)
208209
{
209210
return $this->has($key);
@@ -212,6 +213,7 @@ public function offsetExists($key)
212213
/**
213214
* {@inheritdoc}
214215
*/
216+
#[\ReturnTypeWillChange]
215217
public function offsetGet($key)
216218
{
217219
return $this->get($key, null);
@@ -222,6 +224,7 @@ public function offsetGet($key)
222224
*
223225
* @param string $key
224226
*/
227+
#[\ReturnTypeWillChange]
225228
public function offsetSet($key, $value)
226229
{
227230
$this->set($key, $value);
@@ -230,6 +233,7 @@ public function offsetSet($key, $value)
230233
/**
231234
* {@inheritdoc}
232235
*/
236+
#[\ReturnTypeWillChange]
233237
public function offsetUnset($key)
234238
{
235239
$this->remove($key);

0 commit comments

Comments
 (0)