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

Scaffold Command Laravel Package

wp-cli/scaffold-command

WP-CLI scaffold command generates starter code for WordPress post types, taxonomies, blocks, plugins, and child themes. Includes commands for building themes from Underscores with options for activation, SASS, and WooCommerce support.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

What the package actually is. wp-cli/scaffold-command is a WP-CLI subcommand bundle that writes starter files to disk (or to STDOUT with --raw). It is a developer-workstation and CI-provisioning tool, not a runtime library. There is no service to call, no API surface to wrap, and no Laravel service-provider integration. For a Laravel-centric PHP organization, the honest framing is: this is a WordPress-only toolchain accelerator, and its value to us is entirely in codifying project bootstrap, not in application runtime.

Architecture fit. Poor fit for a Laravel codebase, good fit for a WordPress estate. The generated artifacts are opinionated toward a specific legacy stack: Grunt (Gruntfile.js, grunt-wp-i18n, grunt-wp-readme-to-markdown), CircleCI-first CI (with gitlab/bitbucket/github alternatives), readme.txt, .distignore, and a WP test-suite bootstrap pinned to WP_TESTS_DIR. The parts with cross-stack portability are narrow but real: the PHPUnit bootstrap pattern, .phpcs.xml.dist ruleset, bin/install-wp-tests.sh, and the CI config skeletons. The post-type/taxonomy generators emit register_post_type()/register_taxonomy() calls with label/i18n boilerplate — a genuinely tedious and error-prone block of WordPress code that benefits from deterministic generation.

Strategic risk — the maintainers have published a soft sunset signal. The README explicitly states that scaffolding plugins and themes is "no longer recommended for modern WordPress development" and points to @wordpress/create-block. wp scaffold block carries a hard deprecation warning in its own documentation. Any roadmap that depends on this package must be scoped to legacy WordPress maintenance and CPT/taxonomy registration, and must not be extended into block or modern theme work. Treat it as a stable-but-declining utility, not a platform to build on.

Delivery and quality signals are strong for what it is. MIT license, bundled by default in WP-CLI (so it is already on every WP-CLI install — zero procurement friction), active release cadence, GitHub Actions with PHPUnit + Behat + PHPStan + PHPCS and WP_CS enforcement. The Behat suite is the meaningful one: it asserts real files on disk, real exit codes, and real STDOUT/STDERR content, which is exactly the contract we would script against.

Key technical risks.

  • No documented dry-run. --force overwrites silently; there is no --dry-run. Generation into a populated directory is destructive and unguarded. Automation must pre-check paths.
  • Network dependency. wp scaffold _s and wp scaffold child-theme fetch theme scaffolds; _s pulls from the Underscores project. Air-gapped or rate-limited CI will fail without a mirrored template.
  • Version drift is tied to WP-CLI. Because it ships inside WP-CLI, "the version" is whatever WP-CLI is installed. Overriding requires wp package install [email protected]:... — a git+SSH dependency in the build path.
  • Low external adoption signal. 173 stars, 0 dependents suggests no ecosystem of wrappers or tooling we could lean on; we would own any customization.
  • Generated code is a starting point, not a standard. Grunt-era assets and a CircleCI default conflict with modern tooling and likely with our existing CI.

Key questions for the team.

  1. Do we actually operate a WordPress surface, or is this being evaluated by mistake under a "Laravel/PHP" label? If the latter, the correct answer is "no integration" and the transferable value is limited to the test-harness patterns.
  2. Are we willing to own a fork or a wrapper that pins versions and enforces a house template, or do we accept upstream defaults?
  3. What is the disposition of wp scaffold block in our standards — banned, or grandfather-tolerant for existing sites?
  4. Does our CI permit network egress to GitHub/WordPress.org during build?

Integration Approach

Stack fit. Position it strictly as a developer-environment and CI bootstrap tool in the WordPress lane. It has no role in a Laravel application: no Composer autoload surface we would consume, no HTTP layer, no Artisan analogue. Do not attempt to "Laravelize" it. The realistic scope is (a) standardized plugin scaffolding for WP work, and (b) borrowing its test-harness generator as the reference implementation for PHP unit testing in WordPress projects.

Where it earns its keep — a TPM-leverage map.

Command TPM leverage Disposition
wp scaffold plugin Golden-path plugin skeleton: main file, readme.txt, .distignore, .editorconfig, PHPCS, tests Adopt, with house overrides
wp scaffold plugin-tests / theme-tests Fastest route to a working PHPUnit + WP test-suite harness with WP_TESTS_DIR injection Adopt; high value, low risk
wp scaffold post-type / taxonomy Deterministic CPT/taxonomy registration with correct label/i18n boilerplate; --raw pipes to STDOUT for diffing Adopt
wp scaffold child-theme Two-file child theme; trivial win, removes a class of copy-paste errors Adopt (conditional)
wp scaffold _s Underscores theme with --sassify / --woocommerce Tolerate for legacy; not for new builds
wp scaffold block Deprecated upstream Prohibit; mandate @wordpress/create-block

