PHPackages                             mxr576/rector-drupal-configurator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mxr576/rector-drupal-configurator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mxr576/rector-drupal-configurator
=================================

Configures Rector to understand a Drupal 8+ codebase.

0.2.0(3y ago)0428MITPHPPHP ^7.4.0 || ~8.0.0 || ~8.1.0

Since Jan 12Pushed 3y ago1 watchersCompare

[ Source](https://github.com/mxr576/rector-drupal-configurator)[ Packagist](https://packagist.org/packages/mxr576/rector-drupal-configurator)[ RSS](/packages/mxr576-rector-drupal-configurator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (3)Used By (0)

Rector Drupal Configurator
==========================

[](#rector-drupal-configurator)

Provides utility for configuring [Rector](https://getrector.org) to understand a Drupal 8+ codebase.

### Usage

[](#usage)

```
$ composer require mxr576/rector-drupal-configurator
$ ./vendor/bin/rector init

```

and call

```
    $drc = new \mxr576\RectorDrupalConfigurator\RectorDrupalConfigurator();
    $drc->configure($rectorConfig);
```

at the beginning of the generated function in `rector.php`. See [example.rector.php](example.rector.php).

### What is a difference between this library and `palantirnet/drupal-rector`?

[](#what-is-a-difference-between-this-library-and-palantirnetdrupal-rector)

[palantirnet/drupal-rector](https://github.com/palantirnet/drupal-rector) not just configures Rector to understand a Drupal 8+ codebase but also includes (only) Drupal specific Rector rules in the `rector.php` that it provides. This library decouples the "Drupal configuration" part and (only) provides a standalone solution that configures Rector to understand a Drupal 8+ codebase in *any `rector.php`*. What other Rector configurations (e.g.: rules) you enable in that rector.php it is up to you. See [example.rector.php](example.rector.php). In addition, this solution uses Matt Glaman's awesome [mglaman/drupal-static-autoloader](https://github.com/mglaman/drupal-static-autoloader)to cast all magic that is needed to autoload every necessary Drupal files.

### TODOs

[](#todos)

- Add test coverage
- Add code-quality checks and linters

### Credits

[](#credits)

- Thanks [Pronovix](https://pronovix.com) for sponsoring the initial development
- Kudos to all developers that this small library depends on

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~168 days

Total

2

Last Release

1410d ago

PHP version history (2 changes)0.1.0PHP ^7.4.0 || ~8.0.0

0.2.0PHP ^7.4.0 || ~8.0.0 || ~8.1.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/a39930748464d7f7a251984080a21ce132f6ae9b0d086b392eb22ee6aeba4278?d=identicon)[mxr576](/maintainers/mxr576)

---

Top Contributors

[![mxr576](https://avatars.githubusercontent.com/u/1755573?v=4)](https://github.com/mxr576 "mxr576 (4 commits)")

---

Tags

drupalrector

### Embed Badge

![Health badge](/badges/mxr576-rector-drupal-configurator/health.svg)

```
[![Health](https://phpackages.com/badges/mxr576-rector-drupal-configurator/health.svg)](https://phpackages.com/packages/mxr576-rector-drupal-configurator)
```

###  Alternatives

[palantirnet/drupal-rector

Instant fixes for your Drupal code by using Rector.

1544.2M20](/packages/palantirnet-drupal-rector)[lullabot/amp

A set of useful classes and utilities to convert html to AMP html (See https://www.ampproject.org/)

3802.9M10](/packages/lullabot-amp)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5341.9M441](/packages/drupal-core-composer-scaffold)[drupal/core-project-message

Adds a message after Composer installation.

2122.6M172](/packages/drupal-core-project-message)[acquia/drupal-recommended-settings

The composer plugin for adding drupal-recommended-settings for Acquia Cloud.

101.1M4](/packages/acquia-drupal-recommended-settings)[pantheon-systems/pantheon_domain_masking

Domain masking middleware for Drupal

12285.9k](/packages/pantheon-systems-pantheon-domain-masking)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
