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

Base Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Getting Started

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:

  1. Confirm the Symfony version in your 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.
  2. Install (legacy app only):
    composer require phil/base-bundle:dev-master
    
    Then register in app/AppKernel.php:
    new Phil\BaseBundle\PhilBaseBundle(),
    
  3. Look first at 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.
  4. First use case: override the base Twig layout. The typical intent is {% 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.

Implementation Patterns

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.

Gotchas and Tips

  • Symfony version lock. The bundle targets Symfony 2.x. Installing alongside Symfony 3+ produces confusing 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.
  • No maintenance = no security updates. A HTML5 Boilerplate-derived template may include outdated jQuery, Modernizr, and IE conditional-loading patterns. Audit every JS/CSS it references against a current CDN advisory; do not ship the bundled vendor assets to production.
  • Template path surprises. Boilerplate bundles frequently have files with mixed naming (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.
  • Autoloading and PSR. Old bundles often use PSR-0 with a mismatched namespace/directory (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/.
  • Debugging extension config. If a 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.
  • Extension point. The cleanest way to customize without forking is to override templates via 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.
  • Recommendation. For new work, skip this bundle. Reach for a maintained base template (e.g. Sensio's 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.
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.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo