Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

FormInterface::getErrors could have a dynamic return extension #166

Closed
@VincentLanglet

Description

Currently, its return type is a FormErrorIterator with inside
Symfony\Component\Form\FormError|Symfony\Component\Form\FormErrorIterator

The phpdoc is

/**
 * Returns the errors of this form.
 *
 * @param bool $deep Whether to include errors of child forms as well
 * @param bool $flatten Whether to flatten the list of errors in case
 * $deep is set to true
 *
 * @return FormErrorIterator An iterator over the {@link FormError}
 * instances that where added to this form
 */
 public function getErrors(bool $deep = false, bool $flatten = true);

So I would say it's always an iterator on Symfony\Component\Form\FormError, except if the parameter true, false are provided.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /