diszo2009/lucene-search-bundle
spatie/laravel-searchable). This bundle’s architecture assumes Symfony’s Kernel, DependencyInjection, and EventDispatcher, which are incompatible with Laravel’s ServiceProvider/Facade model.ContainerAware services for Laravel’s Container).robrichards/xmlseclibs or apache/lucene-php for newer versions).spatie/laravel-searchable + Elasticsearch).Observers).bind(), tag()).Console component is incompatible).Option 1: Abandon Bundle (Recommended)
spatie/laravel-searchable + elasticsearch/elasticsearch PHP client.algolia/algoliasearch-client-php + Laravel Scout.Option 2: Custom Wrapper (High Effort)
Symfony\Component\DependencyInjection with Laravel’s Illuminate\Container.Symfony\Bundle\FrameworkBundle calls with Laravel’s Foundation.Option 3: Hybrid Approach
// Laravel Service
class LuceneIndexer {
public function index(Model $model) {
// Call Zend Lucene logic here (without Symfony DI)
}
}
| Phase | Task | Tools/Libraries |
|---|---|---|
| Assessment | Benchmark Elasticsearch vs. Lucene for Laravel use case. | spatie/laravel-searchable |
| Decision | Choose replacement (Elasticsearch/Algolia) or custom wrapper. | — |
| Migration | Write data migration script (Lucene → Elasticsearch). | Laravel Migrations, Queue |
| Integration | Plumb search into Laravel models (Scout) or API routes. | Laravel Scout, API Resources |
| Testing | Load test with production-like data volume. | Laravel Dusk, PHPUnit |
| Deprecation | Phase out Lucene (if hybrid approach is taken). | — |
EventDispatcher, Kernel, etc.—breaking changes in Laravel/Symfony will require patches.Schema tools).| Risk | Impact | Mitigation |
|---|---|---|
| Lucene Index Corruption | Data loss, search failures. | Regular backups, use Elasticsearch. |
| Symfony API Breaking | Custom wrapper fails. | Isolate Lucene logic in a service. |
| Performance Degradation | Slow searches under load. | Benchmark; switch to Elasticsearch. |
| PHP Version Incompatibility | Bundle fails on PHP 8.x. | Abandon; use modern alternatives. |
How can I help you explore Laravel packages today?