laravellaravel-pint

Laravel Pint config exclude being ignored


Installed Laravel Pint, however the exclude parameter in the config file pint.json doesn't seem to be recognised.

I'm been able to confirm the config file is being read as if I change the preset value and observe different changes.

This is my current config. As you can see, I've tried different variations but none seem to take effect when I run vendor/bin/pin bootstrap, pint still runs on the cache directory.

{
  "preset": "laravel",
  "exclude": [
    "bootstrap/cache",
    "bootstrap/cache/*",
    "bootstrap/cache/**"
  ]
}

Solution

  • For reference in case someone else is experiencing similar "issues", if a path is provided when running pint, all excludes inside the pint.json file will be ignored. Therefore with the above example, if vendor/bin/pint is run on its own, bootstrap/cache will be ignored.

    Reference: https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/2956#issuecomment-319713451