-
Notifications
You must be signed in to change notification settings - Fork 122
Closed
Description
Hey,
I have a problem with this bundle and new symfony 4.
Here is my code:
public function index(CheckoutFlow $flow, $id = null): Response
{
.....
$flow->bind($order);
// form of the current step
$form = $flow->createForm();
if ($flow->isValid($form)) {
$flow->saveCurrentStepData($form);
if ($flow->nextStep()) {
// form for the next step
$form = $flow->createForm();
} else {
// flow finished
$em->persist($order);
$em->flush();
$response = ...
return $response;
}
}
return $this->render('shop/checkout/index.html.twig', [
'form' => $form->createView(),
'flow' => $flow,
]);
}
services:
App\Form\Checkout\CheckoutFlow:
parent: craue.form.flow
And I'm getting this error:
Call to a member function getCurrentRequest() on null
Am I doing something wrong?
Metadata
Metadata
Assignees
Labels
No labels