<feed xmlns="http://www.w3.org/2005/Atom">
    <id>https://getrector.com/rss.xml</id>
    <link href="https://getrector.com/rss.xml"/>
    <title>
        <![CDATA[ Rector Blog ]]>
    </title>
    <description>Rector Blog about Legacy Code Migrations</description>
    <language/>
    <updated>Sat, 07 Feb 2026 00:00:00 +0000</updated>

            <entry>
            <title>
                <![CDATA[ Upgrade to PHPUnit 12.5 in 7 Diffs ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/upgrade-to-phpunit-125-in-7-diffs"/>
            <id>https://getrector.com/blog/upgrade-to-phpunit-125-in-7-diffs</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ PHPUnit 12 was released a year ago, but only PHPUnit 12.5 released in December 2025 includes valuable features that are worth it.

The most important change, that will affect your code, is that mocks are now much stricter. There are also stubs, a mock that does nothing. How do you spot them and separate them?

Curious how to get from 4000 notices to under 100 in 7 diffs? Read on.
 ]]></summary>

            <updated>Sat, 07 Feb 2026 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Introducing Safe and Progressive Strict Type Adoption Rule ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/introducing-safe-and-progressive-strict-type-adoption-rule"/>
            <id>https://getrector.com/blog/introducing-safe-and-progressive-strict-type-adoption-rule</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ PHP&#039;s `declare(strict_types=1)` directive is a powerful tool for preventing subtle bugs.
Yet most existing, mature projects don&#039;t use it consistently, if at all.
Why? Because automatically adding it to all your files at once will cause your application to explode: expect thousands of errors.
That leaves you fixing files by hand, one by one, and relying on team members to remember to add it to new files.
Without a safe and automated process, adoption hardly ever sticks.

Until now. The new `SafeDeclareStrictTypesRector` only adds strict types to files that are **already type-safe**, making safe, progressive adoption finally possible and preventing the file from becoming non-strict in the future.
 ]]></summary>

            <updated>Sun, 01 Feb 2026 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Make PHPUnit tests Perfect in 15 Diffs ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/make-phpunit-tests-perfect-in-15-diffs"/>
            <id>https://getrector.com/blog/make-phpunit-tests-perfect-in-15-diffs</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ 
Rector helps you improve PHP code, upgrade it to latest PHP version, make use of modern features and faster code structures. But did you know it can make your PHPUnit tests faster and easier to read?

New PHPUnit version have more precise and reliable asserts, but most people don&#039;t know about them. They make tests run faster and in case of failure, provide more clear error message you&#039;ll understand.

Rector can help you with that!
 ]]></summary>

            <updated>Wed, 12 Nov 2025 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Rector 2.2: New rules for Array Docblocks ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/rector-22-new-rules-for-array-docblocks"/>
            <id>https://getrector.com/blog/rector-22-new-rules-for-array-docblocks</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ As you know, we provide an [upgrade services](https://getrector.com/hire-team) to speed up the modernization of codebases. Part of this service is getting PHPStan to level 8 with no baseline (only edge cases).

Level 6 is known for requesting more detailed types over `array`,
  `iterable` or `Iterator` type hints. Bare `mixed` or `array` should be replaced with explicit key/value types, e.g., `string[]` or `array&lt;int, SomeObject&gt;`.

At first, we did this work manually. Later, we made custom Rector rules that we kept private.

Today, we are open-sourcing these rules to help you with the same task.
 ]]></summary>

            <updated>Mon, 06 Oct 2025 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Introducing Rector Jack: Raise Your Dependencies Safely ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/introducing-rector-jack-raise-your-dependencies-safely"/>
            <id>https://getrector.com/blog/introducing-rector-jack-raise-your-dependencies-safely</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Hey PHP folks! 👋 We&#039;re thrilled to share **Jack**, a new experimental CLI tool to help you lift your Composer dependencies one version at a time &amp;ndash; safely and steadily. If you&#039;ve ever dreaded the &quot;oh no, our dependencies are *years* old&quot; moment, Jack&#039;s here to make upgrades less painful.

We&#039;ve tested it internally for a couple months, published silently to **pass 3500 downloads in 20 days**, it&#039;s time to share it with the world.

It fits both legacy projects to reach higher faster, and modern projects not to fall behind.
 ]]></summary>

            <updated>Mon, 19 May 2025 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ How to install old or new PHP on non-LTS Ubuntu ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/how-to-install-old-or-new-php-on-non-lts-ubuntu"/>
            <id>https://getrector.com/blog/how-to-install-old-or-new-php-on-non-lts-ubuntu</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Legacy projects can be upgraded in 2 directions - PHP-wise and infrastructure-wise. We can get a new Ubuntu 25 but still have to run old PHP.

The same goes for upgrading a legacy project. Locally, we use Ubuntu 25, but we work on a project that uses PHP 7.2.

By default, Ubuntu releases ship only one PHP version. Often we need one of the other ~10 versions. How do we run old or new PHP on the latest Ubuntu?
 ]]></summary>

            <updated>Fri, 25 Apr 2025 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ How to Strangle your Project with Strangle Anti-Pattern ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/how-to-strangle-your-project-with-strangle-anti-pattern"/>
            <id>https://getrector.com/blog/how-to-strangle-your-project-with-strangle-anti-pattern</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Nearly half of the projects we help upgrade have tried the upgrade before on their own.
They&#039;ve introduced the infamous &quot;strangle pattern&quot;. It&#039;s a way to upgrade a project separating one part of the codebase from the rest at a time.

Those companies reach us because while the strangle pattern is great in theory, it rather strangles the project in practice. They&#039;re unable to move, they use now 2 frameworks instead of one and the team has to work with complexity squared.

