You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to this issue, the deprecated elasticsearch option under ApiResource is replaced by setting the provider in the operation as so:
new Get(provider: ItemProvider::class)
That does not seem to prevent a warning. In the case below, the entity SocieteComplement is provided by Doctrine.
It will do likewise for all entities with ApiResource() that do not have a corresponding ES index as provider.
app.WARNING: Request Failure: {"method":"GET","uri":"http://localhost:9200/_cat/indices/societe_complement","port":9200,"headers":{"Host":["localhost"],"Content-Type":["application/json"],"Accept":["application/json"],"User-Agent":["elasticsearch-php/7.17.1 (WINNT 10.0; PHP 8.2.2)"],"x-elastic-client-meta":["es=7.17.1,php=8.2.2,t=7.17.1,a=0,cu=7.85.0"]},"HTTP code":404,"duration":0.001982,"error":"{"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index [societe_complement]","resource.type":"index_or_alias","resource.id":"societe_complement","index_uuid":"na","index":"societe_complement"}],"type":"index_not_found_exception","reason":"no such index [societe_complement]","resource.type":"index_or_alias","resource.id":"societe_complement","index_uuid":"na","index":"societe_complement"},"status":404}"} []
[2023-03-22T15:49:37.660584+01:00] app.WARNING: Response ["{"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index [societe_complement]","resource.type":"index_or_alias","resource.id":"societe_complement","index_uuid":"na","index":"societe_complement"}],"type":"index_not_found_exception","reason":"no such index [societe_complement]","resource.type":"index_or_alias","resource.id":"societe_complement","index_uuid":"na","index":"societe_complement"},"status":404}"] []
How to reproduce
Do not include de elasticsearch: false option on `ApiResource(). Of course, if you do include that option you will have the deprecation warning.
Possible Solution
Additional Context
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
API Platform version(s) affected: 3.1.3
Description
According to this issue, the deprecated
elasticsearch
option underApiResource
is replaced by setting the provider in the operation as so:That does not seem to prevent a warning. In the case below, the entity SocieteComplement is provided by Doctrine.
It will do likewise for all entities with
ApiResource()
that do not have a corresponding ES index as provider.How to reproduce
Do not include de
elasticsearch: false
option on `ApiResource(). Of course, if you do include that option you will have the deprecation warning.Possible Solution
Additional Context
The text was updated successfully, but these errors were encountered: