Skip to content
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

feat(elasticsearch): re-introduce v7 support #6827

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

darthf1
Copy link
Contributor

@darthf1 darthf1 commented Nov 26, 2024

Q A
Branch? main
Tickets closes #6788
License MIT
Doc PR api-platform/docs#...

This PR re-introduces ES7 support, by simply introducing the v7 client namespaces.

@darthf1 darthf1 marked this pull request as draft November 26, 2024 08:41
@darthf1 darthf1 changed the title feat(elasticsearch): introduce v7 support feat(elasticsearch): re-introduce v7 support Nov 26, 2024
@darthf1 darthf1 force-pushed the feat/add-es-7-support branch from 79eb593 to 35160cf Compare December 22, 2024 07:43
@darthf1
Copy link
Contributor Author

darthf1 commented Dec 22, 2024

@soyuka i tried to add back ES v7 support, with as less changes as possible. I commented above the code whether it involves ES v7 or v8 and up, which should make maintenance a bit easier, also when ES 7 has been declared EOL. There were still some ES7 checks in the code, so i just added comments above them.

As for the phpstan errors; can I add them to the baseline? I get more errors locally than in CI, so I'm not sure if everything is setup correctly. In the phpstan.neon.dist keys like containerXmlPath and constantHassers are used, but those are phpstan v2 keys.

Behat tests fail, they give the following error:

In Validator.php line 61:
                                                                                                                                        
  Can not find a matching value for an argument `$client` of the method `ApiPlatform\Tests\Behat\ElasticsearchContext::__construct()`.  

I'm not a Behat user; do you maybe have some thoughts how to resolve this? I added a new behat job for ES v7, it looks like these are successful.

@darthf1 darthf1 marked this pull request as ready for review December 22, 2024 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Elasticsearch namespace reference error
1 participant