Skip to content

Keep blank line between different import groups - #209

Merged
TomasVotruba merged 1 commit into
mainfrom
no-blank-line-between-import-groups
Oct 14, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
no-blank-line-between-import-groups

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

NoBlankLineBetweenImportsFixer collapsed every blank line between consecutive top-level use statements, including the one separating a class-import group from a use function / use const group.

Now the blank line is kept whenever adjacent imports differ in kind (class vs function vs const), in both directions. Blank lines within the same group are still collapsed.

Before:

use Foo\Bar;

use Foo\Baz;

use function Foo\first;

After:

use Foo\Bar;
use Foo\Baz;

use function Foo\first;

Applied to both the PHP fixer and the Go (blink) port, with tests for each.

@TomasVotruba
TomasVotruba merged commit 0c5e0d2 into main Oct 14, 2026
20 checks passed
@TomasVotruba
TomasVotruba deleted the no-blank-line-between-import-groups branch October 14, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant