twitter/bootstrap-bundle
A Symfony bundle that integrates Twitter Bootstrap into your application, providing ready-made Twig templates, form themes, and asset helpers to speed up building responsive interfaces.
This bundle is a Symfony2 bundle, not a Laravel package, so you cannot composer require it into a Laravel app and expect a service provider to appear. Treat it as a reference implementation of Bootstrap integration rather than a dependency.
Minimal steps to actually use it:
Resources/public/ — the Bootstrap CSS/JS images and fonts.Resources/views/Form/ — Twig form theme blocks (bootstrap_3_layout.html.twig-style files) if present.DependencyInjection/ — Configuration.php and the extension class, which tell you exactly what options the bundle exposes.TwitterBootstrapBundle.php — confirms the Symfony bundle contract (Bundle class, getContainerExtension).npm install bootstrap and import it in resources/js/app.js / resources/css/app.css through Vite.resources/views/components/form/input.blade.php) and render it from a Form:: macro or a plain view. That gives you 80% of the value in an afternoon.Asset extraction pattern. Copy Resources/public/* into public/vendor/twitter-bootstrap/ if you must self-host the exact version the bundle ships. In practice, prefer a pinned npm version so you control the Bootstrap major (the bundle era implies Bootstrap 3.x, which differs sharply from 5.x classes like form-control, mb-3, is-invalid).
Form theme → Blade component pattern. The bundle's Twig form themes wrap each widget in Bootstrap markup. Map them one-to-one:
form_row block → <x-form.row> component.form_widget / input blocks → <x-form.input>, <x-form.select>, <x-form.textarea>.form_errors block → <x-form.errors> using @error / $errors->first().form_label block → <x-form.label>.Keep the component API mirrored to Symfony's block names so the port stays mechanical and reviewable.
Configuration mapping pattern. If the bundle's Configuration.php exposes options (e.g. CSS framework version, template paths, asset config), translate them into Laravel equivalents: config/view.php paths, config/filesystems.php disks, or a small config/bootstrap.php of your own. Do not attempt to reuse Symfony DI — Laravel's service container and bundle config are not compatible.
Workflow tip. Use the bundle as a spec while migrating or comparing. Pull up its form theme file in one pane and your Blade component in the other, and diff the output HTML against the Bootstrap docs for the version you target. This is fast and avoids guesswork.
Integration pattern for existing Symfony→Laravel ports. If you're moving an app from Symfony2 to Laravel, inventory every form_theme used and the Twig extension helpers (bootstrap_* functions). Reimplement helpers as Blade directives or small PHP helpers to preserve view logic.
Bundle class, services.yml, or AppKernel registration is dead weight in Laravel — strip it.col-md-*, form-group, help-block). Bootstrap 5 renamed most of these. Do not copy class names verbatim into a modern Blade component without updating them.{{ form.vars.* }}, {% block %}, and Twig filters. These won't compile in Blade; translate block inheritance into Blade component slots and @props.composer.json for production — vendor the assets or, better, use laravel/ui, blade-ui-kit, or Bootstrap via npm.bootstrap_* Twig functions are the only genuinely portable ideas. The DI extension and bundle config are not.package.json and document it in the README.<link> in a layout, not through Vite, so they don't get merged into your modern bundle. Keep them isolated and slated for removal.How can I help you explore Laravel packages today?