survos/kit-bundle
A Symfony bundle from Survos that packages reusable building blocks for rapid application development, helping you bootstrap common services, templates, and configuration so you can ship features faster with less boilerplate.
First, a scope check: this is a Symfony bundle, not a Laravel package. You cannot composer require it into a Laravel app and use it directly. If you are a Laravel developer, treat it as a reference implementation for entity traits, form types, and command utilities—or use it only in a Symfony 8.1 project.
Minimal steps:
composer.json constraints before installing.composer require survos/kit-bundle:^2.0
// config/bundles.php
return [
// ...
Survos\KitBundle\KitBundle::class => ['all' => true],
];
php bin/console about
php bin/console debug:router
php bin/console list
php bin/console debug:twig
php bin/console debug:asset-map
Look first at the bundle source, not for docs:
vendor/survos/kit-bundle/src/KitBundle.phpvendor/survos/kit-bundle/src/DependencyInjection/vendor/survos/kit-bundle/config/services.yamlsrc/Traits, src/Form, src/Command directoriesFirst real use case: create a controller in src/Controller with a #[Route], a command in src/Command with #[AsCommand], a template under templates/, and an asset under assets/. Re-run the debug commands. If they appear without extra config, the convention layer is working. Then add one of the bundle’s entity traits to a test entity and run doctrine:schema:validate.
If you are on Symfony 7.x, the 2.x line likely will not install. Check for a 1.x tag or copy the specific traits/utilities you need.
Mirror the expected conventions. The bundle’s value is auto-registration by convention. Put routes in src/Controller, commands in src/Command, templates in templates/, and assets in assets/. Do not invent parallel directories unless you also wire them manually.
Entity traits. Use the bundle’s traits inside your entities:
use Survos\KitBundle\Traits\IdentifiableTrait;
use Survos\KitBundle\Traits\TimestampableTrait;
#[ORM\Entity]
class Product
{
use IdentifiableTrait;
use TimestampableTrait;
}
Check the trait source for expected interfaces, lifecycle callbacks, or mapping attributes. If the trait provides $id, do not declare another one.
Form types. If the bundle provides base form types, extend them and let Symfony autowire the result. If a provided type is not registered as a service, check whether it is abstract or excluded from services.yaml.
Twig namespaces. Bundle templates are usually reachable via the bundle namespace, e.g. @Kit/.... Override them in the app at:
templates/bundles/KitBundle/
Add your own namespaces in config/packages/twig.yaml if the bundle does not do it for you.
AssetMapper paths. The bundle likely prepends paths into framework.asset_mapper.paths. Use debug:asset-map to confirm. If you need to exclude a path, you generally need a compiler pass, because prepended config is merged, not replaced.
Commands. Place commands in src/Command and use #[AsCommand(name: 'app:something')]. If the bundle offers a base command, extend it and rely on autowiring for dependencies. Do not instantiate commands manually.
Day-to-day workflow.
debug:router, list, debug:twig, and debug:asset-map.DependencyInjection extension and services.yaml.Integration with an existing app. If you already have route imports, command registration, Twig namespaces, or AssetMapper paths, test in a branch. The bundle’s prepends can create duplicate route names, duplicate command names, or duplicate asset paths. Use the debug commands to diff before/after enabling the bundle.
composer.json. Symfony 8.1 requires a modern PHP runtime; do not assume PHP 8.1 is sufficient.^2.0.1 and read the source before depending on any specific behavior. There is no documented BC policy.debug:router, list, and debug:twig expose them. Clear cache after config changes.importmap.php or framework.asset_mapper.paths, you can get duplicate or confusing resolution. Use debug:asset-map to verify.#[ORM\Column] properties usually map correctly when used in an entity, but mapped superclasses and id generation strategies can behave differently. Run doctrine:schema:validate after adding a trait.debug:container and add explicit service config.list, check the #[AsCommand] name, the namespace, and whether the directory is autoloaded.KitBundle, overrides go under templates/bundles/KitBundle/. Renaming or aliasing the bundle breaks overrides.php bin/console cache:clear
debug:router, list, debug:twig, and debug:asset-map and assert expected entries exist. This catches regressions when the bundle or Symfony is upgraded.How can I help you explore Laravel packages today?