Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Select2 Bundle

Select2 Bundle Laravel Package

fergardi/select2-bundle

A Symfony bundle that integrates Select2 into your forms, giving you searchable, AJAX-powered select boxes with minimal setup. Includes reusable form types and asset wiring so dropdowns can load remote data quickly and consistently.

View on GitHub
Deep Wiki
Context7

Select2 resources bundle

Frequently asked questions about Select2 Bundle
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.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager