Skip to content

Commit 05a1b9d

Browse files
minor #42597 [Form] Remove deprecated code from FormErrorIterator (W0rma)
This PR was merged into the 6.0 branch. Discussion ---------- [Form] Remove deprecated code from FormErrorIterator | Q | A | ------------- | --- | Branch? | 6.0 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | Follow-up of symfony/symfony#42387 | License | MIT | Doc PR | Remove deprecated code from `FormErrorIterator::children()` Commits ------- 07986234cc Throw exception if child element is not iterable
2 parents 1c1dce1 + 2948707 commit 05a1b9d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

FormErrorIterator.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,7 @@ public function hasChildren(): bool
186186
public function getChildren(): self
187187
{
188188
if (!$this->hasChildren()) {
189-
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()');
190-
// throw new LogicException(sprintf('The current element is not iterable. Use "%s" to get the current element.', self::class.'::current()'));
189+
throw new LogicException(sprintf('The current element is not iterable. Use "%s" to get the current element.', self::class.'::current()'));
191190
}
192191

193192
return current($this->errors);

0 commit comments

Comments
 (0)