Today we&#039;d like to share why it&#039;s a terrible choice and what upgrade strategy to take instead.
 ]]></summary>

            <updated>Mon, 03 Mar 2025 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Road to Hell is Paved with Strings ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/road-to-hell-is-paved-with-strings"/>
            <id>https://getrector.com/blog/road-to-hell-is-paved-with-strings</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ In [7 Traits of Successful Upgrade Companies](/blog/7-traits-of-successful-upgrade-companies), we wrote about the behavior patterns of companies that [make the impossible upgrade happen](/blog/success-story-of-automated-framework-migration-from-fuelphp-to-laravel-of-400k-lines-application).

Today we look closely at an **anti-pattern that repeats in every framework**, in every custom solution, and even in testing tools. A lot of CLI tools that should help us write better code also suffer from it. Frameworks are trying to get rid of it, but most drag mountain piles of history BC promise and so never do.

In this post, we&#039;ll look at spotting this anti-pattern, think about better ways to achieve the same result, and share our strategy to get rid of it in our projects.
 ]]></summary>

            <updated>Sun, 02 Mar 2025 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Evolution of New Rector Logo ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/evolution-of-new-rector-logo"/>
            <id>https://getrector.com/blog/evolution-of-new-rector-logo</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ After 7 years since the first Rector commit, we have a new logo!

Today, we&#039;re proud to share a streamlined, smooth, and modernized version of the Rector logo. Similar to a project upgrade, the final version looks great, but the journey is the destination. Did you know it took 40 commits, 5 sketched paper pages, and 3 months to get there?

Today, I&#039;d like to share the backstory with you.
 ]]></summary>

            <updated>Mon, 16 Dec 2024 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ 5 New Features in Rector 2.0 ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/5-new-features-in-rector-20"/>
            <id>https://getrector.com/blog/5-new-features-in-rector-20</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Rector 2 is out! We&#039;ve upgraded to PHPStan 2 and PHP-Parser 5. Based on testing on several huge legacy projects, Rector now runs **10-15&amp;nbsp;%** faster.

We&#039;ve also managed to fit in a couple of new features.
 ]]></summary>

            <updated>Thu, 12 Dec 2024 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Introducing Composer Version-Based Sets ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/introducing-composer-version-based-sets"/>
            <id>https://getrector.com/blog/introducing-composer-version-based-sets</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Packages that ship a lot of versions can have a lot of sets to apply. For, twig/twig has 6 sets in Rector, a couple for v1 and a couple for v2. What about v3? We must always check for our locally installed version and then keep `rector.php` up to date.

This could lead to errors as we run sets with new features from v3 that we don&#039;t have yet.
 ]]></summary>

            <updated>Wed, 13 Nov 2024 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Improving Rector Performance by 20-30 % ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/improving-rector-performance-by-20-30-percent"/>
            <id>https://getrector.com/blog/improving-rector-performance-by-20-30-percent</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Today I want to talk about how I added an optimization that made Rector 20-30% faster!
 ]]></summary>

            <updated>Wed, 11 Sep 2024 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Rector is joining the Open Source Pledge ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/rector-is-joining-open-source-pledge"/>
            <id>https://getrector.com/blog/rector-is-joining-open-source-pledge</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Our business is built on open-source and with open-source software. We&#039;re using &quot;free&quot; PHP language, &quot;free&quot; PHP frameworks, and &quot;free&quot; packages. But those are not free to develop and maintain.

That&#039;s why we&#039;re joining [Open Source Pledge](https://osspledge.com/). To put actual numbers on the table and commit to long-term support.
 ]]></summary>

            <updated>Mon, 09 Sep 2024 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ How to Migrate CodeIgniter to Symfony or Laravel ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/how-to-migrate-codeigniter-to-symfony-or-laravel"/>
            <id>https://getrector.com/blog/how-to-migrate-codeigniter-to-symfony-or-laravel</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ CodeIgniter was created in 2006 and was one of the first MVC PHP frameworks. Yet it never gained traction and got stuck.

Is your project running CodeIgniter, and do your developers want a change?

We receive a few client requests a year for CodeIgniter project upgrades, so we&#039;ll share a few tips on migrating it to Symfony/Laravel.
 ]]></summary>

            <updated>Mon, 19 Aug 2024 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Introducing Rule Finder ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/introducing-rule-finder"/>
            <id>https://getrector.com/blog/introducing-rule-finder</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ To this day, Rector provides **over 535 rules spread in 4 repositories** - core, PHPUnit, Symfony, and Doctrine. If you are looking for a rule that does a specific job, you&#039;d have to go through 4 markdown files, find it on a page, and hope to get it right. That is frustrating, especially when you look for a &quot;constant,&quot; but rules have &quot;const&quot; in their name.

We heard your feedback and worked on a **single place to search rules past couple of months**. We&#039;re proud to share the final page.
 ]]></summary>

            <updated>Mon, 24 Jun 2024 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Introducing Type Perfect for extra Safety ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/introducing-type-perfect-for-extra-safety"/>
            <id>https://getrector.com/blog/introducing-type-perfect-for-extra-safety</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ When dealing with legacy, we first focus on safety by knowing the important types. Code must have reliable type declarations to be refactored safely.

Over time, we&#039;ve been adding our custom rules to address PHPStan blind spots first. Today, we&#039;re proud to publish them in one solid package.
 ]]></summary>

            <updated>Tue, 04 Jun 2024 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ 5 Tricks to Write Better Custom Rules ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/5-tricks-to-write-better-custom-rules"/>
            <id>https://getrector.com/blog/5-tricks-to-write-better-custom-rules</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Rector and its [extensions](https://github.com/rectorphp/rector/?tab=readme-ov-file#empowered-by-community-heart) already consist of many rules for PHP and Framework upgrades, improving code quality and type coverage. However, you may have your own needs - that&#039;s when you need to write your own custom rules.

