yieldstudio / grumphp-laravel-pint
A Laravel Pint task for GrumPHP.
Installs: 94 973
Dependents: 9
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 2
Open Issues: 1
Type:plugin
Requires
- php: ^8.0
- phpro/grumphp: ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.22
This package is auto-updated.
Last update: 2024-09-20 02:36:38 UTC
README
A Laravel Pint task for GrumPHP.
Installation
composer require yieldstudio/grumphp-laravel-pint
For GrumPHP v1 :
composer require yieldstudio/grumphp-laravel-pint:^0.0.2
Usage
In your grumphp.yml :
grumphp: extensions: - YieldStudio\GrumPHPLaravelPint\ExtensionLoader tasks: laravel_pint: # These are all optional and have been set to sensible defaults. config: pint.json preset: laravel # Auto fix Laravel Pint issues # Can be false, true, 'run' or 'pre_commit' (default) auto_fix: 'pre_commit' # Auto stage files after auto fix # Can be false, true, 'run' or 'pre_commit' (default) # Works only if the task has been auto fixed (Without GrumPHP having to ask for it) auto_stage: 'pre_commit' triggered_by: - php ignore_patterns: - /^a-patten-to-ignore-files-or-folders\/.*/
Auto fix
When auto_fix is not enabled, GrumPHP runs Pint in dry mode and then asks if you want to apply patches automatically.
By default, auto_fix
is enabled only in a pre_commit context.
Possible values are true
, false
, pre_commit
, run
.
Auto stage
Allows you to automatically stage (git add
) files affected by Pint with GrumPHP.
By default, auto_stage
is enabled only in a pre_commit context.
This option only works when auto_fix
is enabled for the runtime context.
Changelog
Please see CHANGELOG for more information on what has changed recently.
Security
If you've found a bug regarding security please mail contact@yieldstudio.fr instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.