Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rectorphp/rector-phpunit
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: rectorphp/rector-phpunit
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: migrate-version-sets-to-composer-based
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 3 commits
  • 30 files changed
  • 1 contributor

Commits on Aug 5, 2026

  1. [Sets] Drop the PHPUnit 12.0, 12.5 and 13.0 triggered sets covered by…

    … composer-based
    
    Every rule these three sets registered is already in composer-based.php, bound to the exact phpunit/phpunit version it needs:
    
    - 12.0: RemoveOverrideFinalConstructTestCaseRector (>=12.0.3), plus the mock-to-stub set and composer-based set it imports
    - 12.5: the three AllowMockObjects rules (>=12.5.2)
    - 13.0: the expectExceptionMessage() to expectExceptionMessageIsOrContains() rename (>=13.2)
    
    The bond is also more accurate than the set trigger was: a 13.0 or 13.1 project no longer gets the rename of a method that only exists from 13.2, and the same for 12.0 versus 12.0.3 and 12.5 versus 12.5.2.
    
    The set files stay reachable through the PHPUnitSetList constants.
    TomasVotruba committed Aug 5, 2026
    Configuration menu
    Copy the full SHA
    2e239be View commit details
    Browse the repository at this point in the history
  2. [Sets] Move every per-version rule into the composer-based set

    Each rule now declares the phpunit/phpunit version its target API is available from, so it can be registered once in composer-based.php instead of in a set that only fires on one major version. A project upgrading from PHPUnit 6 to 12 gets all of them in a single run.
    
    21 rules gained a ComposerPackageConstraintInterface bond and the configured rules moved over with ruleWithConfigurationComposerVersionBound. With nothing left to trigger, PHPUnitSetProvider registers the composer-based set as a plain set, and no ComposerTriggeredSet remains.
    
    Two rules target APIs that PHPUnit 10 removed, so they carry an upper bound and their tests read the version from a stub composer.json.
    
    The per-version set files stay reachable through the PHPUnitSetList constants.
    TomasVotruba committed Aug 5, 2026
    Configuration menu
    Copy the full SHA
    e2b50b9 View commit details
    Browse the repository at this point in the history
  3. [Sets] Remove PHPUnitSetProvider

    With every rule moved to the composer-based set, the provider only listed three plain sets that the PHPUnitSetList constants already expose. The missing PHPUNIT_125 constant is added, so every set file stays referenceable.
    
    rectorphp/rector-src#8295 drops the matching instantiation.
    TomasVotruba committed Aug 5, 2026
    Configuration menu
    Copy the full SHA
    4c6c10e View commit details
    Browse the repository at this point in the history
Loading