Skip to content

Commit 9abfb2c

Browse files
Andrii Krasnoholovetspelanis
Andrii Krasnoholovets
authored andcommitted
8.2 deprecation notices fix
1 parent fc79c3f commit 9abfb2c

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 0.4.0
4+
5+
### Added
6+
7+
- PHP 8.2 compatibility
8+
39
## 0.3.1
410

511
### Fixed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
}
88
},
99
"require": {
10-
"php": "^7.0 || ^8.0"
10+
"php": "^7.1 || ^8.0"
1111
},
1212
"require-dev": {
1313
"phpunit/phpunit": "^6.0 || ^9.0"

src/ObjectWrapper.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,26 +53,28 @@ private function processArray(array $data, array $keys)
5353
return $data;
5454
}
5555

56-
public function offsetExists($key)
56+
public function offsetExists($key): bool
5757
{
5858
return isset($this->data->$key);
5959
}
6060

61+
#[\ReturnTypeWillChange]
6162
public function offsetGet($key)
6263
{
6364
return isset($this->data->$key) ? $this->data->$key : null;
6465
}
6566

66-
public function offsetSet($offset, $value)
67+
public function offsetSet($offset, $value): void
6768
{
6869
throw new RuntimeException('Modifying ObjectWrapper is not allowed');
6970
}
7071

71-
public function offsetUnset($offset)
72+
public function offsetUnset($offset): void
7273
{
7374
throw new RuntimeException('Modifying ObjectWrapper is not allowed');
7475
}
7576

77+
#[\ReturnTypeWillChange]
7678
public function getIterator()
7779
{
7880
return new ArrayIterator($this->data);

0 commit comments

Comments
 (0)