What's new
๐ 42 new rules across common sets + Levels
Two new sets (casing, cleanup) and 40 more mature, non-PSR-12 rules wired into the gradual-adoption Levels.
-STRLEN($name); // NativeFunctionCasing
+strlen($name);
-$a = [ ]; // NoWhitespaceInEmptyArray
+$a = [];
-/** @return integer */ // PhpdocScalar
+/** @return int */
-$x = isset($a) ? $a : $b; // TernaryToNullCoalescing
+$x = $a ?? $b;New @api consts SetList::CASING, SetList::CLEANUP; withPreparedSets(casing:, cleanup:).
โ ๏ธ Deprecate symplify set, remove phpunit + strict sets
symplify soft-deprecated (rules now in common under clearer names). phpunit and strict removed โ dangerous without context, use Rector instead.
return ECSConfig::configure()
->withPreparedSets(
common: true,
- symplify: true,
- phpunit: true,
- strict: true,
);โจ New FixTagTypoFixer
Fixes plural doc-block tag typos (@returnsโ@return, @paramsโ@param, @varsโ@var), incl. psalm-/phpstan- prefixes.
๐ Fix AddMissingVarNameFixer for intersection types
-/** @var MockObject&AbstractIntegration */
+/** @var MockObject&AbstractIntegration $integration */
$integration = $this->getMockBuilder(AbstractIntegration::class);๐ Fix SwitchedTypeAndNameFixer for generics with commas
-@param $submittedArray array<int, string>
+@param array<int, string> $submittedArray๐ Skip @param comment text mistaken as switched type
@param $extra Can be used by ... no longer reordered โ trailing words are a description, not a type.
๐ Remove method-name duplicate description with trailing punctuation
RemoveMethodNameDuplicateDescriptionFixer now strips * Set name. (trailing ./!) above setName().
๐งน Internals
- Drop
symfony/console, migrate console layer toentropy/entropy(#27) - Inline
symplify/easy-parallelfor fewer deps (#28) - Resolve PHPStan errors (#29)