ongr/api-bundle
Symfony bundle for exposing ONGR Elasticsearch documents through a configurable REST API. It provides routing, serialization, and endpoint configuration to build search and CRUD APIs with less boilerplate.
Architecture fit: None. ongr/api-bundle is a Symfony bundle, not a Laravel package. It ships a Bundle class, a DependencyInjection extension with a Configuration tree, and compiler passes that register services into Symfony's container and event dispatcher. Laravel has no bundle registry, no Kernel::registerBundles(), no Symfony DI config tree, and no equivalent service-tagging semantics. There is no adapter path that does not amount to embedding a Symfony micro-kernel inside a Laravel application — a well-known anti-pattern that doubles boot cost and creates two competing containers, two dispatchers, and two config systems.
The bundle is also not standalone: it assumes the ONGR platform substrate (ONGR ElasticsearchBundle, and by era typically FOSRestBundle, JMS Serializer, and Symfony's HttpKernel/HttpFoundation). Pulling it in means pulling in a large, dated Symfony dependency graph.
Integration feasibility: Effectively zero. Composer will almost certainly refuse to resolve. A 2016-04-06 release implies constraints around PHP 5.5–7.x and Symfony 2.7/3.0-era components. Modern Laravel (10/11/12) pins Symfony 6/7 components; the constraint sets are disjoint. You would be forcing --ignore-platform-reqs and hand-patching transitive dependencies before writing a single line of glue code. Any integration would be a fork, not an installation.
Technical risk: High and asymmetric. Abandoned for ~8 years means no security patches across the entire transitive tree (serializer, HTTP kernel, Elasticsearch client). The upside is capped: 8 stars, 0 dependents, no downstream ecosystem to validate against and no community to escalate to. Effort is unbounded (fork + port + maintain); reward is a thin API/serialization layer that a Laravel team can reproduce with first-party primitives in days.
Key questions to resolve before any spike:
--ignore-platform-reqs?Recommendation: Do not adopt. Treat as an architectural reference only. Score 1.63 and opportunity 1.14 are consistent with "no viable integration surface."
Stack fit: Poor. Laravel's idioms — service providers, Illuminate\Routing, Eloquent/Query Builder, API Resources, Scout — have no overlap with this bundle's extension points. Even the shared substrate (Symfony components) is consumed differently: Laravel vendors individual Symfony packages, it does not expose a bundle/kernel lifecycle.
Migration path: Reimplement, don't port. The correct sequencing is to extract intent, not code:
Route::apiResource + invokable controllers; serialization → JsonResource / ResourceCollection; filtering/pagination → query scopes + LengthAwarePaginator; Elasticsearch access → laravel/scout with the Elasticsearch driver, or a thin wrapper over elasticsearch/elasticsearch.Compatibility. Expect PHP 8.x incompatibilities (implicit nullable parameters, dynamic properties, removed each()-era helpers), Symfony 6/7 removal of long-deprecated APIs, and a JMS Serializer major version gap. Any direct reuse requires a patch set that will itself need maintenance indefinitely.
Sequencing. Do the capability inventory and replacement prototype in a single short spike (days, not weeks). Gate any further investment on that prototype failing to reach parity — which is unlikely. If, and only if, there is a hard interoperability requirement with a live ONGR/Symfony service, isolate it behind an HTTP boundary (call the Symfony service over the network) rather than co-hosting the bundle in the Laravel process. Process isolation converts an unsolvable compatibility problem into a solvable integration one.
Maintenance. This is a fork-and-own proposition from day one. There is no upstream cadence to ride: last release 2016, no dependents, no visible maintainer activity. Every CVE in the transitive Symfony/Serializer/Elasticsearch tree becomes our incident, and our patching surface is whatever we vendored. Budget for continuous, low-glamour upkeep with no upstream to upstream to.
Support. No vendor, no community, no Stack Overflow corpus, no issue-tracker momentum at 8 stars. Internal ramp-up is the only support channel, and the engineers who understand 2016-era Symfony bundle conventions are increasingly scarce and expensive.
Scaling. The bundle itself is an API/serialization layer and is not the throughput bottleneck — Elasticsearch is. Real scaling risk is operational coupling: an embedded Symfony kernel inside a Laravel worker changes process memory profile, boot time, and queue-worker behavior, and complicates horizontal scaling, health checks, and graceful shutdown. If Elasticsearch is genuinely required, scale it as a managed service with Laravel talking to it over HTTP; do not let the bundle dictate process topology.
Failure modes. Ranked by likelihood:
Ramp-up. Steep and non-transferable. A Laravel engineer must learn Symfony bundle conventions and ONGR platform semantics, from source, with no documentation trail. Knowledge acquired is not reusable on any other initiative. By contrast, the replacement path uses skills the team already has; ramp-up is measured in hours.
Bottom line. High operational tail, no ecosystem backing, no integration surface into Laravel. The only defensible use is as a read-only reference during a short replacement spike. Decline adoption; record the decision and the rationale so it is not re-litigated.
How can I help you explore Laravel packages today?