There is documentation for how to [write custom rules](https://getrector.com/documentation/custom-rule), but the following tricks can help you more.
 ]]></summary>

            <updated>Wed, 29 May 2024 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Migrate DateTime to Carbon ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/migrate-datetime-to-carbon"/>
            <id>https://getrector.com/blog/migrate-datetime-to-carbon</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Carbon is an excellent library for working with dates and times in PHP. It&#039;s being used [by Laravel](https://medium.com/@mhmmdtech/datetime-handling-in-laravel-by-carbon-39e032a15a15) as the default date-time library.

But it&#039;s not only syntax sugar wrapped around the `DateTime` class. It provides a reliable way to test your code that depends on exact dates and times.
 ]]></summary>

            <updated>Wed, 22 May 2024 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ 7 Traits of Successful Upgrade Companies ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/7-traits-of-successful-upgrade-companies"/>
            <id>https://getrector.com/blog/7-traits-of-successful-upgrade-companies</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ For the past 10 years, we&#039;ve been working with over 50 companies on legacy PHP upgrades. We&#039;ve already written about our approach and technical process of upgrades.

We&#039;ve met many companies we helped turn their projects from legacy projects that were hard to work with to code that is full of joy, safety, and smoothness.

Over time, we&#039;ve noticed that those companies&#039; traits often repeat and are shared with other similar companies. We&#039;d like to share these observations so you can mimic them for your company and make your upgrade project successful.
 ]]></summary>

            <updated>Wed, 15 May 2024 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Introducing Play with AST page ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/introducing-play-with-ast-page"/>
            <id>https://getrector.com/blog/introducing-play-with-ast-page</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Do you want to know what the AST structure from a PHP Source code? The getrector.com will help you with new interactive form.
 ]]></summary>

            <updated>Tue, 07 May 2024 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Upgrade Legacy Framework or Change it for Another ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/upgrade-legacy-framework-or-change-it-for-another"/>
            <id>https://getrector.com/blog/upgrade-legacy-framework-or-change-it-for-another</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Would you upgrade your Nokia 3310 to a newer Nokia or change it to an iPhone with USB-C? Would you upgrade your old Ford Fiesta to a newer Ford or change it to a Tesla Model 3? Would you upgrade your house&#039;s wooden windows for better wood or use plastic 3-layers?

If you use any PHP framework, it doesn&#039;t mean you have to stick with it for the end of your project life. The upgrade or change can be both valid options, depending on your project state, PHP community in your country or version.
 ]]></summary>

            <updated>Sat, 04 May 2024 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ How to Upgrade Zend Legacy Project ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/how-to-upgrade-zend-legacy-project"/>
            <id>https://getrector.com/blog/how-to-upgrade-zend-legacy-project</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Zend is the second most requested project upgrade in our client group and online forums. If you have no idea where to start, how should you approach the Zend upgrade? What criteria should you consider? What are the alternatives?
 ]]></summary>

            <updated>Thu, 02 May 2024 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ How to Upgrade Phalcon project ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/how-to-upgrace-phalcon-project"/>
            <id>https://getrector.com/blog/how-to-upgrace-phalcon-project</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Phalcon is a PHP framework that is written in C and is known for its speed. It was created in 2012 and it has own PHP-like language - Zephir. After CakePHP, this is the most requested framework to handle. We though we&#039;ll share your options if you want to upgrade your project running on Phalcon.
 ]]></summary>

            <updated>Thu, 15 Feb 2024 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Rector 1.0 is Here ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/rector-1-0-is-here"/>
            <id>https://getrector.com/blog/rector-1-0-is-here</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ The stable Rector version is here. It was about time and we&#039;ve done all planned changes by the end of 2023.
 ]]></summary>

            <updated>Thu, 08 Feb 2024 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ What to expect when you plan to Migrate Away from CakePHP 2 ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/what-to-expect-when-you-plan-to-migrate-away-from-cakephp-2"/>
            <id>https://getrector.com/blog/what-to-expect-when-you-plan-to-migrate-away-from-cakephp-2</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ What is the most requested project we get from our clients? PHP upgrade, Symfony upgrade, framework switch... yes, these belong to the most common ones. But one of the requests is far beyond the most requested one. From CakePHP 2 to Symfony/Laravel.
 ]]></summary>

            <updated>Mon, 05 Feb 2024 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Grab Fresh Book Release with Rector 1.0 ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/grab-fresh-book-release-with-rector-019"/>
            <id>https://getrector.com/blog/grab-fresh-book-release-with-rector-019</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ 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&#039;ve worked on this release back and forth past 3 weeks and we&#039;re excited to share it with you.
 ]]></summary>

            <updated>Tue, 30 Jan 2024 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Modernize Symfony Configs ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/modernize-symfony-configs"/>
            <id>https://getrector.com/blog/modernize-symfony-configs</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Symfony configuration is one of the changes that are difficult to spot until they&#039;re removed in the next major version. Then you must Google the &quot;invalid option id error message&quot; and hope for a solution. That doesn&#039;t sound like an excellent way to spend your weekend, does it?

Symfony actually adds a deprecation message to those options, but they&#039;re not easy to spot.

Today, we&#039;ll show you how to spot them with the help of Rector, PHPStan, and one other fantastic tool.
 ]]></summary>

            <updated>Mon, 22 Jan 2024 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ 5 Common Mistakes in Rector Config and How to Avoid Them ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/5-common-mistakes-in-rector-config-and-how-to-avoid-them"/>
            <id>https://getrector.com/blog/5-common-mistakes-in-rector-config-and-how-to-avoid-them</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Rector is becoming a standard tool to automate PHP/package upgrades and code quality improvements. Last month, we crossed 60 000 downloads a day.

Past 2 months, we&#039;ve also improved CPU and memory performance, making Rector a lighter version.

