Repository navigation
0.6.9
Fixes
Three autofixes turned valid code into something broken or wrong (#84).
-
PhpCollective.PHP.PreferCastOverFunctionno longer rewrites first-class callables.strval(...)is not a call and has no cast equivalent, but the fixer produced a parse error:array_map(strval(...), $names); // became array_map((string)(...), $names);
The callable form is now left alone.
-
PhpCollective.Commenting.DocBlockParamAllowDefaultValueaccepts narrowed array types.non-empty-array<...>,non-empty-list<...>and a barelistwere not recognized as covering anarraytypehint, so the fixer appended|arrayto the param type. -
PhpCollective.Commenting.DocBlockThrowsresolves names against the current namespace. A class from the same namespace was annotated as a global one:namespace App; throw new LocalException(); // added: @throws \LocalException // now: @throws \App\LocalException
Names without an import are resolved against the namespace the method sits in, which also covers files with several namespace blocks.
Behavior change: a qualified relative name such as
throw new Sub\NestedException()was skipped before. It is now detected and reported like any other missing throws tag, so a run may show new findings for those.
Full Changelog: 0.6.8...0.6.9