github rectorphp/rector 0.18.4
Released Rector 0.18.4

latest releases: 1.2.5, 1.2.4, 1.2.3...
11 months ago

New Features and Improvements 🥳

  • Introducing Collectors 🥳 - processing collected data + test case (#4970)
  • Run tests on macos (#5019), Thanks @staabm!
  • Move betterNodeFinder, valueResolver, phpDocInfoFactory dependencies from AbstractRector into rules (#5071)
  • DX: Validate paths in RectorConfig->paths() (#5065), Thanks @staabm!
  • [DX] Make PhpDocInfoFactory explicitly required in Rector rule constructor, if needed (#5051)
  • [DX] Make ValueResolver explicitly required in Rector rules constructor if needed (#5052)

Bugfixes 🐛

  • [DeadCode] RemoveDeadZeroAndOneOperationRector should not remove Constants (#4910), Thanks @TwanVermeulen!
  • [PostRector] Fix unused import not removed on empty generic class name exists (#5012)
  • [Parallel] Handle Spaced root project main script on parallel process (#4813)
  • Fix TypedPropertyFromStrictConstructor* order (#5021), Thanks @staabm!
  • [DX] Lower current node dependency - pass it directly to doc node parsing (#5023)
  • [AutoImport] Fix conflict current namespace auto import (#5024)
  • Simplify UseIdenticalOverEqualWithSameTypeRector (#5029), Thanks @staabm!
  • [Performance][Testing] Use str_contains instead of regex in FixtureSplitter (#5030)
  • Fix ArrayKeyFirstLastRector: Skip exection when pointer is changed (#5038), Thanks @scyzoryck!
  • [TypeDeclaration] Handle fallback from param same type object on ReturnTypeFromReturnNewRector (#5039)
  • [NodeTypeResolver] Use Scope->getType() on ArrayDimFetch on NodeTypeResolver::getNativeType() (#5037)
  • [NodeTypeResolver] pull getType() on ArrayDimFetch when not mixed type from its variable native definition (#5056)
  • [CodingStyle][EarlyReturn] Fix infinite if else on BinarySwitchToIfElseRector+RemoveAlwaysElseRector (#5057)
  • [TypeDeclaration] Skip ArrayDimFetch for return and param types (#5059), Thanks @staabm!
  • [NodeTypeResolver] Handle optional array shape on native function like with ArrayDimFetch (#5062)
  • [Php80] Mirror switch comment to match to ChangeSwitchToMatchRector (#5072)
  • [AutoImport] Skip case insensitive conflict defined class name on $rectorConfig->importNames() (#5076)
  • Docblock fix on ShortNameResolver (#5077)
  • [TypeDeclaration] Add return static property support on ReturnTypeFromStrictTypedPropertyRector (#5050)

Removed and Deprecated 💀

  • [Config] Remove asterisk support in import() for file, use explicit paths instead (#5010)
  • [Performance] Remove regex check on open tag spaced check on FileProcessor (#5073)
  • Deprecate TypedPropertyFromStrictConstructorReadonlyClassRector as based on docblock and public elements; use private elements and property promotion instead (#5049)
  • Deprecate BinarySwitchToIfElseRector as opinionated to allow more suitable match() refactoring (#5064)

Don't miss a new rector release

NewReleases is sending notifications on new releases.