github lkrms/pretty-php v0.4.21

latest releases: v0.4.75, v0.4.74, v0.4.73...
14 months ago

Changed

  • Change default sort order of alias/import statements to depth-first
    • To restore the previous behaviour, use --sort-imports-by name or set "Sort Imports By" to "name"
  • When sorting by name, don't place grouped alias/import statements below ungrouped imports
  • Collapse space after ; in for loops if the next expression is empty
  • Preserve newlines before and after attributes
  • Add a newline before every parameter, not just annotated parameters, when splitting parameter lists to accommodate attributes

Fixed

  • Fix issue where blocks that start with an empty statement (e.g. function () { ; // ...) are not indented correctly
  • Fix issue where anonymous class declarations are not always recognised
  • Fix issue where newlines are added after inline comments between control structure tokens, leading to unnecessary indentation
  • Fix issue where arrow function alignment fails in strict PSR-12 mode
  • Fix align-lists issue where list items appearing consecutively on the same line are not always aligned correctly

Don't miss a new pretty-php release

NewReleases is sending notifications on new releases.