mayflower/php-codebrowser
Static PHP code browser that generates a cross-referenced HTML view of your source tree. Jump to classes, methods, and references, inspect files with syntax highlighting, and ship browsable documentation for audits, reviews, or onboarding.
php artisan with a codebrowser:serve command for CLI access.| Risk Area | Mitigation Strategy |
|---|---|
| Performance | QA tool scans add ~10–30% to build time; cache results or run async (e.g., queue). |
| Tool Configuration | Defaults may not match Laravel’s PSR standards; validate against rector/pint. |
| UI/UX Fragmentation | Customize templates to match Laravel’s Blade/Inertia.js design system. |
| Dependency Bloat | Audit QA tools for Laravel-specific false positives (e.g., magic methods like handle()). |
| Security | Restrict browser access in production (e.g., IP whitelisting, auth middleware). |
| Component | Compatibility Notes |
|---|---|
| PHP | 8.1+ (Laravel 9/10); 8.0 may need adjustments. |
| Composer | Standard require; no Laravel-specific plugins. |
| QA Tools | PHPStan/Psalm/PHPMD (configurable); fallback to heuristics. |
| Frontend | Static HTML/JS output; can integrate with Inertia.js or Blade. |
| CI/CD | Works with GitHub Actions, GitLab CI, etc. (cache results to avoid reprocessing). |
| Database | None; file-system only. |
| Laravel Features | No direct conflicts with Eloquent, Queues, or Events. |
composer install/artisan.composer.json:
"require-dev": {
"mayflower/php-codebrowser": "^1.0"
}
Artisan with a custom command (example):
// app/Console/Commands/CodeBrowserServe.php
use Mayflower\CodeBrowser\CodeBrowser;
public function handle() {
$browser = new CodeBrowser(__DIR__.'/../../../');
$browser->addTool(new \Mayflower\CodeBrowser\Tools\PHPStan());
$browser->serve();
}
- name: Generate Code Browser
run: php artisan codebrowser:generate
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: code-browser
path: public/codebrowser
auth:sanctum).boot(), handle()) to reduce noise.AppServiceProvider from deep analysis if it’s a catch-all..blade.php files if focusing on backend logic.Illuminate\Foundation\Application as "unused" (suppress with config).psalm-plugin-laravel for accurate analysis.php artisan tinker help).php artisan codebrowser:debug (hypothetical; implement if needed).storage/logs/codebrowser.log.docs/laravel-integration.md.php artisan codebrowser:cache).How can I help you explore Laravel packages today?