Yet, even fast and lightweight Rector can get stuck on simple config mistakes. We&#039;ll talk about the 5 most common ones and how to avoid them.
 ]]></summary>

            <updated>Mon, 04 Sep 2023 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Rector 0.17 - Using Scoped Traverse to Locate Specific Node ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/rector-017-using-scoped-traverse"/>
            <id>https://getrector.com/blog/rector-017-using-scoped-traverse</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Rector [no longer supports parent node lookup](/blog/rector-017-brings-more-robust-and-lighter-node-tree) since version 0.17. To look up a specific node, we&#039;ll have to traverse from parent to child node instead.

Here is how we can achieve it.
 ]]></summary>

            <updated>Sun, 27 Aug 2023 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Rector 0.18 - From Symfony Container to Laravel and How to Upgrade your Extensions ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/rector-018-from-symfony-container-to-laravel-and-how-to-upgrade-your-extensions"/>
            <id>https://getrector.com/blog/rector-018-from-symfony-container-to-laravel-and-how-to-upgrade-your-extensions</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Since the first Rector version, we used Symfony container to inject the services. It worked very well. The new PHP 8.0 came with attributes, and Symfony started to use them extensively.

We&#039;re downgrading Rector down to PHP 7.2, and this forced us to lock with unmaintained Symfony 6.1. We needed a hacky patch to make Rector config work...

This made us think: Is there a better way?
 ]]></summary>

            <updated>Thu, 24 Aug 2023 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Rector 0.18 - How we made tests Seven Times Faster ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/rector-018-how-we-made-tests-seven-times-faster"/>
            <id>https://getrector.com/blog/rector-018-how-we-made-tests-seven-times-faster</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ The developer experience is a priority when it comes to contributing tools, fixing bugs, and delivering merge requests fast. Rector 0.17 tests could **eat up enough memory to crash on 16 GB RAM and took 3-5 minutes to complete**.

 This was painful and lead developers to skip test run locally and wait for the CI.

 We wanted [fast feedback](https://tomasvotruba.com/blog/2020/01/13/why-is-first-instant-feedback-crucial-to-developers), so **everyone can enjoy fast feedback**. We worked hard past 2 months to make our tests faster than a sip of a good coffee.
 ]]></summary>

            <updated>Mon, 21 Aug 2023 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Rector 0.18 - Refocus on PHP ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/rector-018-refocus-on-php"/>
            <id>https://getrector.com/blog/rector-018-refocus-on-php</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Before going to Rector 1.0, we need to refocus solely on PHP files. In this release, we&#039;re leaving a not-so-well-known feature that could handle some changes in configs and templates.
 ]]></summary>

            <updated>Wed, 16 Aug 2023 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Rector 0.17 brings More Robust and Lighter Node Tree ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/rector-017-brings-more-robust-and-lighter-node-tree"/>
            <id>https://getrector.com/blog/rector-017-brings-more-robust-and-lighter-node-tree</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Rector has matured enough to start thinking about a stable version. This year, we want to release Rector 1.0. Before that happens, we want to ensure it is available to variety of users and the known splinters are removed.

One of them is **to lower memory consumption** - so Rector runs **faster on any laptop anywhere in the world**.
 ]]></summary>

            <updated>Mon, 14 Aug 2023 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Faster Rector on 0.15.22 ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/faster-rector-on-015"/>
            <id>https://getrector.com/blog/faster-rector-on-015</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Correctness has more priority than speed. Since version 0.14.x, Rector has better scope refresh handling for multiple rules and handle more crash that happen on 0.13.x. On 0.15.x, Rector give optimization a chance to raise.
 ]]></summary>

            <updated>Thu, 23 Mar 2023 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ New command to add Rector to your CI in seconds ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/new-setup-ci-command-to-let-rector-work-for-you"/>
            <id>https://getrector.com/blog/new-setup-ci-command-to-let-rector-work-for-you</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ We&#039;re working hard to make the developer experience as smooth as possible. The fewer steps to your first run and full automation with Rector, the better.

In February, we added improvement for the first run. Now we **add a new command to set up Rector in your CI to work for you**.
 ]]></summary>

            <updated>Fri, 03 Mar 2023 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ How to Upgrade to PHPUnit 10 in Diffs ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/how-to-upgrade-to-phpunit-10-in-diffs"/>
            <id>https://getrector.com/blog/how-to-upgrade-to-phpunit-10-in-diffs</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ PHPUnit 10 [was released today](https://phpunit.de/announcements/phpunit-10.html). Do you fancy an early upgrade?

We&#039;ll show you how to do it with Rector and what other changes you have to handle. Ready?
 ]]></summary>

            <updated>Fri, 03 Feb 2023 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ New in Rector 0.15: Complete Safe and Known Type Declarations ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/new-in-rector-015-complete-safe-and-known-type-declarations"/>
            <id>https://getrector.com/blog/new-in-rector-015-complete-safe-and-known-type-declarations</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Rector is helping with PHP upgrades and framework migrations. It also helps to [rise the type coverage](https://tomasvotruba.com/blog/how-to-measure-your-type-coverage/) of your project.
 ]]></summary>

            <updated>Sat, 10 Dec 2022 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Separating Laravel and CakePHP as Community Packages ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/separating-laravel-and-cakephp-as-community-packages"/>
            <id>https://getrector.com/blog/separating-laravel-and-cakephp-as-community-packages</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Rector is built for and on the whole PHP community right from the start. But there are also somewhat &quot;local&quot; PHP communities around a specific framework. Each framework has specific needs that are best known to the community member.

That&#039;s [why we entirely moved Typo3 and Nette](/blog/separating-typo3-and-nette-as-community-packages) Rector extensions **to their communities**. They know best how to handle rules for the framework.

