Problem/Motivation

When people include rector with composer sets into their install, it seems it sometimes breaks Drupal. One example of that found here with symfony event handlers: https://github.com/palantirnet/drupal-rector/issues/446

I wonder if running it on Core will expose these issues, so in this issue i will test if this is the case.

Steps to reproduce

Run a single set on Drupal core and make a PR for that. See if we stay green. Will probably want:

drupal
symfony
twig
phpunit

All seperate so we can see what might bring issues.

This might also show places where we are outside the standard of the projects, but dunno if that is true :)

I will use LLM's to prepare the MR's, although it might end up being a script.

Proposed resolution

I created four test MRs, one per Rector composer-based set, all run against core with Rector 2.8.4 and palantirnet/drupal-rector 1.2.0:

- drupal: !17812. No changes: core has already removed the deprecations, and drupal-rector skips its version-bound rules because core reports `drupal/core` as `dev-main`.
- symfony: !17813, 106 files. Includes `EventSubscriberToAttributeRector`, the rule from https://github.com/palantirnet/drupal-rector/issues/446.
- twig: !17814, 1 file.
- phpunit: !17815, 128 files.

Each MR has one commit per Rector rule, and each commit message lists the files that rule changed. When a test fails, the Commits tab shows which rule caused it. The last commit on each branch adds the full Rector dry-run output as JSON.

To rebuild the branches on a newer main, use the script on the `3638148-rector-tooling` branch:

```
git remote add drupal-3638148 git@git.drupal.org:issue/drupal-3638148.git
git fetch origin
git fetch drupal-3638148 3638148-rector-tooling
TOOLING_REF=drupal-3638148/3638148-rector-tooling \
bash <(git show drupal-3638148/3638148-rector-tooling:rector-3638148/update.sh)
```

DDEV users prefix that with `RUN="ddev exec"`. Pass set names as arguments to only rebuild those. The script never pushes; afterwards push each branch with `git push --force-with-lease drupal-3638148 3638148-rector-`. See `rector-3638148/README.md` on the tooling branch for details.

Remaining tasks

n.a.

User interface changes

n.a.

Introduced terminology

n.a.

API changes

n.a.

Data model changes

n.a.

Release notes snippet

n.a.

Issue fork drupal-3638148

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

bbrala created an issue. See original summary.

bbrala’s picture

Issue summary: View changes