- What is lmc/cqrs-solr used for in Laravel?
- lmc/cqrs-solr is a Laravel package for integrating Apache Solr into a CQRS architecture. It provides Solr-backed read repositories, connection and core configuration, query builders for filters, sorting, and pagination, and document mapping. It is intended as a thin bridge between the command side and a Solr read model, not a general-purpose search abstraction.
- How do I install lmc/cqrs-solr with Composer?
- Install it with Composer using composer require lmc/cqrs-solr, then confirm the package version and PHP constraint before committing. The 3.0.0 release assessment confirms a PHP 8.1 minimum, but verify the exact Composer constraint. Publish the package configuration and confirm that the Laravel service provider is registered or auto-discovered in your application.
- Does lmc/cqrs-solr support Laravel 10 or Laravel 11?
- The provided overview and 3.0.0 assessment do not explicitly state a Laravel version. The PHP 8.1 floor aligns with Laravel 10 and clears Laravel 9, but Laravel 11 and PHP 8.2 or 8.3 installation must be proven in your own sandbox. Check Composer constraints, service-provider boot, and container bindings before assuming support.
- How do I configure the Solr connection and core for lmc/cqrs-solr?
- The package includes configurable Solr connection and core settings per project and supports config publishing out of the box. After publishing, set the Solr host, port, path, and core values in the package config for each environment. Use the real configuration file from the installed version rather than older README examples, especially on 3.x.
- How are Solr documents mapped to Laravel models in lmc/cqrs-solr?
- Document mapping is pluggable, so you define how application models correspond to Solr fields. Keep that mapping behind an internal adapter or port rather than exposing package types throughout your domain. Contract-test the mapping against the actual Solr schema used in production.
- Can I use lmc/cqrs-solr for filtering, sorting, and pagination?
- Yes. The package advertises flexible query builders for filters, sorting, and pagination over Solr-backed read repositories. That makes it suitable for fetching and filtering indexed documents across large datasets in a CQRS read model. Validate query behavior against the real Solr schema, not only sample queries.
- Is lmc/cqrs-solr a general Laravel search package?
- No. lmc/cqrs-solr is not a general Laravel search abstraction. It is a thin CQRS and Solr integration for search bounded contexts, with read repositories and document mapping around Solr. For greenfield apps needing simple search, a direct Solr client or a broader search package may be a better fit.
- What changed in lmc/cqrs-solr 3.0.0 and is it backward compatible?
- Version 3.0.0 was a major release with backward-incompatible method signature changes, so 2.x examples and snippets may not compile. Spike directly against 3.0.0 rather than prototyping on 2.x and porting later. Check the repository changelog or upgrade guide for the exact 2.x to 3.x delta because the assessment flags that as needing verification.
- Is lmc/cqrs-solr actively maintained?
- The 3.0.0 line dates to April 2022 and the project appears to have had no activity since, so it should be treated as dormant. That raises questions about its Solr client dependency, PHP 8.2 or 8.3 tolerance, Laravel 11 compatibility, and security patch path. Plan a fork or vendor fallback and keep the package behind internal interfaces.
- How should I handle production concerns like retries, timeouts, auth, TLS, and indexing consistency with lmc/cqrs-solr?
- The provided overview does not document retry, timeout, authentication, TLS, or indexing consistency behavior, so verify those at the Solr client and configuration layer. Wrap the package behind internal command and query ports, then add idempotency, retry, timeout, and contract tests. Use shadow traffic or dual reads before relying on Solr as a production read model.