We want to encourage the community to build their own packages on top of Rector core, so we also decided to move Laravel and CakePHP to the community.
 ]]></summary>

            <updated>Tue, 08 Nov 2022 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Support for Nested Doctrine Annotation to Flat Attributes in Rector 0.14 ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/support-for-nested-doctrine-annotation-to-flat-attributes-in-rector-014"/>
            <id>https://getrector.com/blog/support-for-nested-doctrine-annotation-to-flat-attributes-in-rector-014</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ We added support for [annotation to attribute upgrade](/blog/how-to-upgrade-annotations-to-attributes) in Rector 0.12. Since then, PHP 8.1 has come with nested attributes. Rector supports these, e.g., for Symfony validator.

Yet, Doctrine already took a path of its own and **unwrapped nested annotations to flat attributes** to be exclusively open to PHP 8.0 users.

Next Rector comes with support for these too.
 ]]></summary>

            <updated>Fri, 09 Sep 2022 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Tests Made Simpler in Rector 0.14 ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/tests-made-simpler-in-rector-014"/>
            <id>https://getrector.com/blog/tests-made-simpler-in-rector-014</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ In August, we&#039;ve been working hard to make Rector lighter. As use the count of users grows, developers use Rector on more legacy projects than before, and user experience b becomes a higher priority. The easy use, installation, and writing of custom rules is the key to the success of any project upgrade.

We cut down dependencies that it really does not need, removed a few niche features, and made the test case simpler.

You can benefit from this change if you&#039;re using Rector to write your custom rules and test those. What has changed and how?
 ]]></summary>

            <updated>Fri, 02 Sep 2022 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Interview: Legacy Code, Javascript Transpilers and Rector Challenges ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/interview-legacy-code-javascript-transpilers-and-rector-challenges"/>
            <id>https://getrector.com/blog/interview-legacy-code-javascript-transpilers-and-rector-challenges</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ I&#039;ll be speaking there in October at Paris on [Forum PHP 2022](https://event.afup.org/) about Rector.
I was asked for a simple interview to warmup the talk topic. The 3 questions - each looking at different angle, but going deep.

Contrary to mostly technical content on this blog, this post will give you behind the scenes insights on wider Rector vision.
 ]]></summary>

            <updated>Sat, 20 Aug 2022 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Separating Typo3 and Nette as Community Packages ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/separating-typo3-and-nette-as-community-packages"/>
            <id>https://getrector.com/blog/separating-typo3-and-nette-as-community-packages</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ When Rector started, it was a small project that handled upgrading a vast amount of PHP packages.

As the project grew and expanded, more local PHP communities joined with community packages that build custom rules on top Rector core.

It makes sense to separate these projects from the core and let the community handle them. Who does a better job at growing the vegetable than farmers themselves, right?
 ]]></summary>

            <updated>Fri, 05 Aug 2022 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ How to Automatically Add Return Type Declarations without Breaking Your Code ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/how-to-automatically-add-return-type-declarations-without-breaking-your-code"/>
            <id>https://getrector.com/blog/how-to-automatically-add-return-type-declarations-without-breaking-your-code</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Code filled with docblocks param, var, and return types is a gold mine. Not in the meaning of valuable resource, but rather as exploding metal covered with a thin piece of gold, so we grab it without thinking. While these docblocks give us much information about the code, they might be nothing more than a wish, dream, or promise.

Have you ever blindly trusted docblocks and switched them to type declarations? Then you know the explosive regression this move brings.

Yet, how can we turn to add strict types to our code without fear of breaking it?
 ]]></summary>

            <updated>Mon, 04 Jul 2022 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ New in Rector 0.13 - Refresh Scope for Changed Nodes ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/new-in-rector-013-refresh-scope-for-changed-nodes"/>
            <id>https://getrector.com/blog/new-in-rector-013-refresh-scope-for-changed-nodes</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Rector is using PHPStan to detect types of various expressions. That means every node has access to [PHPStan `Scope`](https://phpstan.org/developing-extensions/scope), e.g., with types or class reflection. From code `$value = 1;` we know, that `$value` is type of int. But what if we change the node?
 ]]></summary>

            <updated>Thu, 12 May 2022 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ New in Rector 0.12 - Introducing Rector Config with Autocomplete ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/new-in-rector-012-introducing-rector-config-with-autocomplete"/>
            <id>https://getrector.com/blog/new-in-rector-012-introducing-rector-config-with-autocomplete</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Rector is using Symfony container configuration to build the service model. While it brings automated autowiring, array autowiring, and native container features, the syntax to configure Rector has been complex and talkative.

The hard question is: how can we refactor from Symfony, have a custom Rector config class but keep using its features?
 ]]></summary>

            <updated>Tue, 26 Apr 2022 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Success Story of Automated Framework Migration from FuelPHP to Laravel of 400k+lines Application ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/success-story-of-automated-framework-migration-from-fuelphp-to-laravel-of-400k-lines-application"/>
            <id>https://getrector.com/blog/success-story-of-automated-framework-migration-from-fuelphp-to-laravel-of-400k-lines-application</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Today, I&#039;m very excited to talk about the full story of our successful automated framework migration how Rector saved our product by refactoring our 400k+lines PHP web application!
 ]]></summary>

            <updated>Mon, 07 Feb 2022 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ How to Migrate Legacy PHP Applications Without Stopping Development of New Features ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/how-to-migrate-legacy-php-applications-without-stopping-development-of-new-features"/>
            <id>https://getrector.com/blog/how-to-migrate-legacy-php-applications-without-stopping-development-of-new-features</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Migrating legacy PHP applications is always a challenging task.

Today I&#039;ll introduce one strategy to make these migrations easier by using the power of the Rector. With this strategy, we successfully migrated a legacy PHP application over a period of one year, **without stopping developing new features!**
 ]]></summary>

            <updated>Fri, 21 Jan 2022 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ New in Rector 0.12 - Much Simpler and Safer Rule Configuration ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/new-in-rector-012-much-simpler-and-safer-rule-configuration"/>
            <id>https://getrector.com/blog/new-in-rector-012-much-simpler-and-safer-rule-configuration</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Configurable rules are the most powerful building stone for instant upgrade sets. Do you want to upgrade from Symfony 5 to 6? You&#039;ll primarily deal with renamed classes, renamed methods, new default arguments in method, or renamed class constants.

