Skip to content

Add Rector 2.6 dev tooling and empty rector.php for PHP 8.2. - #1981

Open
shadyvb wants to merge 1 commit into
ticket/XWPENG-46-php-minimumfrom
ticket/XWPENG-47-rector-config
Open

Add Rector 2.6 dev tooling and empty rector.php for PHP 8.2.#1981
shadyvb wants to merge 1 commit into
ticket/XWPENG-46-php-minimumfrom
ticket/XWPENG-47-rector-config

Conversation

@shadyvb

@shadyvb shadyvb commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Fixes XWPENG-47.

Base branch: ticket/XWPENG-46-php-minimum (#1978). Config-only PR β€” first in the XWPENG-47 Rector modernization stack. Adds Rector 2.6 as a dev dependency and an empty rector.php scaffold so follow-on stacked PRs (#1982–#1986) can register rules and apply transformations incrementally. No plugin source changes in this PR.

Summary

  • composer.json β€” adds rector/rector ^2.6 to require-dev and on-demand scripts:
    • composer lint-rector β€” rector process --dry-run
    • composer rector β€” rector process
  • composer.lock β€” locks Rector 2.6.5 (and its PHPStan dependency).
  • rector.php β€” PHP 8.2 baseline config with scan paths for plugin source (stream.php, abilities/, alerts/, classes/, connectors/, exporters/, includes/), standard skip dirs, cache under artifacts/rector, and no rules registered yet (withRules( array() )). Sub-PRs append rules as they land.
  • phpcs.xml.dist β€” excludes artifacts/ so Rector cache is not scanned.

Stacked follow-on PRs (same ticket)

PR Branch Applies
#1982 ticket/XWPENG-47-typed-props-classes Typed properties in classes/
#1983 ticket/XWPENG-47-typed-props-connectors Connector family typing
#1984 ticket/XWPENG-47-typed-props-alerts Alert/Exporter typing
#1985 ticket/XWPENG-47-constructor-promotion Constructor property promotion
#1986 ticket/XWPENG-47-match switch β†’ match

Test plan

  • composer validate passes
  • CI Lint/Test and E2E pass on PHP 8.2, 8.3, and 8.4 (no runtime behavior change)
  • Reviewer: composer install && composer lint-rector exits 0 with no pending diffs
  • Reviewer: confirm artifacts/rector is gitignored / PHPCS-excluded

Checklist

  • Project documentation has been updated to reflect the changes in this pull request, if applicable.
  • I have tested the changes in the local development environment (see contributing.md).
  • I have added phpunit tests.

Release Changelog

  • Fix: N/A β€” dev tooling only, no user-facing change.
  • New: N/A.

Release Checklist

  • This pull request is to the master branch.
  • Release version follows semantic versioning. Does it include breaking changes?
  • Update changelog in readme.txt.
  • Bump version in stream.php.
  • Bump Stable tag in readme.txt.
  • Bump version in classes/class-plugin.php.
  • Draft a release on GitHub.

Change [ ] to [x] to mark the items as done.

@shadyvb
shadyvb marked this pull request as ready for review September 2, 2026 09:55
Config-only: require-dev pin, on-demand composer scripts, cache under artifacts/,
PHPCS exclude for cache dir. No plugin source changes.
@shadyvb
shadyvb force-pushed the ticket/XWPENG-47-rector-config branch from 67cceb2 to 2c0932e Compare September 2, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant