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

Generator Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Getting Started

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:

  1. Verify the runtime contract yourself. The release notes say nothing about supported Symfony/PHP versions. Read 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.
  2. Pin the exact version. 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.
  3. Install and register. Register the bundle in 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.
  4. Where to look first, in this order:
    • 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.
  5. First use case: generate one Doctrine entity with a few scalar fields and one association, generate CRUD controller + form type + Twig templates from it, run 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.

Implementation Patterns

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.

Gotchas and Tips

  • It is pre-1.0, not proven stable. v0.1.0. Under semver, 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.
  • The "production use" claim is the maintainer's own. "Tested quite thoroughly" and "deployed for production" are unverified self-assessments with no linked issue tracker history, download stats, or dependent count in the release notes. Validate against tests/ and your own smoke test rather than taking it at face value.
  • Release history contradicts the prior assessment. The previous read described a 2019 last release and effective abandonment; the notes describe an initial development release. Both cannot be right. Check 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.
  • No changelog in the notes. v0.1.0 tells you nothing about what changed, what broke, or what was fixed. If this is a re-release, you are flying blind on compatibility. Diff the tag against whatever you previously inspected.
  • Framework/version support is unspecified. The notes are silent on Symfony and PHP versions. Annotation-based Doctrine mapping, older MakerBundle APIs, and that era's Twig syntax are plausible and would produce dated output (annotations vs. attributes, pre-constructor-promotion). Read composer.json; do not infer from the release date.
  • Generated files overwrite silently. Always start from a clean git status. Never run the generator on a branch with uncommitted work.
  • Package/repo naming is inconsistent (k3ssen/generator vs. GeneratorBundle). Verify the Composer name and bundle class against composer.json and src/, not the README title or blog posts.
  • Debugging: re-run with -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.
  • Doctrine mapping surprises: relation ownership, cascade settings, and nullable defaults are where generated output most often needs correction. Review the generated entity mapping before migrations:diff; a bad mapping yields a migration you must unwind.
  • Extension points, in order of preference: (1) skeleton template overrides, (2) a thin application-level service wrapping the generator entry point, (3) narrow service decoration of generator classes, (4) fork. Forking is last resort — but note that if 1.0 is genuinely imminent, waiting for it may be cheaper than forking 0.1.0.
  • Don't put this in a Laravel project. No service provider, no config publishing, no Laravel-compatible dependency graph. Port the pattern or use a maintained Laravel generator — less effort than making this bundle coexist with Laravel's container.
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.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource