Add scaffold:winter.pages demo-data command - #58
Conversation
Adds a dev-only, env-guarded, idempotent console command that creates theme content objects in the edit theme — a nested three-level static page hierarchy (plus a long-title and a nav-hidden page), a menu with nested items, two content blocks and a snippet — so the Pages side-panel tree and every editor surface can be exercised locally. Supports --fresh. Includes a PHPUnit test covering command registration and the production guard. (The full theme-file seeding is verified against a real install, so the isolated test does not mutate the on-disk demo theme.) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 24 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughThe plugin registers the Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This adds a production-guarded, dev-only scaffold command with localized registration and test coverage; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Bring the plugin to full CI parity with its siblings/EasyForms: add the phpcs Code Quality workflow (+ the phpcs-pr / phpcs-push diff-scoped utilities and the Winter CMS Plugins phpcs.xml ruleset). Verified locally with the phpcs-pr utility against the base branch. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
What
Adds a dev-only
scaffold:winter.pagesconsole command. Winter.Pages stores its content as files in the active theme (not DB rows); this command creates theme content objects in the edit theme so the Pages side-panel tree and every editor surface can be exercised locally.Conventions
production(checked first).--fresh(deletes/recreates scaffold content only).scaffold-.Plugin.phpvia a newregister()+registerConsoleCommand().Seeds (verified on a local install)
6 static pages (a nested three-level hierarchy, plus a long-title and a nav-hidden page) · 1 menu with nested items (URL / header / static-page references) · 2 content blocks (HTML + plain-text) · 1 snippet. Also creates a
staticPage-wired layout so the pages resolve a usable layout in the editor.Tests
PHPUnit test covering command registration + the production guard. The full seed writes to the active theme's files on disk (not rolled back like DB rows), so it is cross-checked against a real install rather than mutating the demo theme in an isolated test.
🤖 Generated with Claude Code
Summary by CodeRabbit
--freshoption.