-
-
Notifications
You must be signed in to change notification settings - Fork 868
New issue
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
[BC][2.7] ES extensions no longer executed #5363
Comments
probably that our ES provider is not called anymore, I guess you can't update to 3.x ? Is the ElasticsearchProvider called ? It's also possible that this interface namespace changed and that we forgot to tag this old interface |
If the provider would not be called, would I get a result at all? Because my issue is that the request body does not get altered (by me) because the extension is not called, not that I get no results at all. I'll investigate.
I would really love to migrate to 3.x, especially with the new ES features released in 3.1, but I was hoping I could do it incrementally. |
Yep that was it! I've added the below to my <?php
declare(strict_types=1);
namespace MyNamespace;
use ApiPlatform\Core\Bridge\Elasticsearch\DataProvider\Extension\RequestBodySearchCollectionExtensionInterface;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return static function (ContainerConfigurator $containerConfigurator): void {
....
$services->instanceof(RequestBodySearchCollectionExtensionInterface::class)
->tag('api_platform.elasticsearch.request_body_search_extension.collection')
;
} |
Feel free to patch this on 2.7! |
Hi!
I'm trying to upgrade from
v2.6.8
tov2.7.7
.#5283 fixes a lot of issues for me, but now a few of my tests return errors because the API output is different as expected; I get more
hydra:items
returned as expected.I use an extension, to perform additional filtering on the results if needed, by changing the ES request body:
When I put a breakpoint inside the
applyToCollection
function, I noticed It's not called inv2.7.7
and it is called inv2.6.8
.The text was updated successfully, but these errors were encountered: