Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitff8aae7

Browse files
committed
bug#43944 [Yaml] revert using functions provided by polyfill packages (xabbuh)
This PR was merged into the 5.4 branch.Discussion----------[Yaml] revert using functions provided by polyfill packages| Q | A| ------------- | ---| Branch? | 5.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Tickets |Fix#43943| License | MIT| Doc PR |This reverts#41431 for the same reason for which we merged#42296 (see#42280 andcomposer/composer#10024 for more information).Commits-------3b9b700 revert using functions provided by polyfill packages
2 parents8a9e826 +3b9b700 commitff8aae7

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

‎src/Symfony/Component/Yaml/Inline.php‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,19 @@ public static function dump($value, int $flags = 0): string
211211
*/
212212
publicstaticfunctionisHash($value):bool
213213
{
214-
return !\is_array($value) || !array_is_list($value);
214+
if ($valueinstanceof \stdClass ||$valueinstanceof \ArrayObject) {
215+
returntrue;
216+
}
217+
218+
$expectedKey =0;
219+
220+
foreach ($valueas$key =>$val) {
221+
if ($key !==$expectedKey++) {
222+
returntrue;
223+
}
224+
}
225+
226+
returnfalse;
215227
}
216228

217229
/**

‎src/Symfony/Component/Yaml/composer.json‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818
"require": {
1919
"php":">=7.2.5",
2020
"symfony/deprecation-contracts":"^2.1",
21-
"symfony/polyfill-ctype":"^1.8",
22-
"symfony/polyfill-php80":"^1.16",
23-
"symfony/polyfill-php81":"^1.22"
21+
"symfony/polyfill-ctype":"^1.8"
2422
},
2523
"require-dev": {
2624
"symfony/console":"^5.3|^6.0"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp