Skip to content

v0.2.0 — The Pipe Dream

Latest

Choose a tag to compare

@mibk mibk released this 25 Mar 08:53

New features

  • -s flag for code simplification:
    currently normalizes string quoting
    (double-quoted strings without interpolation → single-quoted).
  • Blank lines between class members:
    automatically ensures blank lines between class member declarations.
  • Lowercase keywords:
    normalizes all PHP keywords and true/false/null to lowercase.
  • Pipe operator (|>) support.

Improvements

  • Handle keywords used as class, interface, trait, and enum names.
  • Handle namespace\Foo as a qualified name.
  • Handle leading backslash in namespace names.
  • Support CRLF line endings.

Bug fixes

  • Fix keyword-to-identifier demotion for LowercaseKeywords.
  • Fix printing brace for anonymous class.
  • Fix run-on statement issue.
  • Fix formatting new static.
  • Fix identifying next operator.

PHPDoc parser

  • Conditional return types (($param is Type ? T1 : T2)).
  • Closure(params): ReturnType syntax.
  • @phpstan-type aliases with = between name and type.
  • Empty array{} shape syntax.
  • Class::*_SUFFIX prefix-wildcard in const fetch expressions.
  • Variadic (...) in array shapes.
  • Multiline type expressions.
  • Nullable constant fetch.
  • Number literals (e.g. floats).
  • [] as default parameter value in @method tags.
  • Parameters without PHP type in @method tags.
  • Fix handling of leading asterisks;
    remove leading/trailing/duplicate blank lines.