Skip to content

Commit 6e88d8c

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: [SecurityBundle] Fix compat with symfony/security-core:^6 [DependencyInjection] Fix support for unions/intersections together with `ServiceSubscriberInterface` fixed leftover deprecations PHP 8.1 [Runtime] fix defining APP_DEBUG when Dotenv is not enabled revert using functions provided by polyfill packages [FrameworkBundle] Fix logic in workflow:dump between workflow name and workflow id Bump Symfony version to 5.4.0 Update VERSION for 5.4.0-BETA1 Update CHANGELOG for 5.4.0-BETA1 Add getters and setters for attributes property
2 parents 78ba967 + f1dc583 commit 6e88d8c

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

Inline.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,19 @@ public static function dump(mixed $value, int $flags = 0): string
191191
*/
192192
public static function isHash(array|\ArrayObject|\stdClass $value): bool
193193
{
194-
return !\is_array($value) || !array_is_list($value);
194+
if ($value instanceof \stdClass || $value instanceof \ArrayObject) {
195+
return true;
196+
}
197+
198+
$expectedKey = 0;
199+
200+
foreach ($value as $key => $val) {
201+
if ($key !== $expectedKey++) {
202+
return true;
203+
}
204+
}
205+
206+
return false;
195207
}
196208

197209
/**

composer.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@
1717
],
1818
"require": {
1919
"php": ">=8.0.2",
20-
"symfony/polyfill-ctype": "^1.8",
21-
"symfony/polyfill-php80": "^1.16",
22-
"symfony/polyfill-php81": "^1.22"
20+
"symfony/polyfill-ctype": "^1.8"
2321
},
2422
"require-dev": {
2523
"symfony/console": "^5.4|^6.0"

0 commit comments

Comments
 (0)