github ecsphp/ecs 13.2.4
Released ECS 13.2.4

latest releases: 13.2.17, 13.2.16, 13.2.15...
one day ago

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)

Don't miss a new ecs release

NewReleases is sending notifications on new releases.