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
implementsclauses 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