New Features 🎉
- Added
@changelog
annotation above rule to explain why the rule does what it does in the output #6073 - thanks @sabbelasichon
Just add it to your Rector rule:
/**
* @changelog https://wiki.php.net/rfc/typed_properties_v2#proposal
*/
final class TypedPropertyRector extends AbstractRector
{
}
Run Rector:
vendor/bin/rector ...
And if this rule changed the code, it will show the link too:
Applied Rectors:
* TypedPropertyRector - https://wiki.php.net/rfc/typed_properties_v2#proposal
- NEW PACKAGE Rector Installer for easier extension installing - #6129 - thanks @sabbelasichon
- NEW PACKAGE Rector PHPStan Rules for rule developers - https://github.com/rectorphp/rector-phpstan-rules
- [DeadCode] Added
RemoveUnusedPrivateMethodParameterRector
- #6168 - Refactored file processors to make use of
File
object (similar toScope
concept from PHPStan) #6085 - Added
dump_node()
helper function to see what node you have #6229 - thanks @ullique for inspiration
dump_node($string);
// change 2nd to increase depth
dump_node($string, 3);
New Downgrade Rules
- Added
DowngradeStrictTypeDeclarationRector
#6107 - thanks @samsonasik - Added
DowngradeArrayKeyFirstLastRector
- #6137 - Added
DowngradeAnonymousClassRector
- #6122 - thanks @samsonasik - Added
DowngradeNullCoalesceRector
- #6208 - thanks @samsonasik
Bugfixes 🐛
- Fixed invalid doc block tag crashing #6068
- Fixed
parent
,self
,static
prefixing on class name change #6159 - Fixed use of
AbstractRectorTestCase
in tests while usingrector/rector-prefixed
- f801c76 - Fixed
AUTOLOAD_PATHS
andBOOTSTRAP_FILES
parameters in tests - #6239 - Fixed displayed Rector version in
rector/rector-prefixed
26d6fff - Fixed code conflicts with different php-parser version in
rector/rector-prefixed
- f15648e, thanks @phpstan for inspiration