phil/base-bundle
phil/base-bundle is a Laravel/PHP package that provides a reusable base bundle for shared application foundations. It helps consolidate common setup, base classes, and boilerplate into a single installable dependency, reducing duplication across projects.
This is a Symfony2-era bundle (PHP 5.3/5.4, Symfony ~2.1–2.3) that ships an HTML5 Boilerplate-inspired base template plus optional security and quality tooling. Given zero dependents, no stars, and age, treat it as reference material rather than a production dependency.
Minimal steps:
composer.json. If you're on Symfony 3+, 4+, or later, this bundle will not install or boot — its Bundle class and service definitions use conventions removed in Symfony 3.0 (getContainerExtension, Resources/config/services.yml syntax variants, ContainerAware). Stop here unless you're maintaining a legacy 2.x app.composer require phil/base-bundle:dev-master
Then register in app/AppKernel.php:
new Phil\BaseBundle\PhilBaseBundle(),
DependencyInjection/Configuration.php and the bundle's Resources/config/ directory — that's where the security and quality settings are defined, and where you'll find what's actually wired vs. just documented.{% extends 'PhilBaseBundle::layout.html5.html.twig' %} (check the actual filename in Resources/views/ — boilerplate bundles often rename these between tags) in your app templates so you inherit the HTML5 doctype, meta, IE conditional shims, and asset blocks without rewriting them.If you cannot pin a specific commit hash, fork the repo and vendor it — the maintainer's branch could disappear, and there is no composer.lock safety net for abandoned packages.
Layout inheritance over include. Treat the bundle's template as a skeleton: extend it, override {% block stylesheets %}, {% block javascripts %}, and {% block body %}. Do not copy the base template into app/Resources/ unless you expect to diverge permanently — extension keeps you aligned if the bundle ships fixes.
Asset handling is the main integration point. HTML5 Boilerplate-era bundles typically define blocks for vendor JS (Modernizr, jQuery), analytics, and a "head scripts" section. Wire these to Symfony's {% javascripts %} / {% stylesheets %} tags (Assetic) if the parent app uses Assetic; skip the bundle's asset blocks and use your own if the app uses Webpack Encore or similar — mixing both is a common source of duplicate script tags.
Security tools. Read the bundle's Configuration.php for a phil_base.security: (or similarly named) section before assuming anything is wired. Any security configuration shipped by a Boilerplate-style bundle is almost certainly a thin wrapper around Symfony's own security.yml — copy the relevant firewall and access-control snippets into app/config/security.yml rather than depending on the bundle to activate them. This keeps you portable if you drop the bundle later.
Quality tools. If the bundle seeds configs for PHPUnit, PHPMD, PHP_CodeSniffer, or similar, copy those configs into your project root (phpunit.xml.dist, phpcs.xml.dist, phpmd.xml) once, then uninstall the bundle. Quality tooling does not belong in a runtime dependency.
Workflow for a legacy migration. If you're using this as a reference for upgrading a Symfony2 app, extract in this order: (1) layout/markup, (2) asset pipeline config, (3) security YAML, (4) tool configs. Each is independently replaceable by a modern equivalent (symfony/security-bundle, Encore/Vite, friendsofphp/php-cs-fixer), so migrate piecewise rather than trying to upgrade the bundle itself.
Class 'Symfony\Component\HttpKernel\Bundle\Bundle' not found or method-signature errors rather than a clean Composer conflict. Check the bundle's composer.json require block before anything else.layout.html.twig vs layout.html5.html.twig, or .html.twig vs .twig). Use bin/console debug:twig (Symfony 2.6+) or php app/console router:debug to confirm the logical template name rather than guessing from the repo tree.Phil\BaseBundle in a phil/base-bundle folder). If Composer doesn't pick it up, add an explicit autoload entry in your root composer.json pointing Phil\BaseBundle\ to vendor/phil/base-bundle/.phil_base: block doesn't appear in the container, the extension alias may differ from the bundle name (e.g. phil_base, philbase, base_bundle). Grep getAlias() in the extension class; a wrong alias silently disables the bundle's configuration.app/Resources/PhilBaseBundle/views/... (Symfony's bundle override path). For behavior, prefer decorating the bundle's services in your own services.yml over editing vendor code.TwigBundle default layout or a modern starter kit) and Symfony's first-party security and QA tooling. The value here is historical reference for legacy Symfony2 migrations, not day-to-day development.How can I help you explore Laravel packages today?