k3ssen/generator
A Laravel/PHP scaffolding package that generates boilerplate from entity and schema definitions, helping you quickly scaffold models, controllers, and CRUD so you spend less time on repetitive setup and more on application logic.
Before anything else, pin down what you are actually installing. The v0.1.0 release notes state this is the initial development release, thoroughly tested and used in production, with a first major release anticipated after review. That is a meaningful change from the previous read of this package: it is not a mature tool, but it is also not obviously dead. Treat it as pre-1.0 software with a declared production track record — self-reported by the maintainer, not independently verified.
Still a Symfony bundle, not a Laravel package. A Laravel codebase has only two valid reasons to touch it: (a) you maintain a Symfony app alongside Laravel work, or (b) you want to borrow its scaffolding model for your own tooling. No Eloquent, Blade, or Artisan integration exists here.
Minimal steps:
composer.json for the real require block — do not assume Symfony 4 or a 2019-era PHP floor is still accurate, and do not assume it has moved to Symfony 5/6 or PHP 8.1+ either. This is the single most important pre-flight check and the notes do not answer it.composer require k3ssen/generator:0.1.0 (exact, no caret). Under semver, 0.x minor bumps may contain breaking changes, and "close to the first major release" implies a 1.0 is coming that may not be drop-in. See the Gotchas section.config/bundles.php, confirming the exact bundle class from src/ — package name and repo name differ, so don't infer the class from the README title.composer.json — supported versions. Before the README.README.md — command list and required config.CHANGELOG.md / release history — check whether v0.1.0 is genuinely the first release or a re-versioning. The previous assessment recorded a 2019 last release; the release notes describe v0.1.0 as initial. Those two facts are in tension and one source is wrong. Resolve it before trusting anything else.src/Command/ — the make:*-style entry points; command names are the real API.src/Generator/ (or equivalent) — the classes that build entity/CRUD code.Resources/skeleton/ — the Twig templates that determine output shape. This is the set you will customize.tests/ — the "thoroughly tested" claim is best validated here; read the test suite breadth before believing it covers your use case.doctrine:migrations:diff and migrate. Keep this on a throwaway branch and commit the raw output before editing, so you have a baseline to diff future generator versions against.For a purely Laravel baseline, the equivalent is php artisan make:model Post -mcr plus a FormRequest. Treat this bundle as a reference implementation, not a Laravel dependency.
Pin, then wrap. Because this is 0.1.0 with a major release signalled, the highest-value pattern is an isolation layer: one small application-level service (or your own console command) that invokes the generator and is the only code in your app that references the bundle's classes directly. When 1.0 lands, you change one file instead of auditing every call site.
Schema-first, generate-once. The productive workflow remains: define the entity from the command line, immediately generate CRUD/forms/templates, then hand-edit. Do not expect to re-run the generator over edited files. Commit the generated output as an isolated "scaffold" commit so it is separable in review.
Use it as a starting-point factory, not a live tool. Once generated code diverges from the templates, re-running is destructive. Guard by generating into a clean working tree, inspecting git diff, and keeping only what you want.
Snapshot output for upgrade safety. Given an anticipated 1.0, keep a small fixture set: entity definitions plus their expected generated output under tests/fixtures/. After any version bump, regenerate and diff. This is cheap now and expensive to reconstruct later.
Override templates instead of editing vendor. Symfony bundles conventionally allow skeleton overrides via templates/bundles/<BundleName>/ or Resources/<BundleName>/. Confirm the exact override path from the bundle's template-loading code before writing anything — it is the cleanest extension point and the most likely to survive a 1.0.
Decorate rather than fork — with a caveat. Register a service decorator around generator classes in config/services.yaml instead of editing vendor/. Caveat: decorators bind to internal class signatures, which are exactly what a pre-1.0 package is most likely to change. Decorate narrowly, and prefer template overrides where they suffice. Do not build a decorator around a deep internal class you cannot afford to chase.
Borrow the pattern for Laravel. The reusable idea is: field-definition input → a builder per artifact emitting model + migration + controller + request + views + factory. Laravel equivalents are better maintained: artisan make:*, Laravel Blueprint, InfyOm, or a custom Artisan command with stubs in stubs/. Copy the structure, not the dependency.
Pair with the Doctrine toolchain. Generated entities are only useful wired to migrations; follow with fixtures (the Doctrine analogue of Laravel factories). In a mixed shop, mirror the same shapes with Faker so Symfony scaffold and Laravel app can share test fixtures.
CI drift check. Generate into a temp directory in CI and diff against committed output. Divergence means your templates changed or your entity definitions did — both worth knowing, and doubly so right before an expected major version bump.
0.x minor releases may break APIs, and the maintainer explicitly signals a first major release is pending. Pin exact versions, read the diff before bumping, and assume at least one migration to 1.0.tests/ and your own smoke test rather than taking it at face value.composer.json, git tags, and Packagist before making any planning decision — the answer changes whether you are adopting a revived package or a stale one.composer.json; do not infer from the release date.git status. Never run the generator on a branch with uncommitted work.k3ssen/generator vs. GeneratorBundle). Verify the Composer name and bundle class against composer.json and src/, not the README title or blog posts.-vvv, check var/log/dev.log. If a command isn't listed at all, the bundle isn't registered or the container cache is stale — bin/console cache:clear first. Command discovery failures are almost always registration/autoloading, not the generator.migrations:diff; a bad mapping yields a migration you must unwind.How can I help you explore Laravel packages today?