marmelab/sonata-elastica-bundle
Integrates Elasticsearch with Sonata Admin via Elastica, enabling fast full-text search and filtering for Doctrine entities. Configure indices, index admin-managed records, and use Elasticsearch-backed queries in Sonata lists for scalable search.
Architecture fit. This is the first thing a TPM must nail down, because it changes the entire plan: marmelab/sonata-elastica-bundle is a Symfony bundle, not a Laravel package. It exists to swap SonataAdminBundle's Doctrine-backed datagrid for an Elasticsearch query through Elastica/FOSElasticaBundle. It hooks Sonata's AdminInterface, DatagridMapper, and ModelManager — none of which have a Laravel analogue. In a Laravel codebase there is no container binding, no facade, and no seam to sit behind Eloquent. The honest architecture statement for the plan is: this is a Symfony/Sonata admin plugin we would have to host as a separate application, or a pattern we reimplement.
Integration feasibility. Only two viable shapes. (a) Reimplement the pattern in Laravel — a custom repository/Builder that translates admin filters and sort into an ES query and returns an Illuminate\Pagination\LengthAwarePaginator, with writes synced via model events or an outbox. (b) Sidecar Symfony admin — a separate deployable running Sonata Admin + FOSElastica against the same cluster, with Laravel as system of record. Direct embedding inside Laravel is not supportable. Both are multi-week efforts; neither ships this package as a dependency.
Technical risk. High, and mostly organizational rather than technical. The repo is archived — no security patches, no PHP 8.x deprecation fixes, no Elasticsearch 8+/OpenSearch compatibility work. 43 stars and 0 dependents means negligible production usage and no community to lean on. Pins will be old Symfony (2.x/3.x), old Sonata Admin (current lines are 4.x/5.x with changed datagrid interfaces), and old Elastica (7.x). Expect composer conflicts before any feature work, and treat the archive as a hard ceiling, not a floor.
Key questions.
Stack fit. Near zero as a dependency. The bundle assumes Symfony full-stack, Sonata Admin, FOSElastica or a raw Elastica\Client, Doctrine entities with annotations, and Twig admin templates. A Laravel shop supplies none of these. Frame the integration effort as "copy the ~few-hundred-line adapter logic, not the package."
Migration path. Three options, ranked for a TPM plan:
Eloquent-shaped repository, pagination in Laravel, write path kept in sync by observers/queue. Stays in-stack, no new deployable, no new on-call surface.Compatibility. Verify before estimating: supported PHP range, Symfony constraint, sonata-project/admin-bundle version, FOSElastica vs. standalone ruflin/elastica, and target ES server version. Because the repo is archived, any mismatch is a permanent blocker or a fork task — add it to the estimate as a real line item, not a spike risk.
Sequencing. (a) Profile the current admin listing; if the DB isn't the bottleneck, stop and re-scope. (b) One-screen Laravel-native ES read-path spike, timeboxed to 1–2 weeks, with a defined success metric (p95 latency, query count, operator-reported throughput). (c) If a sidecar is still on the table, prove SSO + shared index + schema in a second timeboxed spike. (d) Only then decide whether any MIT-licensed code is worth copying.
Maintenance. Effectively "we own it." Archived + MIT means fork-and-maintain is the only durable posture: no upstream bumps, no CVE response, and every future ES upgrade (7→8→9, mapping-type removal) is our project. TPM action: log this as a standing tax with a named owner and a recurring upgrade estimate, even for a pattern-copy.
Support. No vendor, no active maintainer, no issue triage, no community corpus at 43 stars / 0 dependents. Knowledge will sit one or two engineers deep. Budget for writing runbooks from scratch and for source-reading as the primary diagnostic method.
Scaling. The read path offloads list queries to ES by design, but the bundle is a UI adapter, not a pipeline. Indexing, reindexing, and freshness are delegated upstream or unowned. In a Laravel-as-source-of-truth design the hard scaling problem moves to sync: outbox depth, queue lag, dual-write consistency, reindex windows. Cluster sizing, shard strategy, and refresh intervals are ours regardless.
Failure modes. (1) Composer dead-end — a transitive pin blocks a PHP/Symfony upgrade and freezes the app. (2) Index drift — admin lists return stale/missing rows while mutations succeed in Laravel, eroding operator trust; this is the highest-probability day-2 issue and needs a reconciliation job in the plan. (3) ES outage — list views hard-fail or degrade silently; confirm fallback behavior up front and decide the product answer. (4) Mapping mismatch — filters silently return wrong result sets, worse than an error because it's invisible. (5) Bus factor — one engineer understands the adapter; mitigate with tests and a written design note.
Ramp-up. Estimate 1–2 weeks for an engineer fluent in the admin stack just to reach productivity on this bundle's source and pinned versions; add Elasticsearch operational depth (mappings, analyzers, reindex procedures) if the team hasn't run an ES-backed admin before. TPM framing for stakeholders: cap the downside with a timeboxed spike and a default outcome of pattern reuse over dependency adoption; approve the experiment, but require a named owner and an exit plan before anything ships to an operator-facing path.
How can I help you explore Laravel packages today?