vanio/vanio-web-bundle
Vanio Web Bundle is a Symfony bundle offering reusable web-layer utilities and integrations that reduce boilerplate and streamline common web functionality in PHP projects. Install it via Composer and enable the bundle to standardize helpers and services across your applications.
The package is a Symfony bundle, not a Laravel package, so the first decision is whether you actually have a Symfony (or Symfony-components) codebase to drop it into. If you are purely Laravel, there is no service provider to register and no facade to reach for — you would be pulling in Symfony's DI/Twig/HttpFoundation stack just to use a helper or two.
Minimal steps for a Symfony app:
composer require vanio/web-bundle
Register the bundle in config/bundles.php:
return [
// ...
Vanio\WebBundle\VanioWebBundle::class => ['all' => true],
];
Then look at these files first, in order:
README.md — the only prose documentation; if it is thin, treat the source as the docs.src/DependencyInjection/Configuration.php — the real config tree. Anything not defined there cannot be configured.src/DependencyInjection/VanioWebExtension.php — shows what services are loaded, what parameters exist, and whether services are public/private.src/Resources/config/*.xml (or .yaml) — the actual service definitions, aliases, and tags (Twig extensions, form types, event subscribers).tests/ — the most reliable usage examples; unit tests show how services are constructed and invoked in isolation.First realistic use case: enable the bundle, run bin/console cache:clear, then check bin/console debug:container --tags and bin/console debug:twig to see what the bundle actually contributes to your app. If the bundle ships Twig extensions or form types, those will appear in the tag listings and are the quickest thing to exercise in a template or form.
Composer + bundle registration is the whole install. There is no publishable config, no migrations, no artisan commands. If the bundle's Configuration.php defines a tree, copy the defaults into config/packages/vanio_web.yaml and change only what you need:
# config/packages/vanio_web.yaml
vanio_web:
# keys must match Configuration.php exactly; unknown keys fail at compile time
Rely on autowiring for services the bundle exposes. Modern Symfony bundles register services with autowiring and autoconfiguration. If a class is tagged (twig.extension, form.type, kernel.event_subscriber), it is picked up automatically; you only need to inject it. Verify with:
bin/console debug:container 'Vanio\WebBundle\' --show-private
Use the bundle's Twig extensions directly in templates once the bundle is enabled — Twig extensions tagged twig.extension are auto-registered, so no manual twig.extensions config is needed. Confirm function/filter names with bin/console debug:twig --filter=<name> before assuming.
Prefer decoration over forking. If a service does almost what you want, decorate it rather than editing vendor code:
services:
App\Twig\MyExtensionDecorator:
decorates: 'vanio_web.some_service_id'
arguments: ['@.inner']
Use debug:container --show-private to get the real service id — bundles often use dot-prefixed private ids that shift between versions.
Treat the bundle's tests as integration documentation. Because adoption is essentially zero, there is almost no blog/StackOverflow coverage. When you need to know how a class is meant to be used, read the test that constructs it; that is the de facto contract.
Keep it behind a boundary in your app. Wrap any bundle-provided behavior in a small application-level service or Twig function of your own, so replacing or removing the bundle later is a one-file change rather than a grep across templates.
config/bundles.php, no debug:container, and no Twig by default. Bridging means manually instantiating services and wiring them into the container — usually not worth it for a utility bundle. If you are in Laravel, stop and look for a native equivalent first.composer.json and be prepared to fork.composer.json require before installing; a symfony/* constraint of ^3.4 || ^4.0 will not install on Symfony 6/7 without --ignore-platform-reqs hacks that will bite later.Configuration.php, not the README.services.yaml in modern Symfony. Use constructor autowiring or an explicit alias; do not assume a service id is public just because it appears in the bundle's XML.cache:clear → debug:container --tags → debug:twig → lint:container. Most "the helper is not defined" errors are a stale cache or a bundle not actually registered for the current environment.twig.paths. There is no plugin system or event bus of its own unless the source shows one — check src/Event* and src/EventSubscriber/ before assuming.src/ end-to-end (it is likely small) and check the commit history for the last release date. If the bundle is effectively unmaintained, vendor it into src/ under your own namespace rather than depending on Packagist — that removes the supply-chain and abandonment risk at the cost of manual updates.How can I help you explore Laravel packages today?