Skip to content

Commit 9c99c36

Browse files
Revert "minor symfony#61697 [Form] Add better type information using PHPDoc (azjezz)"
This reverts commit 615b0e9, reversing changes made to 4f4a40a.
1 parent 0c27c77 commit 9c99c36

17 files changed

+14
-139
lines changed

src/Symfony/Component/Form/AbstractType.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
use Symfony\Component\OptionsResolver\OptionsResolver;
1717

1818
/**
19-
* @template T
20-
*
21-
* @implements FormTypeInterface<T>
22-
*
2319
* @author Bernhard Schussek <[email protected]>
2420
*/
2521
abstract class AbstractType implements FormTypeInterface
@@ -40,28 +36,20 @@ public function configureOptions(OptionsResolver $resolver)
4036
}
4137

4238
/**
43-
* @param FormBuilderInterface<T> $builder
44-
*
4539
* @return void
4640
*/
4741
public function buildForm(FormBuilderInterface $builder, array $options)
4842
{
4943
}
5044

5145
/**
52-
* @param FormView<T> $form
53-
* @param FormInterface<T> $view
54-
*
5546
* @return void
5647
*/
5748
public function buildView(FormView $view, FormInterface $form, array $options)
5849
{
5950
}
6051

6152
/**
62-
* @param FormView<T> $form
63-
* @param FormInterface<T> $view
64-
*
6553
* @return void
6654
*/
6755
public function finishView(FormView $view, FormInterface $form, array $options)

src/Symfony/Component/Form/AbstractTypeExtension.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
use Symfony\Component\OptionsResolver\OptionsResolver;
1515

1616
/**
17-
* @template T
18-
*
19-
* @implements FormTypeExtensionInterface<T>
20-
*
2117
* @author Bernhard Schussek <[email protected]>
2218
*/
2319
abstract class AbstractTypeExtension implements FormTypeExtensionInterface
@@ -26,25 +22,14 @@ public function configureOptions(OptionsResolver $resolver): void
2622
{
2723
}
2824

29-
/**
30-
* @param FormBuilderInterface<T> $builder
31-
*/
3225
public function buildForm(FormBuilderInterface $builder, array $options): void
3326
{
3427
}
3528

36-
/**
37-
* @param FormView<T> $form
38-
* @param FormInterface<T> $view
39-
*/
4029
public function buildView(FormView $view, FormInterface $form, array $options): void
4130
{
4231
}
4332

44-
/**
45-
* @param FormView<T> $form
46-
* @param FormInterface<T> $view
47-
*/
4833
public function finishView(FormView $view, FormInterface $form, array $options): void
4934
{
5035
}

src/Symfony/Component/Form/Event/PostSetDataEvent.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@
1919
*
2020
* It can be used to modify a form depending on the populated data (adding or
2121
* removing fields dynamically).
22-
*
23-
* @template T
24-
*
25-
* @extends FormEvent<T>
2622
*/
2723
final class PostSetDataEvent extends FormEvent
2824
{

src/Symfony/Component/Form/Event/PostSubmitEvent.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@
1919
* once the model and view data have been denormalized.
2020
*
2121
* It can be used to fetch data after denormalization.
22-
*
23-
* @template T
24-
*
25-
* @extends FormEvent<T>
2622
*/
2723
final class PostSubmitEvent extends FormEvent
2824
{

src/Symfony/Component/Form/Event/PreSetDataEvent.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717
* This event is dispatched at the beginning of the Form::setData() method.
1818
*
1919
* It can be used to modify the data given during pre-population.
20-
*
21-
* @template T
22-
*
23-
* @extends FormEvent<T>
2420
*/
2521
final class PreSetDataEvent extends FormEvent
2622
{

src/Symfony/Component/Form/Event/PreSubmitEvent.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
* It can be used to:
2020
* - Change data from the request, before submitting the data to the form.
2121
* - Add or remove form fields, before submitting the data to the form.
22-
*
23-
* @extends FormEvent<array<string, mixed>>
2422
*/
2523
final class PreSubmitEvent extends FormEvent
2624
{

src/Symfony/Component/Form/Event/SubmitEvent.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@
1818
* transforms back the normalized data to the model and view data.
1919
*
2020
* It can be used to change data from the normalized representation of the data.
21-
*
22-
* @template T
23-
*
24-
* @extends FormEvent<T>
2521
*/
2622
final class SubmitEvent extends FormEvent
2723
{

src/Symfony/Component/Form/Form.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,7 @@
6868
* @author Fabien Potencier <[email protected]>
6969
* @author Bernhard Schussek <[email protected]>
7070
*
71-
* @template T
72-
*
7371
* @implements \IteratorAggregate<string, FormInterface>
74-
* @implements FormInterface<T>
7572
*/
7673
#[AssertForm]
7774
#[Traverse(false)]

src/Symfony/Component/Form/FormBuilderInterface.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
/**
1515
* @author Bernhard Schussek <[email protected]>
1616
*
17-
* @template T
18-
*
19-
* @extends FormConfigBuilderInterface<T>
2017
* @extends \Traversable<string, FormBuilderInterface>
2118
*/
2219
interface FormBuilderInterface extends \Traversable, \Countable, FormConfigBuilderInterface
@@ -35,9 +32,9 @@ public function add(string|self $child, ?string $type = null, array $options = [
3532
/**
3633
* Creates a form builder.
3734
*
38-
* @param string $name The name of the form or the name of the property
39-
* @param class-string<FormTypeInterface>|null $type The type of the form or null if name is a property
40-
* @param array<string, mixed> $options
35+
* @param string $name The name of the form or the name of the property
36+
* @param string|null $type The type of the form or null if name is a property
37+
* @param array<string, mixed> $options
4138
*/
4239
public function create(string $name, ?string $type = null, array $options = []): self;
4340

@@ -67,8 +64,6 @@ public function all(): array;
6764

6865
/**
6966
* Creates the form.
70-
*
71-
* @return FormInterface<T>
7267
*/
7368
public function getForm(): FormInterface;
7469
}

src/Symfony/Component/Form/FormConfigBuilderInterface.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,15 @@
1313

1414
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
1515
use Symfony\Component\PropertyAccess\PropertyPathInterface;
16-
use Symfony\Component\Form\Event\PreSetDataEvent;
17-
use Symfony\Component\Form\Event\PreSubmitEvent;
18-
use Symfony\Component\Form\Event\PostSetDataEvent;
19-
use Symfony\Component\Form\Event\SubmitEvent;
20-
use Symfony\Component\Form\Event\PostSubmitEvent;
2116

2217
/**
23-
* @template T
24-
*
25-
* @extends FormConfigInterface<T>
26-
*
2718
* @author Bernhard Schussek <[email protected]>
2819
*/
2920
interface FormConfigBuilderInterface extends FormConfigInterface
3021
{
3122
/**
3223
* Adds an event listener to an event on this form.
3324
*
34-
* @param FormEvents::* $eventName
35-
* @param (callable(PreSetDataEvent<T>): void)|(callable(PostSetDataEvent<T>): void)|(callable(PreSubmitEvent): void)|(callable(SubmitEvent<T>): void)|(callable(PostSubmitEvent<T>): void) $listener
3625
* @param int $priority The priority of the listener. Listeners
3726
* with a higher priority are called before
3827
* listeners with a lower priority.
@@ -258,8 +247,6 @@ public function setAutoInitialize(bool $initialize): static;
258247

259248
/**
260249
* Builds and returns the form configuration.
261-
*
262-
* @return FormConfigInterface<T>
263250
*/
264251
public function getFormConfig(): FormConfigInterface;
265252

0 commit comments

Comments
 (0)