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

Bootstrap Bundle Laravel Package

mremi/bootstrap-bundle

mremi/bootstrap-bundle is a Symfony bundle that integrates Bootstrap into your applications, offering ready-to-use form themes, layout templates, and asset handling so you can build responsive, styled interfaces with minimal configuration.

View on GitHub
Deep Wiki
Context7

Getting Started

Bottom line for a Laravel developer: install nothing. Day-to-day leverage in Laravel is zero.

mremi/bootstrap-bundle is a Symfony bundle — its own README carries a [DEPRECATED] marker, it has 1 star and 0 dependents, and it does nothing that a Laravel app can consume. There is no service provider, no facade, no Blade directives, no publishable config, and no Symfony kernel in Laravel in which a bundle could ever be registered. composer require mremi/bootstrap-bundle will happily drop files into vendor/ that no code path boots.

What you actually want instead (the "first use case"): get Bootstrap into a Laravel layout. That is a two-command, ten-line job:

npm install bootstrap
// resources/js/app.js
import 'bootstrap/dist/js/bootstrap.bundle.min.js'; // includes Popper
/* resources/css/app.css */
@import 'bootstrap/dist/css/bootstrap.min.css';
{{-- resources/views/layouts/app.blade.php --}}
@vite(['resources/css/app.css', 'resources/js/app.js'])

That is the entire value proposition of the bundle, reimplemented natively in under a day including form styling. If build tooling is out of scope, a CDN <link>/<script> pair with SRI hashes is the second option.