In the end, we have to configure around 10 rules to get the most job done. That&#039;s why we focused on developer experience and added a new `configure()` method in Rector 0.12.
 ]]></summary>

            <updated>Fri, 07 Jan 2022 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ New in Rector 0.12 - The Latest PHP in a Single Import ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/new-in-rector-012-the-latest-php-in-a-single-import"/>
            <id>https://getrector.com/blog/new-in-rector-012-the-latest-php-in-a-single-import</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ The most used feature of Rector is to keep you updated with the latest PHP. PHP 8.1 was released almost a month ago, so many projects started to use Rector to upgrade to PHP 8.1. There is a new import in your `rector.php` with every new version.

Soon, your config is cluttered with a list of imports. How can we reduce this complexity to a single line? How can we handle your-favorite-framework upgrade in second?
 ]]></summary>

            <updated>Fri, 31 Dec 2021 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ How all Frameworks can Bump to PHP 8.1 and You can Keep Using Older PHP ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/how-all-frameworks-can-bump-to-php-81-and-you-can-use-older-php"/>
            <id>https://getrector.com/blog/how-all-frameworks-can-bump-to-php-81-and-you-can-use-older-php</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Imagine **hypothetical situation**: new major Symfony and Laravel are released in December 2021. We&#039;ll already have PHP 8.1 out by that time. There have been a lot of positive vibes about new PHP versions in the last year, so let&#039;s say the frameworks will take a brave leap forward.

[Symfony 6](https://symfony.com/releases/6.0) and [Laravel 9](https://blog.laravel.com/laravel-9-release-date) will require PHP 8.1 as a minimal version in their `composer.json`.

How would you react to such a move? What if you could keep using your current PHP version while using Symfony 6 or Laravel 9?
 ]]></summary>

            <updated>Mon, 18 Oct 2021 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ How to Upgrade Annotations to Attributes ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/how-to-upgrade-annotations-to-attributes"/>
            <id>https://getrector.com/blog/how-to-upgrade-annotations-to-attributes</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ We used `@annotations` in PHP 7.4 and below. Now we can use native `#[attributes]` in PHP 8. They have better support in PHPStan and Rector, thanks to their native language nature.

The Internet is full of questions [&quot;How can I use PHP 8 attributes instead of annotations in Doctrine?&quot;](https://stackoverflow.com/questions/66769981/how-can-i-use-php8-attributes-instead-of-annotations-in-doctrine) or [&quot;Converting Annotations to Attributes&quot;](https://www.reddit.com/r/symfony/comments/lbvmdx/converting_annotations_into_attributes/).

Do you want to know the answer? Rector has a simple solution for you.
 ]]></summary>

            <updated>Mon, 11 Oct 2021 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Dropping Docker in Favor of Composer Install for Better Developer Experience ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/dropping-docker-in-favor-of-composer-install-for-better-developer-experince"/>
            <id>https://getrector.com/blog/dropping-docker-in-favor-of-composer-install-for-better-developer-experince</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Some developers see Docker as default-to-use for Rector. Yet they struggle to run it successfully with fundamental changes like [renaming class from underscore to namespace](https://twitter.com/frankdejonge/status/1419298126133927941).

It&#039;s very frustrating for them, and they often end-up up deleting the tool with a bad feeling inside.

This cannot happen.
 ]]></summary>

            <updated>Mon, 09 Aug 2021 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ How to bump Minimal PHP Version without Leaving Anyone Behind ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/how-to-bump-minimal-version-without-leaving-anyone-behind"/>
            <id>https://getrector.com/blog/how-to-bump-minimal-version-without-leaving-anyone-behind</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Last week we introduced [Prefixed Rector by Default](/blog/prefixed-rector-by-default). The main advantage of this release is that you have a single package to install, with no conflicts and minimal PHP version.

Rector can be used on PHP 7.1+ platforms. Yet, we bumped a minimal version to PHP 8. Is that a BC break?
 ]]></summary>

            <updated>Mon, 10 May 2021 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Prefixed Rector by Default ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/prefixed-rector-by-default"/>
            <id>https://getrector.com/blog/prefixed-rector-by-default</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Today we&#039;re introducing a big step up in making Rector developer experience more smooth and intuitive. It will also ease development for Rector contributors. We won&#039;t have to think about dependencies in `composer.json` anymore.

Are these goals in contradiction? Quite the contrary.
 ]]></summary>

            <updated>Mon, 03 May 2021 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ From Doctrine Annotations Parser to Static Reflection ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/from-doctrine-annotations-parser-to-static-reflection"/>
            <id>https://getrector.com/blog/from-doctrine-annotations-parser-to-static-reflection</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Until recently, we used doctrine/annotations to parse class annotations that you know `@ORM\Entity` or `@Route`. Last 2 weeks, we **rewrote this parser from scratch to our custom solution** to improve spaces, constants and use static reflection.

During refactoring, the parser got **reduced from 6700 lines to just 2700**.

What we changed, why, and how can we benefit from a static reflection in annotations?
 ]]></summary>

            <updated>Mon, 05 Apr 2021 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Rector 0.10 Released - with PHP 7.1 Support ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/rector-010-released-with-php71-support"/>
            <id>https://getrector.com/blog/rector-010-released-with-php71-support</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Today we&#039;re releasing Rector that brings the most significant improvement for usability yet. It took 2 months of hard work of our team and Rector community, but we&#039;re  here.

