Skip to content

Commit 7748414

Browse files
[make:registration-form] Removal of the createView() method, as it is no longer required to render the form (#1455)
1 parent d443032 commit 7748414

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/Resources/skeleton/registration/RegistrationController.tpl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function register(Request $request, <?= $password_hasher_class_details->g
5858
}
5959

6060
return $this->render('registration/register.html.twig', [
61-
'registrationForm' => $form->createView(),
61+
'registrationForm' => $form,
6262
]);
6363
}
6464
<?php if ($will_verify_email): ?>

src/Resources/skeleton/resetPassword/ResetPasswordController.tpl.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function request(Request $request, MailerInterface $mailer<?php if ($tran
3333
}
3434

3535
return $this->render('reset_password/request.html.twig', [
36-
'requestForm' => $form->createView(),
36+
'requestForm' => $form,
3737
]);
3838
}
3939

@@ -109,7 +109,7 @@ public function reset(Request $request, UserPasswordHasherInterface $passwordHas
109109
}
110110

111111
return $this->render('reset_password/reset.html.twig', [
112-
'resetForm' => $form->createView(),
112+
'resetForm' => $form,
113113
]);
114114
}
115115

tests/fixtures/make-registration-form/tests/it_generates_registration_with_entity_and_authenticator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function testRegistrationValidationError()
5454
$form['registration_form[plainPassword]'] = 'foo';
5555
$client->submit($form);
5656

57-
$this->assertSame(200, $client->getResponse()->getStatusCode());
57+
$this->assertSame(422, $client->getResponse()->getStatusCode());
5858
$this->assertStringContainsString(
5959
'There is already an account with this email',
6060
$client->getResponse()->getContent()

0 commit comments

Comments
 (0)