yieldstudio/grumphp-laravel-pint

A Laravel Pint task for GrumPHP.

1.0.0 2023-07-20 00:20 UTC

This package is auto-updated.

Last update: 2024-04-20 01:46:23 UTC


README

A Laravel Pint task for GrumPHP.

Latest Version GitHub Workflow Status Total Downloads

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.