makinacorpus/autocomplete-bundle
A Symfony bundle that adds AJAX-powered autocomplete form fields, with reusable form types, controllers, and Doctrine integration to serve typeahead suggestions from your application's data.
Architecture fit — poor (framework mismatch is the headline). makinacorpus/autocomplete-bundle is a Symfony bundle, not a Laravel package. It is built around Symfony\Component\Form form types, Twig form themes, Symfony's DI container/Bundle registration, and (near-certainly) Doctrine ORM entity lookups for the autocomplete source. Laravel has none of these in its default stack: no Symfony Form component, no Twig (Blade instead), no bundle registration, no Doctrine (Eloquent instead). Installing it into a Laravel app is not a composer require — it is a porting project disguised as a dependency.
Integration feasibility — three viable paths, none cheap.
symfony/form, symfony/twig-bridge, and Twig, then hand-wire the form factory and a Doctrine entity manager alongside Eloquent. Two persistence layers and two templating engines in one app. High carrying cost, low payoff.typeahead). Cheapest and safest.Technical risk — high.
Key questions for the team before committing:
composer.json constraint check against our PHP version and Laravel version? (Blocking gate — verify before any spike.)Stack fit — none out of the box. Laravel shares symfony/http-foundation and a few Symfony contracts, but the package depends on the Form component, Twig, and Doctrine, none of which Laravel ships. Treat it as foreign code to be adapted, not a library to be installed.
Migration path (recommended, phased):
composer.json against our PHP and Laravel versions; inspect for symfony/form and doctrine/orm requirements. If incompatible, stop and go straight to reimplementation.LIKE/Scout query) plus a Blade/Alpine component and an upload endpoint using Laravel's UploadedFile + filesystem disks. Compare feature-for-feature against the bundle's demo.resources/js and own that code. Never let Symfony DI/Twig enter the runtime.Compatibility notes: any adoption path forces us to support two form/templating stacks or two ORMs. Avoid dual-ORM at all costs — it triples migration, seeding, and transaction reasoning for a widget.
Sequencing: constraint gate → spike → build-vs-vendor decision → build/port → feature parity review → deprecate any temporary Symfony shims before GA. Do not sequence as "install → make it work"; that ordering hides the real cost until it's sunk.
Verdict: recommend build, don't integrate. Budget ~1–2 engineer-weeks for a Laravel-native equivalent versus an open-ended porting effort against abandoned code for a low-opportunity UI feature.
Maintenance — the dominant cost. If we install or fork the bundle, we inherit a codebase with no upstream activity and no maintainer. Every PHP/Laravel upgrade becomes our problem, and the Symfony Form/Twig/Doctrine surface area is large relative to the feature's value. Reimplementing in-stack keeps the code inside the team's normal upgrade path — a decisive TPM-level trade.
Support — effectively zero. No issue triage, no security advisories, no changelog. Any incident is an internal escalation with no vendor backstop. This alone should fail most risk reviews for anything touching file uploads.
Scaling. Bundle-era autocomplete implementations typically issue a query per keystroke (LIKE '%term%' against Doctrine). That doesn't scale well: it burns database connections under concurrency and degrades on large tables. A Laravel-native build should use debouncing, a minimum-query-length, a result cap, auth-scoped filtering, caching, and — ideally — an existing search index (Scout/Meilisearch/Algolia) rather than the primary DB. The package gives us no control over these levers without rewriting its internals anyway.
Failure modes to plan for:
symfony/form vs current Symfony major).Ramp-up. The bundle's Symfony idioms (form events, DI extension, Twig themes) are unfamiliar to a Laravel-only team; expect onboarding drag even for a port. A Laravel-native build uses skills the team already has, so ramp-up is near-zero and handover is straightforward.
Recommendation for the roadmap: close the "adopt this package" option at the constraint gate unless the spike reveals the JS widget is uniquely valuable. Fund a short internal build instead; the operational profile is far lower-risk and the feature is small enough that the package's only real asset — its frontend widget — can be reproduced cheaply.
How can I help you explore Laravel packages today?