Skip to content

Commit bde1d87

Browse files
committed
Add support for PHP 8.5
1 parent 3b4bf95 commit bde1d87

3 files changed

Lines changed: 14 additions & 8 deletions

File tree

CHANGELOG.md

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

3+
## 4.0.1
4+
5+
- Added support for PHP `8.5`.
6+
37
## 4.0.0
48

59
### PHP support

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
}
2323
},
2424
"require": {
25-
"php": "8.2 - 8.4"
25+
"php": "8.2 - 8.5"
2626
},
2727
"require-dev": {
28-
"phpstan/phpstan": "2.0.3",
29-
"phpunit/phpunit": "11.5.1",
30-
"squizlabs/php_codesniffer": "3.11.2",
28+
"phpstan/phpstan": "2.1.32",
29+
"phpunit/phpunit": "12.4.4",
30+
"squizlabs/php_codesniffer": "4.0.1",
3131
"friendsofphp/php-cs-fixer": "^3.65"
3232
}
3333
}

src/AngryBytes/DomainObject.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,12 @@ public function getPropertyValueAsSimple(string $property)
132132

133133
// Traverse the
134134
foreach ($value as $childKey => $childValue) {
135-
if ($childValue instanceof DomainObject) {
136-
$newValue[$childKey] = $childValue->toArray();
137-
} else {
138-
$newValue[$childKey] = $childValue;
135+
if (is_string($childKey) || is_int($childKey)) {
136+
if ($childValue instanceof DomainObject) {
137+
$newValue[$childKey] = $childValue->toArray();
138+
} else {
139+
$newValue[$childKey] = $childValue;
140+
}
139141
}
140142
}
141143

0 commit comments

Comments
 (0)