Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Sonata Elastica Bundle

Sonata Elastica Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Power the Sonata Admin list view and filters by an ElasticSearch index to speed up navigation.

Frequently asked questions about Sonata Elastica Bundle
Is marmelab/sonata-elastica-bundle compatible with Laravel?
No. It is a Symfony bundle built for SonataAdminBundle and FOSElastica/Elastica, and it hooks Sonata's AdminInterface, DatagridMapper, and ModelManager, which have no Laravel equivalents. There is no service provider, facade, or Eloquent seam, so it cannot be dropped into a Laravel application. Laravel teams should treat it as a reference pattern rather than a dependency.
Can I install sonata-elastica-bundle in a Laravel project with Composer?
Composer may resolve the package, but installing it does nothing useful in Laravel. Its classes assume Symfony full-stack, Sonata Admin, Doctrine annotations, and Twig admin templates, none of which exist in a standard Laravel app. You would also hit Symfony and Sonata version constraints that conflict with a modern Laravel stack. The practical answer is no.
What is the Laravel equivalent of sonata-elastica-bundle?
The closest Laravel-native approach is Laravel Scout with an Elasticsearch or Meilisearch driver, or a custom Elasticsearch repository that returns an Illuminate\Pagination\LengthAwarePaginator. You translate your admin filters and sort parameters into an Elasticsearch query and keep writes in sync through model observers or a queued outbox. This stays in-stack with no extra deployable and covers the same read-path acceleration.
How do I power a Laravel admin list view with Elasticsearch instead of Eloquent?
Build a repository or query builder that accepts your filter and sort input, composes an Elasticsearch query, and returns paginated results as a LengthAwarePaginator. Keep the database as the system of record and sync documents via model events, observers, or a queue-based outbox. Add a fallback to Eloquent for consistency and when the index is unavailable. This mirrors what sonata-elastica-bundle does for Sonata, without the Symfony coupling.
Which Laravel versions does sonata-elastica-bundle support?
None. The bundle predates modern Laravel and targets Symfony 2.x/3.x with Sonata Admin and Elastica 7.x-era constraints. Because the repository is archived, there will be no Laravel support added. Do not plan around a future release.
Is sonata-elastica-bundle still maintained?
No, the repository is archived. There are no security patches, PHP 8.x deprecation fixes, or Elasticsearch 8+/OpenSearch compatibility updates. It has roughly 43 stars and no dependents, so there is no community to rely on. Treat the archive status as a hard ceiling for any production use.
What are the risks of using an archived Composer package like sonata-elastica-bundle?
You inherit unpatched security issues, PHP and Symfony deprecation warnings, and pinned dependencies that will conflict with current stacks. You also take on all maintenance, including Elasticsearch client upgrades and Sonata Admin datagrid interface changes. In an operator-facing admin path, that means a named owner and a funded fork backlog, not a one-off install.
Does sonata-elastica-bundle support Elasticsearch 8 or OpenSearch?
There is no official support. The bundle is pinned to older Elastica clients, typically 7.x-era, and the archived repo has no compatibility work for Elasticsearch 8+ or OpenSearch. If your production cluster is Elasticsearch 8 or OpenSearch, you would need a fork with an upgraded client. Verify the client and server versions before estimating any work.
How does sonata-elastica-bundle index Doctrine entities for Sonata Admin?
It relies on Elastica/FOSElasticaBundle to index Doctrine entities and then swaps Sonata Admin's Doctrine-backed datagrid for an Elasticsearch query. Configuration defines indices and mappings, and admin-managed records are indexed as they change. The list view and filters then read from Elasticsearch instead of the database. In Laravel, the equivalent is an index definition plus model-event or queue-driven sync.
Should I fork sonata-elastica-bundle for a Laravel project?
Forking only makes sense if you already run Symfony with Sonata Admin and need a stopgap. For a Laravel codebase, copy the adapter logic and reimplement it natively rather than forking a Symfony bundle. A fork carries a permanent maintenance burden and still does not provide Eloquent, pagination, or Laravel container integration. Fund an owner and an Elasticsearch client upgrade backlog if you do fork.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource