Skip to content

Commit 7eaecbb

Browse files
committed
minor #13174 Clarify a comment (jakzal)
This PR was merged into the 2.5 branch. Discussion ---------- Clarify a comment | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - The previous comment was lying since [`collectViewVariables()`](https://github.com/symfony/symfony/blob/cffb64fd931d167c905f9bbecdb400e71cb3c850/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollector.php#L165) doesn't really call the [`buildPreliminaryFormTree()`](https://github.com/symfony/symfony/blob/cffb64fd931d167c905f9bbecdb400e71cb3c850/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollector.php#L186) nor the [`buildFinalFormTree()`](https://github.com/symfony/symfony/blob/cffb64fd931d167c905f9bbecdb400e71cb3c850/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollector.php#L196). Commits ------- 00b4297 Clarify a comment.
2 parents 2cd2cfb + 00b4297 commit 7eaecbb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Symfony/Component/Form/Extension/DataCollector/EventListener/DataCollectorListener.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ public function postSubmit(FormEvent $event)
7676
$this->dataCollector->collectSubmittedData($event->getForm());
7777

7878
// Assemble a form tree
79-
// This is done again in collectViewVariables(), but that method
80-
// is not guaranteed to be called (i.e. when no view is created)
79+
// This is done again after the view is built, but we need it here as the view is not always created.
8180
$this->dataCollector->buildPreliminaryFormTree($event->getForm());
8281
}
8382
}

0 commit comments

Comments
 (0)