From 07986234cc5f0ffa5a19e16cf6979e226c8a6d5e Mon Sep 17 00:00:00 2001 From: W0rma Date: Tue, 17 Aug 2021 14:52:50 +0200 Subject: [PATCH] Throw exception if child element is not iterable --- src/Symfony/Component/Form/FormErrorIterator.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Symfony/Component/Form/FormErrorIterator.php b/src/Symfony/Component/Form/FormErrorIterator.php index a6b9719059433..56921e73f2e84 100644 --- a/src/Symfony/Component/Form/FormErrorIterator.php +++ b/src/Symfony/Component/Form/FormErrorIterator.php @@ -190,8 +190,7 @@ public function hasChildren(): bool public function getChildren(): self { if (!$this->hasChildren()) { - trigger_deprecation('symfony/form', '5.4', 'Calling "%s()" if the current element is not iterable is deprecated, call "%s" to get the current element.', __METHOD__, self::class.'::current()'); - // throw new LogicException(sprintf('The current element is not iterable. Use "%s" to get the current element.', self::class.'::current()')); + throw new LogicException(sprintf('The current element is not iterable. Use "%s" to get the current element.', self::class.'::current()')); } return current($this->errors);