Skip to content

v0.4.22

Compare
Choose a tag to compare
@github-actions github-actions released this 29 Aug 14:32
· 715 commits to main since this release
v0.4.22
ec407dd

Changed

  • Adjust preservation of line breaks and blank lines

    • Don't preserve newlines after close braces that aren't structural (where "structural" essentially means "may enclose statements")
    • Collapse blank lines between list items and in other expression contexts (e.g. for loop expressions), including before comments
    • If one expression in a for loop is at the start of a line, add a newline before the others
  • Don't sort use <trait> statements

    Changing the order of traits inserted into a class changes the order its members are reported, so behaviour removed in v0.4.15 has been restored

  • When sorting imports, don't treat one-line comments as continuations if there is a change of type

  • If chained method calls would render as below, move the first call in the chain to the next line:

    // Before
    $foxtrot->foo(
        //
    )
        ->baz();
    
    // After
    $foxtrot
        ->foo(
            //
        )
        ->baz();