laravel / pint

Laravel Pint is an opinionated PHP code style fixer for minimalists.

Home Page:https://laravel.com/docs/pint

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fully_qualified_strict_types not working with pint

1e4 opened this issue · comments

commented
  • Pint Version: 1.1.1
  • PHP Version: 8.1.4

Description:

I am trying to add the rule fully_qualified_strict_types however my files do not change

Steps To Reproduce:

Input

<?php

class EngineServiceProvider extends \Illuminate\Support\ServiceProvider
{
    public function test(): void
    {
        echo 'test';
    }
}

Output

<?php

class EngineServiceProvider extends \Illuminate\Support\ServiceProvider
{
    public function test(): void
    {
        echo 'test';
    }
}

Expected output

<?php

use Illuminate\Support\ServiceProvider;

class EngineServiceProvider extends ServiceProvider
{
    public function test(): void
    {
        echo 'test';
    }
}

pint.json

{
    "preset": "laravel",
    "rules": {
        "fully_qualified_strict_types": true
    }
}

You'll need to open an issue on the CS Fixer repo.