Skip to content

Released Rector 0.10 with Static Reflection and PHP 7.1 version

Compare
Choose a tag to compare
@TomasVotruba TomasVotruba released this 22 Mar 12:46
· 6964 commits to main since this release

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.


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

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%

Upgrade Today

composer require rector/rector:^0.10
# or prefixed version
composer require rector/rector-prefixed:^0.10