Skip to content

Commit bb61215

Browse files
committed
minor #14662 [Form] Changed data mapper $forms parameter type to \Traversable (vudaltsov)
This PR was merged into the 5.3-dev branch. Discussion ---------- [Form] Changed data mapper $forms parameter type to \Traversable Closes #14656 See symfony/symfony#39317 Commits ------- 4677e42 Changed iterable $forms to Traversable in the data mapper implementation example
2 parents d4277ec + 4677e42 commit bb61215

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

form/data_mappers.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ in your form type::
9898
/**
9999
* @param Color|null $viewData
100100
*/
101-
public function mapDataToForms($viewData, iterable $forms): void
101+
public function mapDataToForms($viewData, \Traversable $forms): void
102102
{
103103
// there is no data yet, so nothing to prepopulate
104104
if (null === $viewData) {
@@ -119,7 +119,7 @@ in your form type::
119119
$forms['blue']->setData($viewData->getBlue());
120120
}
121121

122-
public function mapFormsToData(iterable $forms, &$viewData): void
122+
public function mapFormsToData(\Traversable $forms, &$viewData): void
123123
{
124124
/** @var FormInterface[] $forms */
125125
$forms = iterator_to_array($forms);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy