Skip to content

[BC][2.7] ES extensions no longer executed #5363

@darthf1

Description

@darthf1

Hi!

I'm trying to upgrade from v2.6.8 to v2.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:

<?php declare(strict_types=1); namespace App\MyNamespace; use ApiPlatform\Core\Bridge\Elasticsearch\DataProvider\Extension\RequestBodySearchCollectionExtensionInterface; final class MyESExtension implements RequestBodySearchCollectionExtensionInterface { public function applyToCollection(array $requestBody, string $resourceClass, ?string $operationName = null, array $context = []): array { .... } }

When I put a breakpoint inside the applyToCollection function, I noticed It's not called in v2.7.7 and it is called in v2.6.8.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions