Auth, Cache, Log), which abstracts underlying service containers. It aligns well with Laravel’s architecture but is niche—only useful for teams heavily reliant on facades for documentation.@method, @throws). Does not handle:
php artisan facade:doc) or composer script (post-autoload-dump).app/, preserving IDE autocompletion (PhpStorm, VSCode).- name: Generate Facade Docblocks
run: php artisan facade:doc --fail-on-missing
@see tags).config/facade-doc.php).| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| False Positives | Medium | Test against a subset of facades pre-integration. |
| Docblock Inconsistency | Low | Enforce via CI; manually audit critical facades. |
| IDE Sync Issues | Low | Cache invalidation (e.g., composer dump-autoload). |
| Laravel Version Lock | Medium | Test against target Laravel version (e.g., 10.x). |
| Performance | Low | Minimal; runs during autoload-dump. |
Laravel\Socialite) be handled?require-dev (no prod dependencies).composer require --dev laravel/facade-documenter
php artisan facade:doc --dry-run
Auth, PaymentService).- name: Validate Facade Docblocks
run: php artisan facade:doc --fail-on-missing
.gitattributes to ignore auto-generated docblocks (if needed).| Component | Compatibility Notes |
|---|---|
| Laravel Versions | Tested on Laravel 8+ (check composer.json for constraints). |
| PHP Versions | Requires PHP 8.0+ (due to Laravel dependencies). |
| Facade Patterns | Works with standard facades (Illuminate\Support\Facades\*). |
| Custom Facades | May need config tweaks (e.g., facade-classes mapping). |
| IDE/Editor | No issues with PhpStorm/VSCode; docblocks appear immediately after generation. |
| Static Analyzers | Psalm/PHPStan will respect generated docblocks (if configured to trust them). |
@throws).php artisan facade:doc in a clean state (no uncommitted docblocks).Auth, Cache).git merge --theirs for docblock conflicts (auto-generated files).php artisan facade:doc.composer dump-autoload.storage/logs/laravel.log for generation errors.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Docblocks Out of Sync | Broken IDE hints, false positives in static analysis. | Regenerate on conflict; enforce CI checks. |
| Facade Changes Undocumented | Undiscovered methods in code reviews. | Pair generation with code reviews. |
| CI Flakiness | False failures due to race conditions. | Cache results or run in a dedicated step. |
| IDE Caching Issues | Stale docblocks in editor. | Invalidate cache (composer dump-autoload). |
| Manual Overrides | Docblocks edited post-generation. | Educate team on **regeneration |
How can I help you explore Laravel packages today?