Skip to content

v0.4.79

Compare
Choose a tag to compare
@github-actions github-actions released this 26 Nov 07:21
· 177 commits to main since this release
v0.4.79
64cdeeb

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 with static instead of fn in static 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