cli/cmd/php/commands.go
Snider e4d79ce952 feat(php): add quality commands and split cmd/php for maintainability
Add new PHP quality commands:
- psalm: Psalm static analysis with auto-fix support
- audit: Security audit for composer and npm dependencies
- security: Filesystem security checks (.env exposure, permissions)
- qa: Full QA pipeline with quick/standard/full stages
- rector: Automated code refactoring with dry-run
- infection: Mutation testing

Split cmd/php/php.go (2k+ lines) into logical files:
- php.go: Styles and command registration
- php_dev.go: dev, logs, stop, status, ssl
- php_build.go: build, serve, shell
- php_quality.go: test, fmt, analyse, psalm, audit, security, qa, rector, infection
- php_packages.go: packages link/unlink/update/list
- php_deploy.go: deploy commands

QA pipeline improvements:
- Suppress tool output noise in pipeline mode
- Show actionable "To fix:" suggestions with commands

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 23:58:03 +00:00

41 lines
1.3 KiB
Go

// Package php provides Laravel/PHP development and deployment commands.
//
// Development Commands:
// - dev: Start Laravel environment (FrankenPHP, Vite, Horizon, Reverb, Redis)
// - logs: Stream unified service logs
// - stop: Stop all running services
// - status: Show service status
// - ssl: Setup SSL certificates with mkcert
//
// Build Commands:
// - build: Build Docker or LinuxKit image
// - serve: Run production container
// - shell: Open shell in running container
//
// Code Quality:
// - test: Run PHPUnit/Pest tests
// - fmt: Format code with Laravel Pint
// - analyse: Run PHPStan/Larastan static analysis
// - psalm: Run Psalm static analysis
// - audit: Security audit for dependencies
// - security: Security vulnerability scanning
// - qa: Run full QA pipeline
// - rector: Automated code refactoring
// - infection: Mutation testing for test quality
//
// Package Management:
// - packages link/unlink/update/list: Manage local Composer packages
//
// Deployment (Coolify):
// - deploy: Deploy to Coolify
// - deploy:status: Check deployment status
// - deploy:rollback: Rollback deployment
// - deploy:list: List recent deployments
package php
import "github.com/leaanthony/clir"
// AddCommands registers the 'php' command and all subcommands.
func AddCommands(app *clir.Cli) {
AddPHPCommands(app)
}