Skip to content

Commit 261d7d1

Browse files
Merge branch '4.4' into 5.2
* 4.4: Leverage str_contains/str_starts_with Leverage str_ends_with
2 parents eb067d2 + d7ba2d8 commit 261d7d1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

OptionsResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ public function offsetGet($option, bool $triggerDeprecation = true)
996996
$fmtAllowedTypes = implode('" or "', $this->allowedTypes[$option]);
997997
$fmtProvidedTypes = implode('|', array_keys($invalidTypes));
998998
$allowedContainsArrayType = \count(array_filter($this->allowedTypes[$option], static function ($item) {
999-
return '[]' === substr($item, -2);
999+
return str_ends_with($item, '[]');
10001000
})) > 0;
10011001

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

composer.json

Lines changed: 1 addition & 1 deletion
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)