Skip to content

Commit

Permalink
Merge pull request #57 from pluswerk/feature/dev-main-typo3
Browse files Browse the repository at this point in the history
  • Loading branch information
Kanti authored Mar 23, 2023
2 parents 7e57f61 + 7e0ba5f commit 0174a30
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/RectorSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public static function setsTypo3(bool $entirety = false): array
$setList = $entirety ? Typo3LevelSetList::UP_TO_TYPO3_11 : Typo3SetList::TYPO3_11;
break;
case 12:
case 'dev-main':
$setList = $entirety ? Typo3LevelSetList::UP_TO_TYPO3_12 : Typo3SetList::TYPO3_12;
break;
}
Expand Down
6 changes: 5 additions & 1 deletion src/VersionUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ private static function getMinimalVersion(string $packageName): ?string
}

$parser = new VersionParser();
$lowestVersion = $parser->parseConstraints($versionConstrain)->getLowerBound()->getVersion();
$constraint = $parser->parseConstraints($versionConstrain);
$lowestVersion = $constraint->getLowerBound()->getVersion();
if ($lowestVersion === '0.0.0.0-dev') {
return explode('#', $parser->normalize($versionConstrain), 2)[0];
}
if (!preg_match('#(?<major>\d+)\.(?<minor>\d+)\..*#', $lowestVersion, $matches)) {
return null;
}
Expand Down

0 comments on commit 0174a30

Please sign in to comment.