laravel/pao
Agent-optimized output for PHP tools. Detects AI agents (Claude Code, Cursor, Devin, Gemini CLI, etc.) and replaces verbose PHPUnit/Pest/Paratest/PHPStan/Rector and Laravel Artisan output with minimal structured JSON (and cleaner Artisan text). Zero config; human terminal output unchanged.
duration_ms, error_details) critical for TPMs building CI/CD pipelines, test coverage dashboards, or AI-driven debugging tools.tool field in JSON.exit(1)) may corrupt JSON output. Fixed in v1.1.1, but TPMs should validate in CI/CD timeouts or long-running tests..env values (e.g., "true" vs. true) could affect AI parsing. Resolved in v1.1.1, but TPMs should audit environment configurations.AI Agent Compatibility:
pao:detect_agent logic.CI/CD Impact:
phpunit --exit-on-failure.Artisan Workflows:
about, migrate:status, and db:show.Long-Term Maintenance:
raw field preserves unstructured data.Assessment Phase (1 day):
phpunit → JSON vs. raw).Pilot Phase (3 days):
composer require laravel/pao --dev
migrate:status).Rollout Phase (1 week):
| Tool | Compatibility | Notes |
|---|---|---|
| PHPUnit | ✅ 12-13 | Full support, including deprecations. |
| Pest | ✅ 4-5 | Parallel mode (pest --parallel) fixed in v1.1.0. |
| Paratest | ✅ | Auto-detected via Composer. |
| PHPStan | ✅ 1.x | Error details organized by file. |
| Rector | ✅ | Uses native JSON output. |
| Artisan | ✅ Laravel 12+ | Strips ANSI/whitespace for AI. |
| Symfony/Laminas | ✅ (Partial) | No Artisan optimizations. |
about, migrate:status).composer update.pao:output events).| Scenario | Impact | Mitigation |
|---|---|---|
| AI Detection Failure | Raw output to AI agent | Audit pao:detect_agent logic. |
| Runtime Exit | Incomplete test results | Test with --exit-on-failure. |
| Boolean Env Var Error | AI parsing failures | Validate .env values. |
| PHPUnit Version Mismatch | Broken integration | Pin to compatible versions. |
composer require laravel/pao.phpunit --json and AI agent.How can I help you explore Laravel packages today?