Skip to content

Released ECS 13.2.4

Choose a tag to compare

@TomasVotruba TomasVotruba released this 22 Jul 15:49

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 to entropy/entropy (#27)
  • Inline symplify/easy-parallel for fewer deps (#28)
  • Resolve PHPStan errors (#29)