markup/needle-bundle
Symfony bundle from markup that integrates the Needle library into your application, handling service registration and configuration so you can start using it with minimal setup. Install via Composer, enable the bundle, and adjust configuration as needed.
Architecture fit. The premise is misaligned at the first step: markup/needle-bundle is a Symfony bundle, not a Laravel or framework-agnostic PHP package. It ships a Bundle class plus a DI extension and configuration tree — artifacts Laravel has no loader for. The underlying idea is sound and reasonably valuable: a backend-neutral query object model (filters, facets, pagination) that lets you target Solr or Elasticsearch without rewriting call sites. But in a Laravel codebase that role is already occupied by Scout, and Needle does not implement Scout's driver contract — it abstracts query construction, whereas Scout abstracts model indexing and sync. They overlap partially and compose poorly.
Integration feasibility. Feasible only as a fork, not as a dependency. A Laravel adoption would require reconstructing, by hand: service registration and aliasing in a service provider, translation of the bundle's config tree into config/needle.php, substitution of Symfony's EventDispatcher with Laravel's, and removal of any residual symfony/http-kernel / console coupling. That is a multi-day port of a package with 4 stars and 0 dependents — no downstream consumers means no one has validated the seams, and no one else will absorb the porting cost.
Technical risk: high to critical.
| Signal | Reading |
|---|---|
| Last release 2021-07-27 | ~3 years dormant; predates Elasticsearch 8 client, Symfony 6, PHP 8.1+ |
| 0 dependents | No community validation, no bug reports exercising edge cases, no shared fixes |
| 4 stars | Effectively single-maintainer; bus factor of one |
| Score 0.14 | Health indicators are poor across the board |
| License MIT | The one clean signal — fork-friendly legally |
Specific hazards: the Elasticsearch PHP client underwent a breaking rewrite between 7.x and 8.x, so the ES integration is likely incompatible with current clusters. Solr faceting and ES aggregations are semantically different enough that any "standard way" abstraction will leak — expect the lowest-common-denominator feature set plus escape hatches, and verify which applies to your facet requirements. Composer constraint resolution against Laravel 10/11/12 will probably fail outright before you reach runtime.
Key questions.
Stack fit. Poor. Assume target stack is Laravel 10–12, PHP 8.1–8.3, and either Elasticsearch 8.x or Solr 9.x. The package's 2021 release window implies Symfony 4.4/5.x, PHP 7.4/8.0, and ES 7.x client constraints. Expect a hard dependency conflict at composer require, and API-level breakage after that is resolved manually.
Options, ranked.
Migration path. If there is any existing Symfony usage of Needle, migrating to Laravel means rewriting the query layer regardless; there is no incremental bridge. Plan the rewrite as a bounded work item against whichever backend survives the decision, not as a package swap.
Sequencing. Run a strict 1–2 day spike: attempt install on the current Laravel skeleton, check Composer resolution, check whether the ES adapter constructs against a current client. Gate: if it fails to install or the ES adapter needs more than a day of repair, close the evaluation and move to option 1. Do not let the spike expand into a port without an explicit re-approval.
Maintenance. Total. Forking transfers 100% of upkeep — PHP minor-version deprecations, backend client breaking changes, security patches — onto our team, with no upstream to rebase against. Every future Elasticsearch or Solr upgrade becomes an internal project.
Support. None meaningful. GitHub issues on a dormant single-maintainer repo are best-effort at zero. No vendor, no SLA, no advisory feed. Security exposure is real: an abandoned package in the dependency graph is exactly what supply-chain and vulnerability scanners flag, and will need a documented exception to pass review.
Scaling. Largely neutral — the package is a client-side query builder; throughput and latency are governed by the backend cluster, not by this code. The one scaling-adjacent risk is that the abstraction may prevent using backend-specific optimizations (cursor marks, ES search_after, Solr streaming) needed at higher result volumes.
Failure modes.
Ramp-up. Deceptively steep for the payoff: engineers must learn a bespoke query abstraction and the target backend's native DSL (to debug what the abstraction emitted), then learn the fork's local divergence from upstream docs. That is three mental models to deliver a capability Scout provides in one.
Bottom line: do not adopt. The package's 2021 vintage, zero dependents, and single-maintainer profile place it firmly in the "reference design, not runtime dependency" category. Steal the abstraction idea; leave the code.
How can I help you explore Laravel packages today?