FOSElasticaBundle icon indicating copy to clipboard operation
FOSElasticaBundle copied to clipboard

The clients url requires slash `/` at the end

Open Ferror opened this issue 3 years ago • 1 comments

Scenario

The config below with the value ELASTICSEARCH_URL=http://elasticsearch:9200 will result in the Malformed URL exception. But it will be valid for the ELASTICSEARCH_URL=http://elasticsearch:9200/ value. It seems like a bad developer experience. Especially when other Symfony URLs do not require it.

fos_elastica:
    clients:
            default:
                url: '%env(ELASTICSEARCH_URL)%'

The expected behavior:

I can provide a URL with a slash or without at the end of the URL and both gonna be valid.

Ferror avatar Sep 26 '22 13:09 Ferror

This is about what is supported in Elastica itself. That's the place to request making the / optional.

stof avatar Apr 25 '23 11:04 stof