Migration path. Three phases, sequenced by risk.

  1. Pilot (1 sprint). Use plugin-tests and post-type/taxonomy on one live project. No process change; measure time-to-first-green-test versus current baseline. This is the cheapest possible validation.
  2. Codify (1–2 sprints). Capture the chosen flag combinations as a thin internal wrapper script (make wp-plugin SLUG=...) that pins WP-CLI version, pre-checks target paths (compensating for the missing dry-run), asserts non-zero exit codes, and layers our own CI config over the generated CircleCI default. Store the resulting wrapper and override files in the platform repo. This converts a tool into a governed standard.
  3. Enforce (ongoing). Add a lint/CI gate that rejects hand-rolled CPT registration and Grunt-based asset pipelines in new WordPress plugins; document the wrapper in onboarding.

Compatibility and sequencing notes.

  • Pin WP-CLI explicitly in dev images; do not rely on whatever the host has.
  • Mirror the _s scaffold source internally if CI has restricted egress.
  • Never invoke --force in automation without a prior existence check; prefer generating into a temp directory and moving artifacts in.
  • Run composer phpcs / composer phpstan against generated code before acceptance — generated does not mean conformant to house standards.
  • Sequence the wrapper before the enforcement gate; enforcing a standard we have not yet made easy is a predictable adoption failure.

Operational Impact

Maintenance. Low and mostly passive. Upstream carries the testing burden (Behat + PHPUnit + static analysis on every PR), MIT license removes commercial risk, and bundling with WP-CLI means no dependency to install for the baseline case. The real maintenance cost is ours: the wrapper script, the house overlay files, and periodic review of generated templates as WordPress tooling evolves. Budget roughly a day per quarter for review plus the cost of any override drift.

Support. Small blast radius — it runs on developer machines and in CI, not in production. Incidents manifest as failed scaffolding, not outages. First-line support should be the wrapper's README, not upstream issues; upstream is volunteer-maintained and its documented position is that plugin/theme scaffolding is legacy, which weakens the case for filing bugs against it.

Scaling. Scales trivially and is effectively free per invocation — it is local file generation with no service dependency, no rate limits, and no shared state. Concurrency is only an issue if two jobs scaffold into the same directory. The genuine scaling constraint is people, not throughput: every additional team consuming the wrapper inherits the same templates, which is exactly the consistency benefit we want.

Failure modes and mitigations.

  • Silent overwrite. --force clobbers work; there is no dry-run. Mitigation: path pre-check in the wrapper, --force never exposed to users directly.
  • Network fetch failure on _s / child-theme generation. Mitigation: internal mirror or cache the scaffold output as a vendored template.
  • Version skew across developer machines producing divergent output. Mitigation: pinned WP-CLI in containers, version assertion at wrapper startup.
  • Deprecation drift. Block generation is already deprecated; plugin/theme scaffolding is disfavored. Mitigation: keep a documented exit ramp — the wrapper is the abstraction layer, so replacing the underlying generator with @wordpress/create-block or an internal template repo should not change the developer-facing command.
  • False confidence in generated code. Grunt-based assets and default CI configs may not match our stack. Mitigation: generated code is reviewed and the CI config is replaced, never accepted as-is.
  • Test-harness environment fragility. tests/bootstrap.php depends on WP_TESTS_DIR and a MySQL/MariaDB test database. Mitigation: bake both into the standard dev container.

Ramp-up. Effectively zero for developers already comfortable with WP-CLI: the commands are self-documenting, wp scaffold with no args lists subcommands, --raw makes output diffable, and the README examples are copy-pasteable. A TPM should expect ~30 minutes of onboarding documentation and one demo. The ramp-up cost that does matter is the wrapper's: whoever owns it needs working knowledge of PHPCS/PHPStan and WP-CLI packaging.

Bottom line. As a Laravel/PHP package, this is largely a category mismatch — treat it as a WordPress-only toolchain utility. Its defensible value is narrow but real: deterministic CPT/taxonomy registration and a battle-tested PHPUnit test harness for WordPress. Adopt it behind a thin internal wrapper, prohibit the deprecated block generator, and do not build anything on top of it that assumes continued upstream investment in plugin and theme scaffolding.

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.
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log
hsluv/hsluv
seampact/codegen
seampact/hooks
seampact/ir
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table