Skip to content

PHPStan Rules 14.15.2

Choose a tag to compare

@TomasVotruba TomasVotruba released this 22 Sep 08:41
· 40 commits to main since this release
e635643

Patch release, all refinements to existing rules plus one rule removal.


Improvements πŸŽ‰

FormTypeClassNameRule β€” allow plain Type suffix (#297)

A form type class may now end in either Type or FormType. Previously only FormType was accepted, which clashed with the common Symfony SomethingType convention.

RequireAttributeNameRule β€” skip single-param attribute (#295)

A single-parameter attribute no longer needs a named argument. With one param the positional value is unambiguous, so the name adds nothing.

// now allowed
#[Route('/home')]

NoReturnSetterMethodRule β€” allow fluent setter returning self/static (#294)

A setter returning self or static is a deliberate fluent interface, not the accidental return the rule targets, so it is left alone.


Removed πŸ’€

NoControllerMethodInjectionRule (#296)

Removed - low value in practice.