dragon-code / laravel-ide-facades-helper
Laravel IDE Facade Helper, generates correct PHPDocs for your Facade classes, to improve auto-completion.
Fund package maintenance!
TheDragonCode
Open Collective
Boosty
Yoomoney
Requires
- php: ^7.2 || ^8.0
- dragon-code/support: ^5.6
- illuminate/console: ^7.0 || ^8.0 || ^9.0
- illuminate/container: ^7.0 || ^8.0 || ^9.0
- illuminate/contracts: ^7.0 || ^8.0 || ^9.0
- illuminate/support: ^7.0 || ^8.0 || ^9.0
- illuminate/view: ^7.0 || ^8.0 || ^9.0
- phpdocumentor/reflection-docblock: ^5.1
- symfony/finder: ^5.0 || ^6.0
Requires (Dev)
- composer/composer: ^2.0
Conflicts
README
Laravel IDE Facade Helper, generates correct PHPDocs for your Facade classes, to improve auto-completion.
Note This package has been deprecated. Use the Laravel Idea plugin instead.
Installation
Require this package with composer using the following command:
$ composer require dragon-code/laravel-ide-facades-helper --dev
This package makes use of Laravels package auto-discovery mechanism, which means if you don't install dev dependencies in production, it also won't be loaded.
If for some reason you want manually control this:
- add the package to the
extra.laravel.dont-discover
key incomposer.json
, e.g."extra": { "laravel": { "dont-discover": [ "dragon-code/laravel-ide-facades-helper", ] } }
- Add the following class to the
providers
array inconfig/app.php
:DragonCode\LaravelIdeFacadesHelper\ServiceProvider::class,
If you want to manually load it only in non-production environments, instead you can add this to yourAppServiceProvider
with theregister()
method:public function register() { if ($this->app->environment() !== 'production') { $this->app->register(\DragonCode\LaravelIdeFacadesHelper\ServiceProvider::class); } // ... }
Note: Avoid caching the configuration in your development environment, it may cause issues after installing this package; respectively clear the cache beforehand via
php artisan cache:clear
if you encounter problems when running the commands
Usage
php artisan ide-helper:facades
- PHPDoc generation for your Facades
You can generate helpers for your facades.
You will find additional settings in the options facade_locations
and facades_visibility
of the config/ide-helper.php
file.
Note: The package uses the same file as barryvdh/laravel-ide-helper. Therefore, if you need to redefine the paths, add the configuration from this file to it.
License
This package is licensed under the MIT License.