Updated with Rector 1.0 and new smart configuration methods.
We are thrilled to introduce the latest update to our book, along with long-awaited Rector 1.0 from February 2024. This release includes 2 new commands, brand new configuration with smart IDE autocomplete, brand new chapter and DX improvements to help you master code refactoring with ease.
We've worked on this release back and forth past 3 weeks and we're excited to share it with you.
We've released the Rector - The Power of Automated Refactoring book with goal of continuous upgrades. It's been a year since last upgrade, so it's time to step up and deliver fresh 2024 book release.
Key Highlights of this update are:
Featuring typical refactor()
use-cases, enhancing your refactoring skills.
Introducing a minimalist RectorConfig::configure()
config for smoother setup.
use Rector\Config\RectorConfig;
return RectorConfig::configure()
->withPaths([__DIR__ . '/app', __DIR__ . '/tests'])
->withImportNames(removeUnusedImports: true)
->withPreparedSets(codeQuality: true, codingStyle: true, instanceOf: true)
->withPhpSets();
New commands, such as setup-ci
and custom-rule
, to streamline your workflow.
Access a complete code repository at rectorphp/rector-book-code-examples
for comprehensive learning.
Stmt
and Expr
in the "Creating Your First Rector Rule" chapter.This update empowers you to become a code refactoring expert with the latest 2024 Rector features.
It's available immediately for all existing readers.
If you haven't purchased the book yet, grab your copy now!
Happy coding!