composer.json, Symfony bundles). For Laravel, this would require:
Bundle concept to Laravel’s providers/services.composer require --dev, but Laravel’s AppKernel equivalent (e.g., AppServiceProvider) lacks Symfony’s bundle registration. Workarounds:
config/app.php, composer.json, and service container../bin/console doc command would need to be aliased or wrapped in Laravel’s artisan (e.g., php artisan doc). This requires:
dev/test vs. Laravel’s local/production).laravel-debugbar, custom scripts).laravel-debugbar or tightenco/ziggy suffice?composer why, composer audit)?composer.json parsing).HttpKernel or DependencyInjection.php artisan route:list).php artisan easy-doc) that:
doc command via exec() or a PHP process.RouteServiceProvider) into a format the bundle can consume.// app/Console/Commands/EasyDocCommand.php
public function handle()
{
// Generate Laravel-specific data (e.g., routes, services)
$laravelData = $this->getLaravelMetadata();
// Save to a temporary file for the Symfony bundle to read
file_put_contents(storage_path('app/easydoc_laravel_data.json'), json_encode($laravelData));
// Invoke Symfony's doc command with custom config
$this->call('vendor:publish', ['--tag' => 'easydoc']);
exec('php bin/console doc --env=dev --output=' . storage_path('app/easydoc_output'));
}
twig extension to merge Laravel data into the output.# .github/workflows/docs.yml
jobs:
generate-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: composer install --dev
- run: php artisan easy-doc
- uses: actions/upload-artifact@v3
with:
name: easydoc-output
path: storage/app/easydoc_output/
| Feature | Symfony Support | Laravel Workaround Needed? | Effort |
|---|---|---|---|
| Bundle Dependency Graph | ✅ Yes | ❌ No (Composer is shared) | Low |
| Route Documentation | ✅ Yes | ✅ Yes (map Laravel routes) | Medium |
| Service Container Insight | ✅ Yes | ✅ Yes (map Laravel bindings) | High |
| Event Listeners | ✅ Yes | ✅ Yes (Laravel events differ) | Medium |
| Configuration Dump | ✅ Yes | ✅ Yes (Laravel config format) | Medium |
| HTML Template Customization | ✅ Yes | ✅ Yes (Twig → Blade or custom) | High |
php artisan commands.How can I help you explore Laravel packages today?