Skip to content

Commit 31e50c7

Browse files
committed
minor #7592 Drop misleading @internal annotation on TextFilterType (lacatoire)
This PR was merged into the 5.x branch. Discussion ---------- Drop misleading `@internal` annotation on TextFilterType ``TextFilterType`` carried ```@internal` Don't use this to define a text filter. Use Filter\\TextFilter instead.``, but ``Filter\\TextFilter::new()`` itself does ``->setFormType(TextFilterType::class)``: any custom filter that wants to reuse the text-filter form (e.g. an OR-flavored text filter) must reference ``TextFilterType``. The annotation made phpstan flag every legitimate external reference and steered users toward ``Filter\\TextFilter`` instead, which is not a ``FormTypeInterface`` and crashes the form registry. Removing the annotation aligns ``TextFilterType`` with the 8 sibling ``*FilterType`` classes (``ArrayFilterType``, ``BooleanFilterType``, ``ChoiceFilterType``, ``ComparisonFilterType``, ``DateTimeFilterType``, ``EntityFilterType``, ``NullFilterType``, ``NumericFilterType``) which carry no such annotation. No behavior change. Closes #7393 Commits ------- dd676f9 Drop misleading `@internal` annotation on TextFilterType
2 parents 0846e65 + dd676f9 commit 31e50c7

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

src/Form/Filter/Type/TextFilterType.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
/**
1313
* @author Yonel Ceruto <yonelceruto@gmail.com>
14-
*
15-
* @internal Don't use this to define a text filter. Use Filter\TextFilter instead.
1614
*/
1715
class TextFilterType extends AbstractType
1816
{

0 commit comments

Comments
 (0)