Skip to content

Commit 5d539e4

Browse files
authored
Merge branch 'symfony:1.x' into main
2 parents 276260a + c86da84 commit 5d539e4

29 files changed

+69
-69
lines changed

config/help/MakeForm.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
The <info>%command.name%</info> command generates a new form class.
22

3-
<info>php %command.full_name% UserForm</info>
3+
<info>php %command.full_name% UserType</info>
44

55
If the argument is missing, the command will ask for the form class interactively.
66

77
You can optionally specify the bound class in a second argument.
88
This can be the name of an entity like <info>User</info>
99

10-
<info>php %command.full_name% UserForm User</info>
10+
<info>php %command.full_name% UserType User</info>
1111

1212
You can also specify a fully qualified name to another class like <info>\App\Dto\UserData</info>.
1313
Slashes must be escaped in the argument.
1414

15-
<info>php %command.full_name% UserForm \\App\\Dto\\UserData</info>
15+
<info>php %command.full_name% UserType \\App\\Dto\\UserData</info>
1616

src/Maker/MakeCrud.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen
140140
$iter = 0;
141141
do {
142142
$formClassDetails = $generator->createClassNameDetails(
143-
$entityClassDetails->getRelativeNameWithoutSuffix().($iter ?: ''),
143+
$entityClassDetails->getRelativeNameWithoutSuffix().($iter ?: '').'Type',
144144
'Form\\',
145-
'Form'
145+
'Type'
146146
);
147147
++$iter;
148148
} while (class_exists($formClassDetails->getFullName()));

src/Maker/MakeForm.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public static function getCommandDescription(): string
5151
public function configureCommand(Command $command, InputConfiguration $inputConfig): void
5252
{
5353
$command
54-
->addArgument('name', InputArgument::OPTIONAL, \sprintf('The name of the form class (e.g. <fg=yellow>%Form</>)', Str::asClassName(Str::getRandomTerm())))
54+
->addArgument('name', InputArgument::OPTIONAL, \sprintf('The name of the form class (e.g. <fg=yellow>%sType</>)', Str::asClassName(Str::getRandomTerm())))
5555
->addArgument('bound-class', InputArgument::OPTIONAL, 'The name of Entity or fully qualified model class name that the new form will be bound to (empty for none)')
5656
->setHelp($this->getHelpFileContents('MakeForm.txt'))
5757
;
@@ -80,7 +80,7 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen
8080
$formClassNameDetails = $generator->createClassNameDetails(
8181
$input->getArgument('name'),
8282
'Form\\',
83-
'Form'
83+
'Type'
8484
);
8585

8686
$formFields = ['field_name' => null];

src/Maker/MakeRegistrationForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ public function configureDependencies(DependencyBuilder $dependencies): void
548548
private function generateFormClass(ClassNameDetails $userClassDetails, Generator $generator, string $usernameField): ClassNameDetails
549549
{
550550
$formClassDetails = $generator->createClassNameDetails(
551-
'RegistrationForm',
551+
'RegistrationFormType',
552552
'Form\\'
553553
);
554554

src/Maker/MakeResetPassword.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,12 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen
227227
);
228228

229229
$requestFormTypeClassNameDetails = $generator->createClassNameDetails(
230-
'ResetPasswordRequestForm',
230+
'ResetPasswordRequestFormType',
231231
'Form\\'
232232
);
233233

234234
$changePasswordFormTypeClassNameDetails = $generator->createClassNameDetails(
235-
'ChangePasswordForm',
235+
'ChangePasswordFormType',
236236
'Form\\'
237237
);
238238

@@ -301,7 +301,7 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen
301301

302302
$generator->generateClass(
303303
$requestFormTypeClassNameDetails->getFullName(),
304-
'resetPassword/ResetPasswordRequestForm.tpl.php',
304+
'resetPassword/ResetPasswordRequestFormType.tpl.php',
305305
[
306306
'use_statements' => $useStatements,
307307
'email_field' => $this->emailPropertyName,
@@ -322,7 +322,7 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen
322322

323323
$generator->generateClass(
324324
$changePasswordFormTypeClassNameDetails->getFullName(),
325-
'resetPassword/ChangePasswordForm.tpl.php',
325+
'resetPassword/ChangePasswordFormType.tpl.php',
326326
['use_statements' => $useStatements]
327327
);
328328

src/Renderer/FormTypeRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function render(ClassNameDetails $formClassDetails, array $formFields, ?C
7070

7171
$this->generator->generateClass(
7272
$formClassDetails->getFullName(),
73-
'form/Form.tpl.php',
73+
'form/Type.tpl.php',
7474
[
7575
'use_statements' => $useStatements,
7676
'bounded_class_name' => $boundClassDetails ? $boundClassDetails->getShortName() : null,

templates/crud/test/Test.EntityManager.tpl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function testIndex(): void
3535
self::assertPageTitleContains('<?= ucfirst($entity_var_singular); ?> index');
3636

3737
// Use the $crawler to perform additional assertions e.g.
38-
// self::assertSame('Some text on the page', $crawler->filter('.p')->first());
38+
// self::assertSame('Some text on the page', $crawler->filter('.p')->first()->text());
3939
}
4040

4141
public function testNew(): void
File renamed without changes.

0 commit comments

Comments
 (0)