What is new, and what makes your life easier?
 ]]></summary>

            <updated>Mon, 22 Mar 2021 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Legacy Refactoring made Easy with Static Reflection ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/legacy-refactoring-made-easy-with-static-reflection"/>
            <id>https://getrector.com/blog/legacy-refactoring-made-easy-with-static-reflection</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Properly configured class autoloading have been a big ~~requirement~~ problem for many projects that do not use flawless PSR-4 autoload. It took two months of hard work of our team and Rector community, but we&#039;re here.

What is a static reflection, and how can you use it?
 ]]></summary>

            <updated>Mon, 15 Mar 2021 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ How much does Single Type Declaration Know ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/how-much-does-single-type-declaration-know"/>
            <id>https://getrector.com/blog/how-much-does-single-type-declaration-know</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ When it comes to completing type declaration from docblocks, we rely on trust and hopes in commented code. One way out of is [dynamic analysis](https://tomasvotruba.com/blog/2019/11/11/from-0-doc-types-to-full-type-declaration-with-dynamic-analysis/) that works with real data that enter the method. But we have to log it, wait for it, and update our codebase based on logged data.

**Is there a faster, simpler solution we can just plugin?**
 ]]></summary>

            <updated>Mon, 15 Feb 2021 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ How to Instantly Decouple Symfony Doctrine Repository Inheritance to Clean Composition ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/how-to-instantly-decouple-symfony-doctrine-repository-inheritance-to-clean-composition"/>
            <id>https://getrector.com/blog/how-to-instantly-decouple-symfony-doctrine-repository-inheritance-to-clean-composition</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Do your Doctrine repositories extend a parent Symfony service? Do you use magic methods of parent `Doctrine\ORM\EntityRepository`?
Would you like **switch to decoupled service design and use composition over inheritance**?

If you&#039;re looking for &quot;why&quot;, read [How to use Repository with Doctrine as Service in Symfony](https://tomasvotruba.com/blog/2017/10/16/how-to-use-repository-with-doctrine-as-service-in-symfony/).

**If you know why and look for &quot;how&quot;, keep reading this post.**
 ]]></summary>

            <updated>Mon, 08 Feb 2021 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ How to Instantly Refactor Symfony Action Injects to Constructor Injection ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/how-to-instantly-refactor-symfony-action-injects-to-constructor-injection"/>
            <id>https://getrector.com/blog/how-to-instantly-refactor-symfony-action-injects-to-constructor-injection</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Action Injections are much fun a first, but they turn your fresh project into legacy code very fast. With PHP 8 and promoted properties, there is no reason to pollute method arguments with services.

How to **refactor out of the legacy back to constructor injection** today?
 ]]></summary>

            <updated>Mon, 01 Feb 2021 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Smooth Upgrade to Nette 3.1 in Diffs ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/smooth-upgrade-to-nette-31-in-diffs"/>
            <id>https://getrector.com/blog/smooth-upgrade-to-nette-31-in-diffs</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Nette 3.1 was released almost a month ago. Packages using it had enough time to give support to small BC breaks and now it&#039;s ready to run on your project.
Let&#039;s look at what has changed and how to upgrade today.
 ]]></summary>

            <updated>Mon, 18 Jan 2021 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Switch Symfony String Route Names to Constants ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/switch-symfony-string-route-names-to-constants"/>
            <id>https://getrector.com/blog/switch-symfony-string-route-names-to-constants</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Last December, we started to use PHP 8.0 and Symfony 5.2. This exact combination opens [many cool tricks](https://tomasvotruba.com/blog/2020/12/21/5-new-combos-opened-by-symfony-52-and-php-80/) we could never use before.
One of those tricks is using constants for route name in `#[Route]` attribute.
 ]]></summary>

            <updated>Mon, 11 Jan 2021 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ 7 Valuable Lessons We Learned from our Clients in 2020 ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/7-valuable-lessons-we-learned-from-our-clients-in-2020"/>
            <id>https://getrector.com/blog/7-valuable-lessons-we-learned-from-our-clients-in-2020</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ 2020 was a big year for us. We had 4 large projects with only tests in CI. Adding ECS with 10 basic sets, PHPStan to level 8, PSR-4 to all classes. In the end, we successfully upgraded Nette 2.2 to 3.0, Symfony 2.7 to 3.4 and Laravel 5.5 to 5.8, to Symfony, and from PHP 5.6 to 7.4. Oh, we also migrated Phalcon to Symfony.

**The secret of a successful migration is speed and fast merges**. During these 8 months of intense work, sometimes even 200 hours a month, **we failed a lot**. We try to learn from our mistakes.

Today we want to share what we&#039;ve learned from our clients in 2020.
 ]]></summary>

            <updated>Mon, 04 Jan 2021 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Rector 0.9 Released ❄️ ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/rector-09-released"/>
            <id>https://getrector.com/blog/rector-09-released</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ More than 45 days have passed since the last Rector release. Since then, we pushed 292 commits in over 220 pull-requests. No wonder the most common question in issues was &quot;when will the next Rector be released?&quot;.

Today, we&#039;re proud to finally **tag and launch Rector 0.9**!
 ]]></summary>

            <updated>Mon, 28 Dec 2020 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ 4 Configurable PHPStan rules that Help Rector Merge 188 pull-requests a Month ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/4-configurable-phpstan-rules-that-help-rector-merge-188-pull-request-a-month"/>
            <id>https://getrector.com/blog/4-configurable-phpstan-rules-that-help-rector-merge-188-pull-request-a-month</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Last month, we merged a total [188 pull-requests](https://github.com/rectorphp/rector/pulse/monthly) to Rector code. We could not afford such a high rate without having a robust CI setup we trust. Dozens of custom PHPStan rules help us on every commit.

