You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?php
declare(strict_types=1);
namespace App\Services;
use App\Entity\User;
use App\Entity\Car;
use function Service\api;
Which is correct by PSR12 Standard, unfortunately PHP-CS-FIXER do not fully support this yet and when I run both phpcbf and php-cs-fixer, php-cs-fixer is removing the blank line between the imports, and phpcbf is readding causing an issue.
Is it possible to ignore this specific rule (no blank lines between grouped imports)?
I checked from php-cs-fixer side but it would mean removing the no_extra_blank_lines fixer which would affect more than just this. Any help would be appreciated.
@Gabb1995 At this time that's not possible, though there's been a PR open to allow for this for nearly two years already: #2729
Out of curiosity - why are you using both PHPCS as well as CS-Fixer ? PHPCS ships with the phpcbf tool, which allows you to autofix things (but based on the violations flagged by PHPCS, so there would be no conflicts).
Running phpcbf for PSR12 I get:
Which is correct by PSR12 Standard, unfortunately PHP-CS-FIXER do not fully support this yet and when I run both phpcbf and php-cs-fixer, php-cs-fixer is removing the blank line between the imports, and phpcbf is readding causing an issue.
Is it possible to ignore this specific rule (no blank lines between grouped imports)?
I checked from php-cs-fixer side but it would mean removing the no_extra_blank_lines fixer which would affect more than just this. Any help would be appreciated.
Related issue on php-cs-fixer: PHP-CS-Fixer/PHP-CS-Fixer#3582
The text was updated successfully, but these errors were encountered: