jtc-solutions/code-generator
A Laravel package for generating code scaffolding, helping you quickly create boilerplate classes and files from customizable templates so you can spend less time on repetitive setup and more on building features.
Architecture fit
require-dev layer of our architecture, adjacent to existing dev tooling (Pint, PHPStan, Larastan, Pest/PHPUnit) rather than in the request path.Integration feasibility
composer require --dev jtc-solutions/code-generator, publish config/stubs, run the command. No infrastructure, no schema, no service dependencies.^0.1 would actually let through. It is still not abandonment — a recent, feature-bearing release is a positive continuity signal — but the versioning signal moved from "unknown" to "loose."Technical risk
| Risk | Severity | Notes |
|---|---|---|
| Bus factor of one / no community | High | Single vendor, zero adoption. No ecosystem pressure to fix bugs. |
| Supply-chain exposure | Medium-High | Dev-only, but Composer scripts and service providers still execute on our machines and CI. Requires --dev, version pinning, and lockfile review. |
| Architectural opinion mismatch | Medium-High | New services/repositories generation encodes a specific layering. If our layering differs, generated code is not a draft — it is a design debt injection. |
| Versioning discipline | Medium-High | Behavioral change (DTO structure) shipped in a patch release at 0.1.x. Pin exactly; expect output churn without version signalling. |
| Stub drift on Laravel upgrades | Medium | Generated code can silently fall out of step with framework conventions across major versions. Expanding scope widens what can drift. |
| Destructive file operations | Medium | Generators that overwrite existing files without confirmation are a real source of lost work; must verify behavior. Now more files per run, so more exposure. |
| Quality of generated code | Medium | Untested output means we inherit whatever patterns it encodes. Services and repositories raise the stakes because they are where logic accumulates. |
| Abandonment mid-adoption | Medium | If we build workflows on it and it stalls, we own the fork. Fork now includes more stubs to own. |
Key questions
composer.json?Stack fit
require-dev in composer.json, excluded from production images. If our deploy build runs composer install --no-dev, the package never reaches an environment that serves traffic.Migration path
laravel-shift/blueprint (schema-driven, actively maintained, strong adoption), reliese/laravel (DB-first model generation), or an internal Artisan command with our own stubs. The internal-stub option remains credible and is now more credible for the layered output, because generating services and repositories against our own base classes is exactly the kind of thing an internal command does better than a generic package.Compatibility
"jtc-solutions/code-generator": "0.1.2") rather than a caret constraint. The v0.1.2 patch release changing generated output is direct evidence against ^0.1.composer.json platform requirements against our oldest supported Laravel LTS. If the package does not declare a version range, treat it as untested on anything but the maintainer's environment.Sequencing
Maintenance
Support
Scaling
Failure modes
| Failure | Impact | Mitigation |
|---|---|---|
| Generated service/repository does not match our layering | Architectural divergence merged as "generated, not reviewed" | Architect reviews first generated service/repo before any rollout; fork stubs if mismatch |
| Overwrites an existing file | Lost work, silent regression | Dry-run first; require clean git state; verify behavior in spike |
| Behavioral change in a patch release | Silent output shift across teams on different versions | Pin exact versions; read release notes before bumping; single pinned version org-wide |
| Stub drift after Laravel upgrade | Generated code uses deprecated patterns | Re-validate stubs at each major upgrade; block adoption until revalidated |
| Upstream abandoned | No fixes, security exposure | Fork with internal ownership; pinned versions |
| Generated code merged without review | Inconsistent patterns, weak tests | Treat output as a draft PR — normal review, no fast-track; architecture-sensitive files get an architect reviewer |
| Composer supply-chain compromise | Developer/CI machine exposure | require-dev only, pinned, lockfile diff review, no auto-update bots on this package |
| Team over-relies on generation | Boilerplate replaces understanding; repository layer appears without design intent | Pair with code review standards; generator is a typing aid, not a design tool |
Ramp-up
php artisan can use it. Half a day of documentation covers it, maybe a full day now that services and repositories need explaining.How can I help you explore Laravel packages today?