Changed
-
When
strict-lists
are enabled, always remove newlines before the first item in horizontal lists (not just when--psr12
is given) -
Allow attributes to appear beside anonymous functions and arrow functions instead of moving them to separate lines (see example below)
-
When
align-fn
is enabled, align arrow function expressions withstatic
instead offn
instatic fn
expressions:<?php // Before $foo = bar($baz, fn() => foo($bar)); $foo = bar($baz, static fn() => foo($bar)); $foo = bar($baz, #[Foo] static fn() => foo($bar)); $foo = static fn() => foo($bar); // After $foo = bar($baz, fn() => foo($bar)); $foo = bar($baz, static fn() => foo($bar)); $foo = bar($baz, #[Foo] static fn() => foo($bar)); $foo = static fn() => foo($bar);
-
Refactor to reduce memory consumption