fully_qualified_strict_types not working with pint #2
sanfair opened this issue · comments
Eugene Lukyantsau commented
Pint Version
1.15.0
PHP Version
8.3.4
Description
Reopen #100
fully_qualified_strict_types
The bug was fixed in PHP-CS-Fixer/PHP-CS-Fixer#4309, but it still does not work in the Pint.
Steps To Reproduce
Input
<?php
namespace App;
class EngineServiceProvider extends \Illuminate\Support\ServiceProvider
{
public function test(): void
{
echo 'test';
}
}
Output
<?php
declare(strict_types=1);
namespace App;
class EngineServiceProvider extends \Illuminate\Support\ServiceProvider
{
public function test(): void
{
echo 'test';
}
}
Expected Output
<?php
declare(strict_types=1);
namespace App;
use Illuminate\Support\ServiceProvider;
class EngineServiceProvider extends ServiceProvider
{
public function test(): void
{
echo 'test';
}
}
pint.json
{
"preset": "laravel",
"rules": {
"no_empty_comment": true,
"no_empty_phpdoc": true,
"no_empty_statement": true,
"no_extra_blank_lines": true,
"no_superfluous_elseif": true,
"no_superfluous_phpdoc_tags": true,
"no_useless_else": true,
"phpdoc_inline_tag_normalizer": true,
"phpdoc_no_useless_inheritdoc": true,
"phpdoc_order": true,
"phpdoc_separation": true,
"single_import_per_statement": true,
"single_trait_insert_per_statement": true,
"backtick_to_shell_exec": true,
"declare_strict_types": true,
"fully_qualified_strict_types": true,
"global_namespace_import": {
"import_classes": true,
"import_constants": true,
"import_functions": true
},
"ordered_class_elements": {
"order": [
"use_trait",
"case",
"constant",
"constant_public",
"constant_protected",
"constant_private",
"property_public",
"property_protected",
"property_private",
"construct",
"destruct",
"magic",
"phpunit",
"method_abstract",
"method_public_static",
"method_public",
"method_protected_static",
"method_protected",
"method_private_static",
"method_private"
],
"sort_algorithm": "none"
},
"ordered_interfaces": true,
"ordered_traits": true
},
"notPath": [
".phpstorm.meta.php",
"_ide_helper.php",
"_ide_helper_models.php",
"phpstan-baseline.php",
"phpstan-baseline.l5.php",
"phpstan-baseline.l6.php",
"phpstan-baseline.l7.php",
"phpstan-baseline.l8.php"
]
}
Dries Vints commented
We currently run the latest PHP CS fixer version in your reported 1.15.0 version so right now we have no reason to believe this is a bug in Pint, sorry.