Skip to content

Commit faecff6

Browse files
committed
Fix annotation mentions in documentation
1 parent b465daa commit faecff6

File tree

1 file changed

+2
-23
lines changed

1 file changed

+2
-23
lines changed

README.md

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -76,28 +76,7 @@ You can also directly typehint a filter class, like `Squirrel\Strings\Filter\Nor
7676

7777
#### Form string filtering
7878

79-
This bundle automatically configures string filters for your form values that you can use via annotations, example:
80-
81-
```php
82-
<?php
83-
84-
use Squirrel\Strings\Annotation\StringFilter;
85-
86-
class NewsletterChangeAction
87-
{
88-
/**
89-
* @StringFilter({"StreamlineInputNoNewlines","RemoveHTMLTags"})
90-
*/
91-
public string $firstName = '';
92-
93-
/**
94-
* @StringFilter("RemoveNonAlphanumeric")
95-
*/
96-
public string $confirmToken = '';
97-
}
98-
```
99-
100-
With PHP8 you can use attributes instead of annotations:
79+
This bundle automatically configures string filters for your form values that you can use via attributes, example:
10180

10281
```php
10382
<?php
@@ -129,7 +108,7 @@ services:
129108
- { name: squirrel.strings.filter, filter: MyCustomStringFilter }
130109
```
131110
132-
The filter will be available in `Squirrel\Strings\StringFilterSelectInterface` under the name `MyCustomStringFilter` (the `filter` value you defined for the tag) as well as in StringFilter annotations.
111+
The filter will be available in `Squirrel\Strings\StringFilterSelectInterface` under the name `MyCustomStringFilter` (the `filter` value you defined for the tag) as well as in the StringFilter attribute.
133112

134113
### Random string generators
135114

0 commit comments

Comments
 (0)