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

Laravel Package Generator Laravel Package

tomatophp/laravel-package-generator

A Laravel package generator that scaffolds new packages in seconds, creating service providers, config files, routes, migrations, and the full directory structure. It automates boilerplate so developers can focus on building reusable, publishable Laravel packages faster.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. This is a developer-workstation scaffolder, not a runtime library. It emits ordinary, first-party Laravel code — composer.json, a service provider, publishable config, migrations, routes, views, translations — and nothing it produces depends on the generator at runtime. That makes the architectural question unusually clean: the blast radius is a developer's local filesystem plus whatever gets committed. The generated package then lives in the standard Laravel extension shape (path-repository monorepo under packages/<vendor>/<name>, or a standalone repo), so it slots into a conventional Laravel architecture without imposing a new runtime pattern. The caveat is that the output is opinionated toward the TomatoPHP/Filament ecosystem; if we don't run that stack, the stubs must be pruned or forked before the output matches our architecture.

Integration feasibility. Mechanically trivial: composer require --dev into a scratch app (auto-discovery registers the Artisan command), or a global install to keep it out of any composer.lock. Pin an exact version — with one maintainer and zero dependents, upstream drift is our problem. The real integration work is post-generation: adding the repositories path entry and running composer update <vendor>/<name>, then wrapping the raw wizard in an internal make:package script that applies license headers, PHP/Laravel version floors, Pint/PHPStan/Rector configs, CI workflow, README/CHANGELOG templates, and .github/. That wrapper — not the vendor command — becomes the artifact onboarding docs reference.

Technical risk. Concentrated, and mostly organizational rather than technical:

  • Bus factor of one. 8 stars, 0 dependents, no external validation surface, issue response is best-effort. Last release 2024-10-26 means stubs are frozen at whatever Laravel major the maintainer targeted; stale idioms are the most likely defect and are cheap to fix only if we own a fork.
  • No documentation surface. The source of truth is src/Console/ and stubs/. Evaluation cost is reading code, not docs.
  • Known output defects. Vendor/namespace prompt mismatch is the most common post-generation repair; hyphen-to-StudlyCase conversion is inconsistent for multi-segment names; case-sensitivity bugs pass on macOS and fail in Linux CI; same-day generation can collide migration timestamps; publish tags (--tag=config) collide across packages; view/translation namespace mismatches fail silently at render time, not at boot.
  • Over-scaffolding. Cheap package creation produces package sprawl the platform team then has to support. The technical risk of the tool is low; the portfolio risk of ungoverned package creation is not.

Key questions for the maintainer/owner.

  1. Which Laravel and PHP majors do the stubs target, and does the generated package pass our CI unmodified against our current version?
  2. What is the exact command name and full prompt set (vendor, namespace, Filament, API routes, translations, assets) — and which are hardcoded?
  3. Does the generated composer.json include a require-dev for orchestra/testbench or any test harness, and does it leak the generator itself into the dependency graph?
  4. Are Filament/Splade dependencies optional or baked into the stub?
  5. Who internally owns the fork and the make:package wrapper — platform or developer experience?
  6. What is the measured diff between generated output and our internal conventions? (Small diff → fork and wrap. Large diff → treat as a written spec for a homegrown template and decline.)

Integration Approach

Stack fit. Laravel-idiomatic by construction, with the caveat that it assumes a conventional Composer package layout and leans Filament. Fit is good if we standardize on path-repository monorepos and orchestra/testbench; poor if our monorepo layout isn't modellable or our tooling is non-idiomatic. Validation stack for the pilot should be composer validate --strict, Pint, PHPStan, and Pest/PHPUnit against a real CI runner — not just a local composer install.

Migration path. There is nothing to migrate. Adoption is reversible in a day because no generated artifact references the generator at runtime. If we decline, the output of two or three trial generations becomes the specification for our own template — a reusable artifact either way. If we adopt, the path is: fork the stubs → pin the fork as a VCS repository ({"type":"vcs","url":"[email protected]:your-org/laravel-package-generator.git"}) → wrap the command in make:package → make the wrapper the only sanctioned entry point.

