Skip to content

0.5.3

Latest

Choose a tag to compare

@dereuromark dereuromark released this 11 Feb 16:40
· 3 commits to master since this release

Improvements

UseStatementSniff Enhancements

  • PHP 8+ Attribute Support: FQCNs in attributes are now detected and auto-fixed

    // Before
    #[\Foo\Bar\SomeAttribute]
    class MyClass {}
    
    // After
    use Foo\Bar\SomeAttribute;
    
    #[SomeAttribute]
    class MyClass {}
  • PHP 8.1+ Enum Support: Enum implements clauses are now handled

    // Before
    enum Status: string implements \Foo\Bar\SomeInterface {}
    
    // After
    use Foo\Bar\SomeInterface;
    
    enum Status: string implements SomeInterface {}

Notes

Only fully qualified names (starting with \) are auto-fixed. Partially qualified names (e.g., Foo\Bar without leading \) are intentionally not auto-fixed right now.

Full Changelog: 0.5.2...0.5.3