john-montigomo/symfony-maker-bundle
A Symfony bundle that provides maker-style code generation commands to scaffold common classes and files, helping streamline repetitive boilerplate work. Install via Composer to generate Symfony components quickly.
Start by installing the fork and checking what it actually registers in your app before assuming it mirrors Laravel’s built-in make:* commands. In a fresh install:
vendor:publish) if the package exposes them.php artisan list and filter for make:) to confirm command names and avoid collisions with Laravel’s own generators.The first practical use case is replacing one repetitive boilerplate workflow: generate a controller, form request, and test from your project’s stubs in one pass, rather than hand-copying files. Start with a single generator type, verify the generated namespace/path, then expand to the rest.
Look first at:
Project-specific stubs as the default workflow. Publish or override stubs once, then treat them as project source. Keep stubs aligned with your conventions: final classes, strict types, readonly properties, chosen test framework, form request validation style, and domain namespace layout. Every generated file should look like something you would have written by hand.
Architecture presets per bounded context. If the package supports flexible architecture configuration, define presets for the layers you actually use, e.g. app/Domain/{Module}/Actions, app/Http/Controllers/{Module}, tests/Feature/{Module}. Use one preset per module rather than a single global preset, so adding a new module is a one-command operation.
Generate in vertical slices. Use the maker commands to produce a coherent slice: command/controller, request/form class, test, and registration wiring where supported. This is more valuable than generating isolated classes, because the boilerplate that hurts most is the cross-file wiring.
Pair with existing Laravel conventions instead of replacing them. If the fork exposes generators that overlap with make:model, make:controller, etc., decide explicitly which tool owns which artifact. A common pattern is: use Laravel’s native generators for framework primitives and this package for project-specific layers, tests, and custom command/form classes.
Extend generators for repeated team patterns. Where the package exposes base generator classes, add a thin project generator for patterns used repeatedly, such as an “action + test + DTO” generator. Keep these extensions small and covered by a test that runs the generator against a temporary directory and asserts the output path and namespace.
Use in package development too. The same stubs can scaffold classes inside your own Laravel packages if the config supports custom base namespaces. This avoids maintaining two sets of templates for app code and package code.
CI guardrails. Add a lightweight test or CI step that runs selected generators and asserts generated files match expected paths and contain the expected namespace. This catches stub/config drift after upgrades, which is the main long-term risk with generator packages.
Command-name collisions. A Symfony Maker fork may register commands that overlap with Laravel’s native make:* commands. Check php artisan list after install and disable or rename anything ambiguous. Silent shadowing is easy to miss until a generated file lands in the wrong namespace.
Config and stub caching. After changing generator paths or publishing new stubs, clear cached config and any compiled package manifests. Stale config is the most common reason a generator “ignores” your new stub.
Fork divergence from upstream. This is a fork of Symfony Maker, so upstream documentation and examples may not match command names, config keys, or supported options. Treat the package’s own config and command help as authoritative, and pin the version in composer.json until you have verified upgrade behavior.
Generated namespaces are config-derived. If a generated class has the wrong namespace, the cause is usually a base namespace/path mismatch rather than the stub content. Verify the mapping between configured namespace and target directory before editing stubs.
Stub placeholders are not a templating language. Most Maker-style stubs support simple placeholder replacement. Avoid complex conditional logic in stubs; put variation in separate stubs or generator options instead.
Overwriting behavior. Confirm whether generators refuse to overwrite existing files, prompt, or silently replace them. In scripted or CI use, prefer non-interactive mode and explicit overwrite flags only where safe.
Autoload and discovery after generation. Newly generated classes may need composer dump-autoload in some workflows, especially in package development or when generating outside standard PSR-4 paths. Add this to any scripted generation step.
Test generation paths drift. Test namespace and directory conventions vary between Pest/PHPUnit and between feature/unit suites. Pin these in config and assert them in a generator smoke test.
Extension points are the stable surface. Prefer custom generator classes and published stubs over patching vendor files. Vendor patches will be lost on the next release and make fork upgrades harder to assess.
How can I help you explore Laravel packages today?