- Does fergardi/select2-bundle work with Laravel?
- No. It is a Symfony bundle that registers through a Symfony Bundle class and kernel configuration, while Laravel packages register through ServiceProvider classes and composer.json extra.laravel.providers auto-discovery. There is no bridge between those mechanisms, so Composer will install the files but Laravel will never boot the package. The only portable artifacts are the static Select2 JavaScript and CSS assets.
- Is this a Laravel package or a Symfony bundle?
- It is a Symfony bundle, despite being listed in a PHP/Composer search. Its value proposition is shipping Select2 JS and CSS through a Symfony-oriented asset pipeline, most likely a Resources/public directory with optional Assetic or Twig wiring. In a Laravel app that integration layer is simply not loadable.
- How do I install Select2 in a Laravel app instead?
- Run npm install select2, then import it in a Vite entry point declared in vite.config.js and load the stylesheet through the same pipeline. Initialize the widget in one shared module (for example a small Alpine component or a global initializer) so every Blade or Livewire view behaves consistently. This takes minutes and gives you a version-pinnable, actively maintained artifact.
- Which Laravel versions does this package support?
- None are supported. There is no illuminate/support dependency, no service provider, and no Laravel-facing code to declare compatibility against Laravel 10, 11, or 12. Treat any Laravel version claim as inapplicable and evaluate upstream select2 against your own framework version instead.
- Do I lose any form types or PHP helpers by skipping this package?
- Almost certainly not. A Select2 resources bundle is overwhelmingly an asset-shipping shim: a public resources directory with optional templating glue, not a server-side form type or data provider library. Before dismissing it entirely, confirm by inspecting the repository for any PHP classes beyond a bundle registration file, but expect nothing usable in a Laravel context.
- Is the package maintained, and does it have community support?
- There is no visible signal: zero stars, zero dependents, no changelog, no release cadence, and no issue triage. That means no evidence of a maintainer who would respond to a security report or a compatibility break. For a front-end widget that is available from npm with active upstream maintenance, that risk buys you nothing.
- Does the bundled Select2 version have known XSS vulnerabilities?
- Older Select2 releases carry known cross-site scripting advisories in the templating and escapeMarkup paths, and an inactive bundle most likely ships a frozen, unpatched copy. Pinning select2 yourself through npm lets you select a current version and track advisories deliberately. Treat the vendored version here as untrusted until you verify it.
- Can I just extract the assets from the bundle and use them in Laravel?
- Technically yes, but at that point you are copying files rather than adopting the dependency. The Symfony-specific glue is discarded and you inherit whatever Select2 version was frozen at packaging time, including its patch status. Installing select2 from npm achieves the same result with a readable license, a version lock, and upstream fixes.
- Is jQuery still required, and are there jQuery-free alternatives?
- Select2 is a jQuery-based widget, so adopting it means carrying jQuery in your bundle even in an Alpine or Livewire stack. If that dependency is undesirable, standardize on a native or Alpine combobox component instead of either this bundle or upstream Select2. The underlying requirement is a searchable async select control, not this specific library.
- What is the license, and can I redistribute it in my build?
- The license and PHP/Symfony version constraints are not clearly stated, which is a blocker for redistribution into a commercial build. Combined with the unclear Assetic versus Webpack Encore era of the asset wiring, provenance is opaque. If you need Select2, pull it from npm where the license and version are explicit.