gbourgeat/elasticsearch-bundle
A Symfony bundle for integrating Elasticsearch into your PHP applications, providing configuration, service wiring, and convenient tooling for indexing and querying Elasticsearch from Symfony projects.
Framing correction up front: this package is a Symfony bundle, not a Laravel package, despite how it was filed. It is a PHP 7.2-targeted fork in the ONGR ElasticsearchBundle lineage — annotation-driven document mapping, a Symfony DI compiler pass, and bin/console index commands. There is no ServiceProvider, no publishable config, no Artisan surface. That single fact is the dominant input to every section below.
elasticsearch/elasticsearch (elasticsearch-php), which we can bind directly in ~100 lines. We would be paying for an integration layer we cannot use.symfony/dependency-injection and symfony/config — but this is a known anti-pattern. It imports a second DI container into the application, gives us two competing configuration systems, and makes container resolution/debugging materially harder. Cost/benefit is negative. Not recommended.elastic/elasticsearch-php client (v8+) plus a purpose-built Laravel driver._doc API surface — silent incompatibilities are expected, not hypothetical.elasticsearch/elasticsearch client major does this fork pin, and which ES server majors does that client support?elastic/elasticsearch-php v8 behind an internal SearchGateway interface, or laravel/scout with an Elasticsearch driver if the requirement is document search with light filtering. We will write less glue than integrating the Symfony bridge would cost.SearchGateway with index, bulkIndex, delete, search, and reindexByAlias. This is the load-bearing decision; it makes build-vs-adopt reversible.elasticsearch-php directly (recommended) or, in the legacy-Symfony case only, as a thin adapter over the bundle's repositories.search:reindex / search:index Artisan commands. This is roughly a week of engineering and eliminates the dependency entirely.symfony/* component constraints are likely in a monorepo, and Composer resolution fights are a realistic outcome.Content-Type rejections on ES 8 presenting as opaque 406s.items[].status.symfony/*.Bottom line: Do not adopt for a Laravel stack. The fork's value is locked behind Symfony idioms, and its abandonment profile (0 stars, 0 dependents, score 0, PHP 7.2 pin, discontinued lineage) makes it a liability rather than an accelerant. The correct move is a thin, owned wrapper over the official elastic/elasticsearch-php v8 client behind an internal SearchGateway interface — a week of work that survives the PHP 8 and ES 8 upgrade paths. If any Symfony-on-7.2 legacy surface genuinely exists, treat the bundle as a time-boxed, quarantined accelerant with a named owner and a documented exit ticket already filed.
How can I help you explore Laravel packages today?