wpdiggerstudio/wpzylos-cli-devtool
最新稳定版本:v1.0.1
Composer 安装命令:
composer require wpdiggerstudio/wpzylos-cli-devtool
包简介
Development CLI tool for scaffolding WPZylos plugins with generators for controllers, requests, migrations, and more
关键字:
README 文档
README
Development CLI tool for scaffolding WPZylos plugins and generating boilerplate code.
📖 Full Documentation | 🐛 Report Issues
✨ Features
- make:plugin — Create a new plugin from the WPZylos scaffold
- make:controller — Generate controller classes with CRUD methods
- make:request — Generate FormRequest validation classes
- make:migration — Generate database migration files
📋 Requirements
| Requirement | Version |
|---|---|
| PHP | ^8.0 |
| Symfony Console | ^6.0 || ^7.0 |
🚀 Installation
Install as a dev dependency in your plugin:
composer require --dev wpdiggerstudio/wpzylos-cli-devtool
📖 Quick Start
After installing the package, you have two options to run CLI commands:
Option 1: Use Vendor Binary Directly
Run commands directly from vendor/bin:
vendor/bin/wpzylos list vendor/bin/wpzylos make:controller ProductController
Option 2: Create Root Executable (Recommended)
For a cleaner experience like Laravel's php artisan, run the installer once:
vendor/bin/wpzylos-install
This creates a wpzylos file in your project root. Then use:
php wpzylos list php wpzylos make:controller ProductController php wpzylos make:request StoreProductRequest php wpzylos make:migration create_products_table
🛠️ Available Commands
make:plugin
Create a new WPZylos plugin from the scaffold template.
# Using vendor binary vendor/bin/wpzylos make:plugin my-plugin # Or using root executable (after running wpzylos-install) php wpzylos make:plugin my-plugin php wpzylos make:plugin my-plugin --namespace=MyCompany\\MyPlugin
make:controller
Generate a controller class.
php wpzylos make:controller ProductController php wpzylos make:controller ProductController --resource
Options:
--resource— Generate a resource controller with CRUD methods (index, show, store, update, destroy)
make:request
Generate a FormRequest validation class.
php wpzylos make:request StoreProductRequest php wpzylos make:request UpdateUserRequest
make:migration
Generate a database migration file.
php wpzylos make:migration create_products_table php wpzylos make:migration create_orders_table --create=orders php wpzylos make:migration add_status_to_orders --table=orders
Options:
--create=<table>— Generate migration for creating a new table--table=<table>— Generate migration for modifying an existing table
📁 Generated File Locations
| Command | Output Path |
|---|---|
make:controller |
app/Http/Controllers/ |
make:request |
app/Http/Requests/ |
make:migration |
database/migrations/ |
🔧 Configuration
The CLI tool automatically detects your plugin's configuration from composer.json:
{
"autoload": {
"psr-4": {
"MyPlugin\\": "app/"
}
}
}
🧪 Testing
# Run all tests composer test # Run with coverage ./vendor/bin/phpunit --coverage-html coverage/
📦 Related Packages
| Package | Description |
|---|---|
| wpzylos-cli-core | Stub compilation utilities |
| wpzylos-wp-cli | WP-CLI integration |
| wpzylos-scaffold | Plugin template |
| wpzylos-core | Application foundation |
📖 Documentation
For comprehensive documentation, tutorials, and API reference, visit wpzylos.com.
☕ Support the Project
If you find this tool helpful, consider buying me a coffee! Your support helps maintain and improve the WPZylos ecosystem.
📄 License
MIT License. See LICENSE for details.
🤝 Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
Made with ❤️ by WPDiggerStudio
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-04