Today we&#039;ll share with you 4 of them. You can use them in your code to **save time** and let robots work for you.
 ]]></summary>

            <updated>Mon, 14 Dec 2020 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Laravel Facades to Constructor Injection: Replace Facade Aliases with Full Classes in 2 hours ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/laravel-facades-to-constructor-injection-replace-facade-aliases-with-full-classes-in-2-hours"/>
            <id>https://getrector.com/blog/laravel-facades-to-constructor-injection-replace-facade-aliases-with-full-classes-in-2-hours</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Laravel facades are known as [static service locators](https://sergeyzhuk.me/2016/05/27/laravel-facades/). The idea is get any service anywhere, which comes very handy for project bootstrapping.

Around Laravel 6, released in March 2019, the Laravel community [started](https://stackoverflow.com/questions/49138428/avoid-laravel-facade-on-controller) [moving away](https://github.com/laravel/ideas/issues/1508) [from](https://programmingarehard.com/2014/01/11/stop-using-facades.html/) [facades](https://www.freecodecamp.org/news/moving-away-from-magic-or-why-i-dont-want-to-use-laravel-anymore-2ce098c979bd/#facades) towards **clearly typed constructor injection**.

Today we&#039;ll take 1st step to make it happen.
 ]]></summary>

            <updated>Mon, 07 Dec 2020 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Smooth Upgrade to PHP 8 in Diffs ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/smooth-upgrade-to-php-8-in-diffs"/>
            <id>https://getrector.com/blog/smooth-upgrade-to-php-8-in-diffs</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ PHP 8 was released more than 2 weeks ago. Do you want to know what is new? Check [colorful post series about PHP 8 news](https://stitcher.io/blog/new-in-php-8) by Brent.

Do you want to upgrade your project today? Continue reading...
 ]]></summary>

            <updated>Mon, 30 Nov 2020 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ How to make Rector Contribute Your Pull Requests Every Day ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/how-to-make-rector-contribute-your-pull-requests-every-day"/>
            <id>https://getrector.com/blog/how-to-make-rector-contribute-your-pull-requests-every-day</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Rector can upgrade legacy code to a modern one. But in reality, that&#039;s ~5 % of usage. On the other hand, **more than [300 projects](https://packagist.org/packages/rector/rector/dependents?order_by=downloads) use Rector daily**, on every commit in Github Actions, Travis, and Gitlab CI.

And that&#039;s only open-source projects. The number of private projects using Rector would be much higher.
 ]]></summary>

            <updated>Mon, 05 Oct 2020 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ How to Inline Value Object in Symfony PHP Config ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/how-to-inline-value-object-in-symfony-php-config"/>
            <id>https://getrector.com/blog/how-to-inline-value-object-in-symfony-php-config</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Rector uses [PHP Symfony configs](/blog/2020/08/31/rector-is-moving-from-yaml-to-php-configs-what-changes-and-how-to-get-ready) for [many good reasons](https://tomasvotruba.com/blog/2020/07/16/10-cool-features-you-get-after-switching-from-yaml-to-php-configs/).

One of them is the possibility to have control over complex configurations with value objects.
Would you like such features in your configs too? Unfortunately, Symfony does not support it out of the box.

What can we do about it?
 ]]></summary>

            <updated>Mon, 07 Sep 2020 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Rector is Moving From YAML to PHP Configs - What Changes and How to Get Ready ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/rector-is-moving-from-yaml-to-php-configs-what-changes-and-how-to-get-ready"/>
            <id>https://getrector.com/blog/rector-is-moving-from-yaml-to-php-configs-what-changes-and-how-to-get-ready</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ In July 2020, we started to move from the configuration in YAML to one defined in PHP.
The YAML configuration **is now deleted in Rector core** and won&#039;t be supported next 0.8 release.

What benefits PHP brings, how the rule configuration changes, and **how to prepare yourself**?
 ]]></summary>

            <updated>Mon, 31 Aug 2020 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ How to Migrate From PHPExcel to PHPSpreadsheet with Rector in 30 minutes ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/how-to-migrate-from-phpexcel-to-phpspreadsheet-with-rector-in-30-minutes"/>
            <id>https://getrector.com/blog/how-to-migrate-from-phpexcel-to-phpspreadsheet-with-rector-in-30-minutes</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ [PHPExcel](https://github.com/PHPOffice/PHPExcel) is a package for working with Excel files in PHP. The last version was released in 2015, and it was **deprecated in 2017**. Still, it has over **27 000 daily downloads** - that&#039;s tons of legacy code.

Do you use it too? Do you want to switch to [PHPSpreadsheet](https://github.com/PHPOffice/PhpSpreadsheet)? You can do it today.
 ]]></summary>

            <updated>Thu, 16 Apr 2020 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ Upgrading Glami to PSR-4, part 1: What and why ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/upgrading-glami-to-psr-4-what-why-how"/>
            <id>https://getrector.com/blog/upgrading-glami-to-psr-4-what-why-how</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ In April 2019 we upgraded [Glami](https://glami.cz)&#039;s big codebase to follow PSR-4.

**It was a great success! In this part, we will go through what PSR-4 is and it&#039;s benefits.**
 ]]></summary>

            <updated>Tue, 10 Mar 2020 00:00:00 +0000</updated>
        </entry>
            <entry>
            <title>
                <![CDATA[ How to install Rector despite Composer Conflicts ]]>
            </title>
            <link rel="alternate" href="https://getrector.com/blog/how-to-install-rector-despite-composer-conflicts"/>
            <id>https://getrector.com/blog/how-to-install-rector-despite-composer-conflicts</id>

            <author>
                <name>
                    <![CDATA[ Tomas Votruba ]]>
                </name>
            </author>

            <summary><![CDATA[ Rector is a composer package. If you install it, it has to meet install requirements conditions.

**But how can you [upgrade your Symfony 2.8](https://www.tomasvotruba.com/blog/2019/02/28/how-to-upgrade-symfony-2-8-to-3-4/), when Rector needs at least Symfony 4.4?**
 ]]></summary>

            <updated>Mon, 20 Jan 2020 00:00:00 +0000</updated>
        </entry>
    </feed>