Compatibility. Version pinning and Laravel-major drift are the two compatibility levers. Also verify PSR-4 namespace consistency between the service provider and composer.json, confirm loadMigrationsFrom/loadViewsFrom/loadTranslationsFrom are wired, and namespace publish tags per package (audit-log-config) so vendor:publish stays deterministic. Confirm behavior on Linux CI, not just on macOS workstations.

Sequencing.

  1. Scratch spike (0.5 day): install into a throwaway Laravel app, list commands, read src/Console/ and stubs/. Enumerate prompts and defaults.
  2. Evidence run (1 day): generate two to three representative packages (one deliberately awkward multi-segment name), run them unmodified through our CI, diff against internal conventions and the golden path.
  3. Decision gate: small diff → fork/wrap; large diff → decline and use the exercise as internal template spec. Do not proceed to step 4 without this.
  4. Harden (1–2 days): fork stubs, add license headers, version floors, static analysis and Pint configs, CI workflow, README/CHANGELOG, .github/.
  5. Pilot: one team, one package, one full release cycle. Commit the scaffold as its own commit (chore: scaffold from generator vX.Y.Z) so reviewers see tool output versus human edits — this also builds the stub-fix backlog.
  6. Publish guidance only after that pilot package ships a real release. A generator that looks fine after composer install can still be wrong about tagging, changelogs, and CI on the second commit.
  7. Add a conformance check in package CI (namespace policy, version floor, static analysis level, license header) so squads can't diverge into local dialects.

Operational Impact

Maintenance. If we fork — and we should — we own the stubs. Budget a few hours per Laravel major to refresh them, plus ad-hoc fixes when a generated package misbehaves. Abandonment of upstream degrades cleanly to "we maintain our fork," which is acceptable precisely because the output is ordinary Laravel code. Pin the exact generator version and the fork ref in the wrapper's lockfile.

Support. There is no vendor support, no SLA, no documentation, and a single maintainer's best-effort issue response. That means the support surface is internal and must be owned by a named team — platform or developer experience — before rollout. When a scaffolded package misbehaves, the complaint lands on the tool owner, not on the upstream repo. Debugging is by reading source and stubs, which should be written into the internal runbook.

Scaling. Technically it scales fine: it never runs in production, so there is no load, availability, or latency dimension. The scaling risk is organizational. Value accrues as (hours saved per package) × (packages per quarter); cost accrues as package sprawl plus convention drift across squads. Mitigate with one sanctioned stub set, one wrapper script, and a lightweight conformance check in package CI. This should be budgeted as internal developer-productivity spend — never a roadmap line item and never in customer-facing or platform-strategy narratives.

Failure modes. Mostly silent and mostly cheap, but each needs a checklist item:

  • Class not found immediately after generation → missing path-repository entry or missing composer update <vendor>/<name>, not a generator bug.
  • Missing tables in test suites → migration timestamp collisions from same-day generation.
  • Nondeterministic vendor:publish → colliding publish tags across packages.
  • "View not found" at render time → loadViewsFrom alias inconsistent with view('alias::...') call sites.
  • macOS-pass / Linux-CI-fail → namespace case mismatches.
  • Deprecation noise on a new Laravel major → stubs frozen at an older major.
  • Package sprawl → cheap generation outpacing platform support capacity.

Ramp-up. Low for engineers: an interactive wizard, a handful of prompts, and a wrapper script. The real ramp-up is on the owning team — reading the source, forking the stubs, and writing the internal runbook. Do not publish onboarding guidance until the pilot package ships a release; measure success as time-to-first-package for new hires and the number of packages created without hand-edited boilerplate. Against the alternative of spatie/package-skeleton-laravel plus an internal template repo, the honest framing is: this is a one-to-two-engineer-day spike to decide whether we fork it, not a procurement or platform-strategy decision.

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.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource