Released Rector 0.10 with Static Reflection and PHP 7.1 version
- See full diff: 0.9.0...0.10.0
Added Static Reflection 🚀🚀🚀
Do you have files with side effects or missing classes in autoload?
function hi()
{
echo 'hello';
}
hi();
Static reflection finally refactors code without running it.
- Contributed in #5665
- Read more about how was Legacy Refactoring made Easy with Static Reflection
Do you still need to include files with constants or custom autoloader? Use BOOTSTRAP_FILES
parameter:
$parameters->set(Option::BOOTSTRAP_FILES, [
__DIR__ . '/constants.php',
__DIR__ . '/project/special/autoload.php',
]);
Prefixed Rector with min PHP 7.1 🐘
Previous version required at least PHP 7.3 to run or Docker. Both were an obstacle to run Rector out of the box on every project.
We changed that. Now you can run Rector with older PHP and conflicting dependencies with ease:
php --version
# PHP 7.1
composer require symfony/console:^2.8
composer require rector/rector-prefixed:^0.10
- Contribted in #5880
Other Changes
- Inspired by PHPStan, you can run Rector without "process" command if you have configured paths in
rector.php
:
vendor/bin/rector
13/260 [▓░░░░░░░░░░░░░░░░░░░░░░░░░░░] 5%
-
Rules split into Project repositories: rector-symfony, rector-phpunit, rector-doctrine, rector-nette, rector-cakephp and rector-laravel
-
Rector testing simplified to single config-based - see #5837
-
Do you want to know more? Check the Release post
Upgrade Today
composer require rector/rector:^0.10
# or prefixed version
composer require rector/rector-prefixed:^0.10