Skip to content

Commit 1af6c23

Browse files
committed
minor #62564 [FrameworkBundle] Fix typehint for AbstractController::createForm (silasjoisten)
This PR was merged into the 7.4 branch. Discussion ---------- [FrameworkBundle] Fix typehint for `AbstractController::createForm` | Q | A | ------------- | --- | Branch? | 7.4 | Bug fix? | yes | New feature? | no <!-- if yes, also update src/**/CHANGELOG.md --> | Deprecations? | no <!-- if yes, also update UPGRADE-*.md and src/**/CHANGELOG.md --> | Issues | - | License | MIT Fixes a typehint that got changed with the form flow component introduction Commits ------- a011b59a172 fix: Typehint for `createForm` in abstractController
2 parents 735bfc7 + bb4cf32 commit 1af6c23

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Controller/AbstractController.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
use Symfony\Component\Form\FormBuilderInterface;
2121
use Symfony\Component\Form\FormFactoryInterface;
2222
use Symfony\Component\Form\FormInterface;
23+
use Symfony\Component\Form\Flow\FormFlowInterface;
24+
use Symfony\Component\Form\Flow\FormFlowTypeInterface;
2325
use Symfony\Component\HttpFoundation\BinaryFileResponse;
2426
use Symfony\Component\HttpFoundation\Exception\SessionNotFoundException;
2527
use Symfony\Component\HttpFoundation\JsonResponse;
@@ -349,6 +351,8 @@ protected function createAccessDeniedException(string $message = 'Access Denied.
349351

350352
/**
351353
* Creates and returns a Form instance from the type of the form.
354+
*
355+
* @return ($type is class-string<FormFlowTypeInterface> ? FormFlowInterface : FormInterface)
352356
*/
353357
protected function createForm(string $type, mixed $data = null, array $options = []): FormInterface
354358
{

0 commit comments

Comments
 (0)