Where to look first — only if you are auditing a legacy Symfony app that already depends on this bundle:

  • MremiBootstrapBundle.php — the bundle registration class (tells you what it actually hooks).
  • composer.json — PHP and symfony/* constraints; these usually close the question immediately on PHP 8.2+.
  • Resources/public/ — the vendored Bootstrap CSS/JS. Check the version banner at the top of the CSS file; this tells you whether it's Bootstrap 3/4-era, and therefore which JS CVEs you are carrying.
  • Resources/views/ — Twig form themes and layout helpers (there is no Blade equivalent and writing one is more work than the native path).
  • README.md — asset inclusion instructions (likely Assetic-flavoured).

Minimal legacy Symfony steps (maintenance only, never new adoption):

  1. Confirm your Symfony/PHP versions satisfy the bundle's constraints in composer.json.
  2. composer require mremi/bootstrap-bundle in the legacy app only.
  3. Register it — Symfony 2/3: new Mremi\BootstrapBundle\MremiBootstrapBundle() in AppKernel.php; Symfony 4+: an entry in config/bundles.php, only if the bundle supports that major version (most of this era do not).
  4. php bin/console assets:install --symlink to expose Resources/public/ under public/bundles/mremibootstrap/.
  5. Include the assets once, in the base Twig layout.

Implementation Patterns

Pattern 1 — asset inclusion happens once, in the base layout. Whatever the bundle's docs suggest, resist including its stylesheets/scripts in individual templates. Duplicate <link> tags and double-executed Bootstrap JS (two copies of Popper → tooltip errors) are the most common symptom of getting this wrong.

Pattern 2 — legacy Assetic style (only if the app already uses Assetic):

{% stylesheets '@MremiBootstrapBundle/Resources/public/css/bootstrap.css' %}
    <link rel="stylesheet" href="{{ asset_url }}">
{% endstylesheets %}

Never mix this with Vite or Webpack Encore in the same application. Pick one asset pipeline per app and hold the line.

Pattern 3 — form themes are optional and often absent. If the bundle ships a Bootstrap form theme, wire it in config/packages/twig.yaml:

twig:
    form_themes: ['bootstrap_4_horizontal_layout.html.twig']

Verify the template actually exists in Resources/views/Form/ before referencing it. If it doesn't, prefer Symfony's built-in Bootstrap form theme over writing one — the bundle is not the source of truth here.

Pattern 4 — override in your app, never in vendor/. Symfony bundle overrides belong under templates/bundles/MremiBootstrapBundle/, or by replacing published assets in your own build pipeline. Anything you patch inside vendor/ evaporates on the next composer install.

Pattern 5 — pin the dependency hard. Commit composer.lock, avoid broad composer update runs, and treat any version bump as a manual review item. With no maintainer, there will be no compatibility fixes for you.

Pattern 6 — the Laravel-native replacement for what the bundle offered:

Bundle feature Laravel equivalent
Bundled Bootstrap CSS/JS npm install bootstrap + Vite @vite(...)
Twig form themes Blade components (<x-input>, <x-form-group>) or plain classes in resources/views/components
Alerts / panels / controls helpers Blade components / @props
Pagination markup Laravel's own paginator views, styled with Bootstrap via Paginator::useBootstrapFive() in AppServiceProvider::boot()
Asset publishing npm run build → public/build/manifest.json

Pattern 7 — if you are the one doing the removal. Sequence it as: confirm the requirement is "Bootstrap styling" (not "this bundle"), implement Bootstrap through Vite/npm, rebuild form and pagination views as Blade components, then drop the Composer entry. Add a guardrail so it can't creep back:

"conflict": {
    "mremi/bootstrap-bundle": "*"
}

Gotchas and Tips

Framework mismatch is the primary gotcha and it is unfixable. Laravel has no bundle registry, no Twig, no Symfony kernel, and no asset pipeline that reads Resources/public/. Installing this into Laravel yields dead code in vendor/ that still shows up in SBOM and CVE scans — recurring false-positive triage for zero benefit. There is no configuration that closes this gap; only a compatibility shim you'd own forever, which is strictly more work than npm install bootstrap.

Deprecation means no security response path. The moment this enters composer.json, ownership of the client-side asset surface transfers to you entirely. A bundle of this vintage typically ships Bootstrap 3/4-era JS, which carries known tooltip/popover XSS classes. That is a live browser-side exposure, not a theoretical one.

Composer resolution hazard. Old Symfony/PHP constraints will fight modern PHP 8.2/8.3 and Laravel dependency graphs, producing composer update conflicts or forcing you to downgrade unrelated packages. Check composer.json constraints first — if they conflict, the decision is closed and you have a defensible written rejection.

Assetic is dead. If the legacy README tells you to use {% stylesheets %} / {% javascripts %}, understand that Assetic was removed from Symfony long ago. Modern equivalents are AssetMapper (Symfony 6.3+) or Webpack Encore. Do not build a new pipeline around a dead one.

assets:install confusion. After php bin/console assets:install --symlink, assets land in public/bundles/mremibootstrap/, not public/bundles/bootstrap/. Verify the actual directory name from Resources/public before writing the <link href>, and remember the symlink must be re-created on deploys (or use --relative and check your release process handles it).

Bootstrap version drift between environments. If the bundle or your legacy config CDN-links assets without pinning, you get silent version drift. Pin the exact version, and if you use a CDN, include SRI hashes:

<link rel="stylesheet"
      href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
      integrity="sha384-..." crossorigin="anonymous">

Bootstrap 5 is not a drop-in for what this bundle ships. If you migrate markup rather than adopt the bundle, the breaking changes bite fast: data-toggle/data-target → data-bs-toggle/data-bs-target, .ml-*/.mr-* → .ms-*/.me-*, .form-group and .form-row removed, .input-group-append/-prepend gone, jQuery is no longer required for JS components, and .no-gutters is now g-0. Anything generated by the bundle's form themes will need auditing line by line.

Twig config key differences across Symfony majors. twig.form_themes in Symfony 4+ YAML versus twig: form: resources: in older config — same idea, different shape. Confirm which major the legacy app is on before copying any snippet from the bundle's docs.

Debugging a legacy install. php bin/console debug:twig confirms which form themes are actually registered; debug:container --parameter=twig.form_themes prints the resolved value; bin/console about (or bin/console --version) settles the Symfony/PHP matrix. If templates aren't resolving, you almost always have the override path wrong (templates/bundles/MremiBootstrapBundle/ — exact case matters on Linux CI, not on macOS, which is how these bugs reach production).

Extension points you might actually use in the legacy app. Template override via the bundle's namespaced path (@MremiBootstrapBundle/...), and configuration overrides in config/packages/mremi_bootstrap.yaml if the bundle exposes a semantic config tree — check for a DependencyInjection/Configuration.php class before assuming one exists. Many of this vintage expose nothing configurable beyond assets.

Ramp-up is near-zero and that is the problem. There is almost nothing to learn here, which makes adoption easy to justify in a standup and hard to defend a year later when a Bootstrap CVE lands with no patch channel. The correct organizational move is to spend engineering time on the standard toolchain — Vite, Blade components, Laravel's paginator — that the team already knows and that has a maintenance story.

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.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle