short-edition/elastica-bundle
A Symfony bundle that integrates the Elastica client for Elasticsearch: define indexes and mappings in configuration, index documents automatically, and run full-text queries through repository services to add fast, scalable search to your PHP application.
Search feature scoping and roadmap sizing. This package directly informs whether full-text search, faceted filtering, autocomplete, and relevance tuning ship in v1 or slip a quarter. An integration layer like this changes search from "a two-sprint plumbing exercise" into "a focusing exercise on relevance and mapping." That is a roadmap-shaping input, not just an engineering detail.
Build vs. buy vs. integrate. Three credible paths exist for search: (a) hand-rolled HTTP calls to Elasticsearch, (b) an integration layer like this bundle, (c) managed search (Algolia, Typesense, Meilisearch, Elastic Cloud). This package represents path (b): it outsources framework glue (client registration, DI wiring, index/type management, document persistence helpers) while you retain full ownership of the cluster, index lifecycle, and relevance tuning. The PM decision is which of these three paths gets funded for the next two quarters.
Framework fit is a gating decision, and it cuts against the stated premise. Despite the "Laravel/PHP" framing, this is a Symfony bundle — a fork of friendsofsymfony/elastica-bundle (FOSElasticaBundle). It integrates through Symfony DI container extensions, compiler passes, YAML/XML service definitions, console commands, and Doctrine event subscribers. None of those integration points exist in Laravel, and Laravel's ORM is Eloquent, so the bundle's core differentiator — the Doctrine subscriber that auto-indexes on entity persist/update/delete — is inert. For a Laravel product, the real decision is laravel/scout plus an Elasticsearch driver, or the official elasticsearch/elasticsearch client behind a repository interface. Flagging this early prevents burning a spike on the wrong ecosystem.
Fork vs. upstream is a product-risk decision. The product-relevant question is not "is the code good" — the API and behavior are essentially upstream's — it's "do we depend on a zero-star, zero-dependent fork, or on the maintained upstream project?" That is a maintenance-ownership commitment, not a technical preference.
Data-sync architecture and its ops cost. The bundle's Doctrine listeners and console populate commands determine how entity changes propagate to the index. That shapes whether the product needs a queue, a cron reindex, or event-driven sync — a recurring operational cost that should be on the roadmap, not discovered in production.
Infrastructure standardization and upgrade coupling. Elastica's client version pins constrain which Elasticsearch majors the product can run. Adopting this couples an infra upgrade (ES 7 → 8, or a move to OpenSearch) to a library upgrade, which is a planning input for platform-level roadmap decisions.
Use-case validation. This layer is a good fit for aggregation-heavy, relevance-tuned, Elasticsearch-specific search on a Doctrine-backed application. It is a poor fit for small datasets where Postgres full-text or a trigram index would remove an entire system from the architecture, and for semantic/vector search where Elastica's abstraction trails the official client.
Consider it — as upstream friendsofsymfony/elastica-bundle, not this fork — when:
Look elsewhere when:
laravel/scout with an Elasticsearch driver (babenkoivan/scout-elasticsearch-driver or matchish/laravel-scout-elasticsearch), or the official client behind a SearchIndex port. Both are maintained, version-tracked, and Eloquent-native. Bootstrapping a Symfony container inside Laravel to use this bundle is roughly 1–2 engineer-weeks of adapter work that buys almost none of the bundle's value.To executives: Search is a differentiator; this package is plumbing, not the differentiator. It is an MIT-licensed Symfony integration built on a mature upstream project (FOSElasticaBundle), and it could save meaningful engineering time on index sync and configuration. Two caveats matter for the decision. First, this specific fork has essentially zero adoption and no community backstop — no issue triage, no documented security response path, no patch pipeline. Second, and more importantly, it is a Symfony bundle, not a Laravel package; on a Laravel stack it is architecturally mismatched and the standard answer is Laravel Scout plus a maintained driver. Ask: fund a one-week, time-boxed spike to validate mapping, population, and a zero-downtime reindex on a realistic index, run in parallel with a build-vs-managed-search comparison. The output is a go/no-go on self-hosted Elasticsearch — not a commitment to this package.
To engineering: It wraps Elastica with Symfony DI, declarative index mapping, Doctrine listeners for population, and reindex commands — real boilerplate you do not want to write, on a Symfony/Doctrine stack. On Laravel, the Doctrine subscriber and bundle wiring are inert and you would be writing an adapter to reach a feature you will not use; take Scout plus a driver instead. If the stack is Symfony, audit the fork's delta from upstream FOSElasticaBundle first, pin the version exactly, and confirm the Elastica client supports our target Elasticsearch version. If the delta is cosmetic, take upstream. Either way, define a transport-agnostic SearchIndex port before choosing a library, forbid direct Elastica\* usage in application code, and decouple writes from indexing — the Doctrine listeners are synchronous by default, so a cluster blip lands inside the user request.
What to fund: a one-week spike that validates mapping, population, and a zero-downtime reindex on a realistic index, plus a short build-vs-managed-search comparison. Output is a go/no-go on self-hosted Elasticsearch and a decision on a search-port abstraction that keeps the library choice reversible. Treat this package as rejected for a Laravel stack and redundant on a Symfony stack absent a documented, upstream-pending fix.
How can I help you explore Laravel packages today?