Skip to content

Commit

Permalink
Update filters.md (#1869)
Browse files Browse the repository at this point in the history
```php
abstract class AbstractFilter implements FilterInterface :

public function __construct(protected ManagerRegistry $managerRegistry, LoggerInterface $logger = null, protected ?array $properties = null, protected ?NameConverterInterface $nameConverter = null)
{
    $this->logger = $logger ?? new NullLogger();
}
```

The tild should not be in second position, it should be the log as shown in the AbstractFilter constructor
  • Loading branch information
fouteox authored Jan 10, 2024
1 parent e6ca334 commit 822fcca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,7 @@ services:
# This whole definition can be omitted if automatic service loading is enabled
'App\Filter\RegexpFilter':
# The "arguments" key can be omitted if the autowiring is enabled
arguments: [ '@doctrine', ~, '@?logger' ]
arguments: [ '@doctrine', '@?logger' ]
# The "tags" key can be omitted if the autoconfiguration is enabled
tags: [ 'api_platform.filter' ]
```
Expand All @@ -1343,7 +1343,7 @@ it can also be enabled for some properties:
# api/config/services.yaml
services:
'App\Filter\RegexpFilter':
arguments: [ '@doctrine', ~, '@?logger', { email: ~, anOtherProperty: ~ } ]
arguments: [ '@doctrine', '@?logger', { email: ~, anOtherProperty: ~ } ]
tags: [ 'api_platform.filter' ]
```

Expand Down

0 comments on commit 822fcca

Please sign in to comment.