Skip to content
Discussion options

You must be logged in to vote

You can add if else based on environment, eg: on github vs local in rector.php so the set php version will adapt based on target php version.

$rectorConfig = RectorConfig::configure()
    ->withPaths([
        __DIR__ . '/tests',
    ])
    ->withSets([
        PHPUnitSetList::PHPUNIT_80,
    ]);

if (getenv("some_env")) {
    $rectorConfig = $rectorConfig->withPhpVersion(80000);
}

return $rectorConfig;

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by samsonasik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants