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
Solarium Bundle

Solarium Bundle Laravel Package

nelmio/solarium-bundle

NelmioSolariumBundle integrates the Solarium PHP client with Symfony, providing a preconfigured Solr client as a service, simple configuration for your Solr endpoints, and convenient querying of Apache Solr from any Symfony application.

View on GitHub
Deep Wiki
Context7

NelmioSolariumBundle integrates the Solarium PHP Solr client into Symfony applications, exposing configured clients as container services so you can index and query documents without wiring boilerplate. Define endpoints, clients, and adapters in your application configuration, then inject them wherever needed.

  • Native Symfony service container integration
  • YAML configuration for clients, endpoints, and adapters
  • Support for multiple clients and endpoints
  • Profiler data collector for debugging Solr requests
  • Compatible with Solarium plugins and event listeners
Frequently asked questions about Solarium Bundle
Can I use nelmio/solarium-bundle in a Laravel application?
No. NelmioSolariumBundle is a Symfony bundle that registers a DI extension, builds Solarium client services from a Symfony config tree, and optionally adds a web profiler data collector against the Symfony kernel lifecycle. Laravel has no bundle, kernel, or DI-extension concept, so installing it will drag in symfony/http-kernel, dependency-injection, and config without a supported path. The reusable piece is the underlying solarium/solarium HTTP client, which you can bind in a Laravel service provider.
How do I integrate Apache Solr with Laravel using Solarium?
Require solarium/solarium with Composer, create a config/solr.php file for endpoints, cores, adapter, timeout, and auth, then bind a configured Solarium\Client as a singleton in a service provider. Expose it behind a small SearchService or repository interface so Solarium types stay out of controllers and models. This mirrors the bundle's configuration shape without coupling your app to Symfony. Expect roughly one to two days of spike work for a working integration.
What Laravel version does nelmio/solarium-bundle support?
None officially, because it is a Symfony bundle rather than a Laravel package. Its compatibility constraints are Symfony, PHP, and Solarium versions, not Laravel. If you are evaluating it for a Laravel app, treat its supported Laravel version as not applicable and use solarium/solarium directly instead.
Is nelmio/solarium-bundle a good alternative to Laravel Scout?
No, they solve different problems and are not interchangeable. Laravel Scout is a first-party Laravel search abstraction with drivers for engines like Meilisearch, Algolia, and the database, but it has no first-party Solr driver. NelmioSolariumBundle is Symfony glue for the Solarium client and cannot serve as a Scout driver in Laravel. If you need Solr's faceting, highlighting, spatial search, or complex analyzers, use solarium/solarium directly and optionally wrap it in a custom Scout driver.
How do I install and configure solarium/solarium in Laravel?
Run composer require solarium/solarium, publish or create a config file with named endpoints containing host, port, path, core, timeout, and adapter settings, and register a singleton binding in a service provider. Pull the config into a Solarium\Client factory and inject the client through an interface rather than resolving it directly in controllers. Replicating the bundle's endpoint-keyed config shape keeps the setup familiar for developers who have used the Symfony bundle.
Does nelmio/solarium-bundle work with SolrCloud or multiple cores?
The bundle's config surface supports named endpoints and per-client core mapping, and Solarium itself can target multiple endpoints and SolrCloud setups. However, those features belong to Solarium, not to the Symfony bundle, and they transfer to Laravel only if you configure them directly on the Solarium client. In Laravel, model multi-endpoint or multi-core routing in your own config and client factory rather than relying on the bundle.
What are the risks of installing a Symfony bundle in Laravel?
The main risk is misidentifying the artifact: the bundle is Symfony-specific glue, not a Laravel package, so installing it registers against a kernel lifecycle that does not exist. It also pulls Symfony http-kernel, dependency-injection, and config dependencies that can conflict with Laravel's container and package discovery. You end up with an unsupported, unmaintainable shim rather than working Solr integration. Use the bundle as documentation-by-example and implement the config natively in Laravel.
How do I configure Solr endpoints, cores, and authentication in Laravel?
Create a config array keyed by endpoint name, each with host, port, path, core, timeout, and adapter, plus a default endpoint selector. Add authentication details such as basic auth or TLS options supported by your Solarium adapter and HTTP transport. Build the Solarium\Client from that config in a singleton binding and keep credentials in environment variables. This mirrors the bundle's configuration tree while staying native to Laravel.
How do I test Solr integration in Laravel?
Unit test your SearchService or repository against an interface or a fake client so most logic does not require a live Solr instance. For integration tests, run Solr in Docker with a test core and point a test-specific endpoint config at it, then assert queries, faceting, and commit behavior. Keep Solarium client construction in one factory so tests can swap endpoints or adapters cleanly.
Is nelmio/solarium-bundle still maintained, and what about version compatibility?
It is a single-vendor Nelmio bundle with a small footprint, roughly 149 stars and zero dependents in the evaluation, so issue response is best-effort. It has historically lagged behind Solarium major-version bumps, which can strand pinned projects on older Solarium releases. Release-cadence metadata in this dataset includes a future date and should be treated as unreliable; verify the actual last release and constraints on Packagist. Check Solarium's supported PHP range, its Solr API target, and your Laravel/PHP baseline as one constraint set, because mismatches often surface as opaque HTTP 400s.
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.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo