simonoche/white-label-bundle
A Symfony bundle for building white-label applications with per-brand templates, translations, assets, and configuration. It lets you serve multiple labels from one codebase without forking or duplicating core logic, simplifying multi-tenant and multi-brand deployments.
This is a Symfony2 bundle, not a Laravel package. Before anything else, confirm you're actually on a Symfony 2.x codebase — if you're in Laravel, stop here and read the "Gotchas" section, because you cannot composer require this into a Laravel app due to its symfony/symfony version constraints.
Assuming Symfony 2.x:
dev-master or a 2.x tag — check Packagist, the repo is low-traffic):
composer require simonoche/white-label-bundle
app/AppKernel.php:
new Simonoche\WhiteLabelBundle\SimonocheWhiteLabelBundle(),
DependencyInjection/Configuration.php and DependencyInjection/*Extension.php. The README will be sparse; the config tree is the source of truth for available keys (brand name, logo, color, etc.).app/config/config.yml (the root key is almost certainly simonoche_white_label — verify against Configuration.php).<img src="{{ white_label.logo }}" alt="{{ white_label.name }}">
parameters.yml (or an environment-specific config_<env>.yml), then reference them through the bundle's Twig helpers rather than hardcoding in base.html.twig.config_dev.yml / config_prod.yml overrides to show a "DEV" badge or alternate logo in non-prod, without touching templates.Resources/config/services.yml for the service ID) into controllers or your own services when you need the brand values outside Twig — e.g., generating emails, PDF invoices, or API responses.kernel.request listener that inspects $request->getHost() and swaps the active brand config (or sets a brand identifier in the request). This bundle likely only exposes static config, so you'd wrap it: a BrandResolver service that reads the bundle's config as a default and overrides per-host.app/Resources/SimonocheWhiteLabelBundle/views/ using standard Symfony bundle inheritance.config/white-label.php, a Brand service bound as a singleton, and a View::composer('*', ...) to expose $brand to all views. That's a 30-minute port and avoids dragging in Symfony 2.composer.json requires a modern symfony/*, resolution will fail or force ancient versions. Pin only in a legacy app.bin/console config:dump-reference simonoche_white_label (Symfony 2.6+) or read Configuration.php; guessing key names from the README wastes time.twig.extension in Resources/config/services.yml. If brand variables render empty, this is usually why.asset(). Store them relative to web/ (e.g., bundles/app/img/logo.png), not as absolute filesystem paths.bin/console cache:clear --env=prod — Symfony2 config is compiled into the container, so stale values are a frequent "bug."src/ (or a private repo) so you control fixes, and audit it for anything referencing deprecated Symfony APIs before upgrading PHP.$container->getParameterBag()->all()) in a test kernel to see exactly what the bundle registered — faster than tracing the extension by hand.How can I help you explore Laravel packages today?