We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API Platform version(s) affected: 2.6.8
Description It looks like the ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\Searchfilter.php can not be decorated as other services in symfony.
How to reproduce
If I directly edit this file, my changes are working.
The Service definition of the original looks like this:
<service id="api_platform.doctrine.orm.search_filter" class="ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter" public="false" abstract="true"> <argument type="service" id="doctrine" /> <argument>null</argument> <argument type="service" id="api_platform.iri_converter" /> <argument type="service" id="api_platform.property_accessor" /> <argument type="service" id="logger" on-invalid="ignore" /> <argument key="$identifiersExtractor" type="service" id="api_platform.identifiers_extractor.cached" on-invalid="ignore" /> <argument key="$nameConverter" type="service" id="api_platform.name_converter" on-invalid="ignore" /> </service> <service id="ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter" alias="api_platform.doctrine.orm.search_filter" />
I duplicated the file with my changes, moved it to App\Api\Core\Bridge\Doctrine\Orm\Filter\SearchFilter.php and added this to my services.yaml:
App\Api\Core\Bridge\Doctrine\Orm\Filter\SearchFilter: decorates: api_platform.doctrine.orm.search_filter
After that I reverted the changes on the original file. My changes are now no longer working, it looks as if my new file is completely ignored.
But if I run php bin/console debug:container api_platform.doctrine.orm.search_filter
I do get:
// This service is a private alias for the service // App\Api\Core\Bridge\Doctrine\Orm\Filter\SearchFilter
Overriding other services in the same way does work just fine:
App\Api\Doctrine\DataProvider\ItemDataProvider: decorates: api_platform.doctrine.orm.default.item_data_provider
The text was updated successfully, but these errors were encountered:
implement your own, search filter is quite complicated and will probably need refactoring. If you really need the code, just copy paste.
Sorry, something went wrong.
Edit #5995 will help
No branches or pull requests
API Platform version(s) affected: 2.6.8
Description
It looks like the ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\Searchfilter.php can not be decorated as other services in symfony.
How to reproduce
If I directly edit this file, my changes are working.
The Service definition of the original looks like this:
I duplicated the file with my changes, moved it to App\Api\Core\Bridge\Doctrine\Orm\Filter\SearchFilter.php and added this to my services.yaml:
After that I reverted the changes on the original file. My changes are now no longer working, it looks as if my new file is completely ignored.
But if I run
php bin/console debug:container api_platform.doctrine.orm.search_filter
I do get:
Overriding other services in the same way does work just fine:
The text was updated successfully, but these errors were encountered: