Skip to content

Commit 849f869

Browse files
Merge branch '5.2' into 5.3
* 5.2: Leverage str_contains/str_starts_with Leverage str_ends_with
2 parents 05b35d6 + 261d7d1 commit 849f869

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

OptionsResolver.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,7 @@ public function offsetGet($option, bool $triggerDeprecation = true)
10491049
$fmtAllowedTypes = implode('" or "', $this->allowedTypes[$option]);
10501050
$fmtProvidedTypes = implode('|', array_keys($invalidTypes));
10511051
$allowedContainsArrayType = \count(array_filter($this->allowedTypes[$option], static function ($item) {
1052-
return '[]' === substr($item, -2);
1052+
return str_ends_with($item, '[]');
10531053
})) > 0;
10541054

10551055
if (\is_array($value) && $allowedContainsArrayType) {

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"php": ">=7.2.5",
2020
"symfony/deprecation-contracts": "^2.1",
2121
"symfony/polyfill-php73": "~1.0",
22-
"symfony/polyfill-php80": "^1.15"
22+
"symfony/polyfill-php80": "^1.16"
2323
},
2424
"autoload": {
2525
"psr-4": { "Symfony\\Component\\OptionsResolver\\": "" },

0 commit comments

Comments
 (0)