sejbot
sejbot

Reputation: 23

Is it possible to use ongr-elasticsearch bundle without AppBundle in Symfony 4?

I'm in the process of upgrading a project from Symfony 2 to Symfony 4. As per the recommendation from Symfony, I no longer use AppBundle, instead all the code is directly under src/.

My question is how should I configure the manager when I'm no longer using AppBundle, if it is possible? I'm using latest stable version 5.2.4 of ongr-elasticsearch.

My config is below. In the mappings section I need to put a bundle name. Is there some way to get around this?

ongr_elasticsearch:
    managers:
        default:
            index:
                hosts:
                    - "%elasticsearch_host%:%elasticsearch_port%"
                index_name: "%database_name%"
            mappings:
                - AppBundle
            bulk_size: 300

Upvotes: 2

Views: 325

Answers (1)

saimaz
saimaz

Reputation: 301

It's not possible to use v5 without bundles, but the 6th version has support for it as well as for Symfony flex. At the moment of writing, this version is in beta2 and no major issues were found so should be released stable very soon.

Upvotes: 1

Related Questions