This project is not covered by Drupal’s security advisory policy.

Rector can save you a lot of manual work by automating code upgrades to Drupal 9, 10 and 11.

You can start using it now!

Latest Release

The latest release is 0.18.x, which supports both Drupal 8, 9 and deprecations and begins support for 10.1+ deprecations.

Release notes

  • The 0.18.0 and higher releases of drupal-rector will include Rector 0.18+. The upgrade path should be as simple as re-copying the configuration file. cp vendor/palantirnet/drupal-rector/rector.php.
  • The 0.13.0 and higher releases of drupal-rector include Rector 0.13.8+, which alterd the configuration syntax. The upgrade path should be as simple as re-copying the configuration file. cp vendor/palantirnet/drupal-rector/rector.php

Using drupal-rector

Introduction - blog/jumpstart-your-drupal-9-upgrade-drupal-rector

Limitations

Known limitations are listed in the comment documentation for each rule.

Common limitations include:

  • Using static calls like \Drupal->service('my_service')->myMethod(); rather than injecting the service into the class
  • Skipping complex use cases, such as when optional arguments are passed as variables
  • Handling use statements in weird ways. Rector has a global option to handle use statements and we think the benefits outweigh the drawbacks such as weird placement or lack of handling of less common patterns.
  • Handling doc comments in weird ways, particularly around spacing. Rector uses dependencies that sometimes delete empty comments or remove white space. At this point, Drupal Rector does not intend to modify any doc comments, but Rector ends up doing this.

Our hope is that as we learn more about Rector, we may be able to update these rules to add these features.

Supporting organizations: 
Proof of Concept
Active development and release management
Active development and project management
Active development and project management

Project information

  • Module categories: Developer Tools
  • Created by shaal on , updated
  • shield alertThis project is not covered by the security advisory policy.
    Use at your own risk! It may have publicly disclosed vulnerabilities.

Releases