Skip to content

Commit a6f6ed8

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: (35 commits) fix tests [DomCrawler][FrameworkBundle] Add `assertAnySelectorText*` fix tests [SecurityBundle] Add `$badges` argument to `Security::login` [FrameworkBundle] Support APP_BUILD_DIR [Scheduler] Add --all to debug:schedule [Cache] minor cleanup [HttpFoundation] Use Symfony exception for request unexpected values [Scheduler] Display friendly dates in debug:schedule [RemoteEvent][Webhook] Add Brevo support [Webhook][RemoteEvent] Add Mailjet support. fix typo fix minimum required HttpKernel component version fix tests Remove remaining experimental classes [RemoteEvent] Mark component as non experimental [Webhook] Mark component as non experimental [Process] Fix return type [Scheduler] Mark component as non experimental [AssetMapper] Mark component as non experimental ...
2 parents c46876b + e3042b6 commit a6f6ed8

File tree

4 files changed

+47
-38
lines changed

4 files changed

+47
-38
lines changed

AbstractType.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,46 +21,46 @@
2121
abstract class AbstractType implements FormTypeInterface
2222
{
2323
/**
24-
* @return void
24+
* @return string|null
2525
*/
26-
public function buildForm(FormBuilderInterface $builder, array $options)
26+
public function getParent()
2727
{
28+
return FormType::class;
2829
}
2930

3031
/**
3132
* @return void
3233
*/
33-
public function buildView(FormView $view, FormInterface $form, array $options)
34+
public function configureOptions(OptionsResolver $resolver)
3435
{
3536
}
3637

3738
/**
3839
* @return void
3940
*/
40-
public function finishView(FormView $view, FormInterface $form, array $options)
41+
public function buildForm(FormBuilderInterface $builder, array $options)
4142
{
4243
}
4344

4445
/**
4546
* @return void
4647
*/
47-
public function configureOptions(OptionsResolver $resolver)
48+
public function buildView(FormView $view, FormInterface $form, array $options)
4849
{
4950
}
5051

5152
/**
52-
* @return string
53+
* @return void
5354
*/
54-
public function getBlockPrefix()
55+
public function finishView(FormView $view, FormInterface $form, array $options)
5556
{
56-
return StringUtil::fqcnToBlockPrefix(static::class) ?: '';
5757
}
5858

5959
/**
60-
* @return string|null
60+
* @return string
6161
*/
62-
public function getParent()
62+
public function getBlockPrefix()
6363
{
64-
return FormType::class;
64+
return StringUtil::fqcnToBlockPrefix(static::class) ?: '';
6565
}
6666
}

AbstractTypeExtension.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,22 @@
1818
*/
1919
abstract class AbstractTypeExtension implements FormTypeExtensionInterface
2020
{
21-
public function buildForm(FormBuilderInterface $builder, array $options): void
21+
/**
22+
* @return void
23+
*/
24+
public function configureOptions(OptionsResolver $resolver): void
2225
{
2326
}
2427

25-
public function buildView(FormView $view, FormInterface $form, array $options): void
28+
public function buildForm(FormBuilderInterface $builder, array $options): void
2629
{
2730
}
2831

29-
public function finishView(FormView $view, FormInterface $form, array $options): void
32+
public function buildView(FormView $view, FormInterface $form, array $options): void
3033
{
3134
}
3235

33-
public function configureOptions(OptionsResolver $resolver): void
36+
public function finishView(FormView $view, FormInterface $form, array $options): void
3437
{
3538
}
3639
}

FormTypeExtensionInterface.php

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@
1818
*/
1919
interface FormTypeExtensionInterface
2020
{
21+
/**
22+
* Gets the extended types.
23+
*
24+
* @return string[]
25+
*/
26+
public static function getExtendedTypes(): iterable;
27+
28+
/**
29+
* @return void
30+
*/
31+
public function configureOptions(OptionsResolver $resolver): void;
32+
2133
/**
2234
* Builds the form.
2335
*
@@ -53,13 +65,4 @@ public function buildView(FormView $view, FormInterface $form, array $options):
5365
* @see FormTypeInterface::finishView()
5466
*/
5567
public function finishView(FormView $view, FormInterface $form, array $options): void;
56-
57-
public function configureOptions(OptionsResolver $resolver): void;
58-
59-
/**
60-
* Gets the extended types.
61-
*
62-
* @return string[]
63-
*/
64-
public static function getExtendedTypes(): iterable;
6568
}

FormTypeInterface.php

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,23 @@
1818
*/
1919
interface FormTypeInterface
2020
{
21+
/**
22+
* Returns the name of the parent type.
23+
*
24+
* The parent type and its extensions will configure the form with the
25+
* following methods before the current implementation.
26+
*
27+
* @return string|null
28+
*/
29+
public function getParent();
30+
31+
/**
32+
* Configures the options for this type.
33+
*
34+
* @return void
35+
*/
36+
public function configureOptions(OptionsResolver $resolver);
37+
2138
/**
2239
* Builds the form.
2340
*
@@ -69,13 +86,6 @@ public function buildView(FormView $view, FormInterface $form, array $options);
6986
*/
7087
public function finishView(FormView $view, FormInterface $form, array $options);
7188

72-
/**
73-
* Configures the options for this type.
74-
*
75-
* @return void
76-
*/
77-
public function configureOptions(OptionsResolver $resolver);
78-
7989
/**
8090
* Returns the prefix of the template block name for this type.
8191
*
@@ -85,11 +95,4 @@ public function configureOptions(OptionsResolver $resolver);
8595
* @return string
8696
*/
8797
public function getBlockPrefix();
88-
89-
/**
90-
* Returns the name of the parent type.
91-
*
92-
* @return string|null
93-
*/
94-
public function getParent();
9598
}

0 commit comments

Comments
 (0)