laravel / pint

Laravel Pint is an opinionated PHP code style fixer for minimalists.
https://laravel.com/docs/pint
MIT License
2.78k stars 144 forks source link

Can't disable Laravel fixers. #253

Closed stephan-v closed 7 months ago

stephan-v commented 7 months ago

Pint Version

1.14

PHP Version

8.2.15

Description

It seems I can no longer disable custom Laravel rules. After running Pint you will get a warning:

The rules contain unknown fixers: "Laravel/laravel_phpdoc_alignment".

My current pint.json file:

{
    "preset": "laravel",
    "rules": {
        "not_operator_with_space": false,
        "not_operator_with_successor_space": false,
        "Laravel/laravel_phpdoc_alignment": false
    }
}

Steps To Reproduce

Run Pint using this pint.json file:

{
    "preset": "laravel",
    "rules": {
        "not_operator_with_space": false,
        "not_operator_with_successor_space": false,
        "Laravel/laravel_phpdoc_alignment": false
    }
}
Jubeki commented 7 months ago

The custom Laravel fixer was replaced in version v1.13.9

To change the rule you should use the following instead:

{
    "preset": "laravel",
    "rules": {
        "not_operator_with_space": false,
        "not_operator_with_successor_space": false,
        "phpdoc_align": true
    }
}

Or completely disable "phpdoc_align" by setting it to false.

driesvints commented 7 months ago

Thanks @Jubeki