diff --git a/OptionsResolver.php b/OptionsResolver.php index 9cbb414..9e9a85c 100644 --- a/OptionsResolver.php +++ b/OptionsResolver.php @@ -1049,7 +1049,7 @@ public function offsetGet($option, bool $triggerDeprecation = true) $fmtAllowedTypes = implode('" or "', $this->allowedTypes[$option]); $fmtProvidedTypes = implode('|', array_keys($invalidTypes)); $allowedContainsArrayType = \count(array_filter($this->allowedTypes[$option], static function ($item) { - return '[]' === substr($item, -2); + return str_ends_with($item, '[]'); })) > 0; if (\is_array($value) && $allowedContainsArrayType) { diff --git a/composer.json b/composer.json index 7679819..6e65a79 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "php": ">=7.2.5", "symfony/deprecation-contracts": "^2.1", "symfony/polyfill-php73": "~1.0", - "symfony/polyfill-php80": "^1.15" + "symfony/polyfill-php80": "^1.16" }, "autoload": { "psr-4": { "Symfony\\Component\\OptionsResolver\\": "" },