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

Drupal Code Generator Laravel Package

chi-teck/drupal-code-generator

Drupal Code Generator is a CLI tool that scaffolds Drupal modules, plugins, entities, forms, services, tests, and more. It speeds development with interactive commands and customizable templates for modern Drupal projects.

Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for developer scaffolding: Adopt rather than build. This library is the engine behind drush generate, so the org inherits years of maintained templates (modules, plugins, services, forms, entities, theme hooks, tests) instead of owning a bespoke boilerplate generator.
  • Developer Experience roadmap: A credible candidate for a "golden path" initiative — standardizing how contributors start a module or plugin is a cheap, high-leverage DX investment with measurable onboarding impact.
  • Portfolio standardization: For organizations running many Drupal sites, generated code enforces house conventions (file layout, annotations/attributes, service definitions, test skeletons) at the moment of creation rather than at review time.
  • Template governance as a product surface: The generator exposes a public API for custom generators and templates. That turns internal standards into shippable artifacts ("our" generate command) rather than a wiki page nobody reads.
  • Roadmap scoping / negative decision: This is a Drupal-specific dependency with no applicability to a Laravel or general PHP product. If the portfolio is Laravel-only, the correct product decision is to reject it outright — the high heuristic score reflects opportunity in the Drupal ecosystem, not fit for a Laravel roadmap.
  • Licensing posture: GPL-2.0 is fine for internal tooling and for code you generate and ship, but it constrains any plan to redistribute a modified generator inside a closed-source product. That is a decision for legal, not for the sprint.

When to Consider This Package

Consider adoption when all of the following hold:

  • The codebase is Drupal 9/10/11 and Drush is already (or should be) part of the toolchain — the marginal cost of adoption is then close to zero.
  • Multiple contributors, contractors, or agencies touch the same codebase and convention drift is a recurring review cost.
  • You want to reduce time-to-first-PR for new hires and reduce boilerplate LOC per module.
  • You have appetite for extending templates via the custom-generator API to encode internal standards.

Look elsewhere when:

  • The stack is Laravel, Symfony, or plain PHP. This package generates Drupal artifacts only; there is no reusable abstraction for a Laravel team. Use Laravel's own generators, artisan make:*, or a stubs package.
  • Legal cannot accept GPL-2.0 in a context where the generator itself is modified and distributed as part of a closed-source product. Internal use and generated output are not the problem; redistributing a fork is.
  • You need generators for non-Drupal targets (front-end scaffolds, CI configs, infra) — this is not a general-purpose codegen framework.
  • You want an IDE-integrated or GUI-driven generator. Adoption is CLI-first.
  • The team is on an ancient Drupal 7 estate, where the generator's value and support coverage diverge from current releases.

How to Pitch It (Stakeholders)

To executives: This is a free, actively maintained (last release June 2025) open-source tool that automates the repetitive first 60–70% of writing a Drupal module, plugin, or service. It costs nothing to license for internal use, is already bundled with the Drush tooling our engineers use daily, and its maintenance burden sits with an external community rather than our headcount. The measurable return is reduced onboarding time and fewer review cycles spent on convention violations. The one item needing sign-off is legal confirmation that GPL-2.0 fits our distribution model — it does for internal tooling and for the code it generates.

To engineering: It is the successor to the abandoned Drupal Console and the generator behind drush generate. It is Composer-installable, PHP 8+, ships a broad template set out of the box, and — importantly for us — exposes an API for authoring our own generators, so "how we build a module here" becomes executable rather than documented. Star count (268) understates real adoption, because most users reach it through Drush rather than directly.

Recommendation: Adopt for the Drupal portfolio as a DX and standardization lever; do not carry it into Laravel workstreams. Validate GPL-2.0 with legal before any scenario involving redistribution of a customized generator.

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.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core