Skip to content

Commit

Permalink
Stop core default as MASTER when no PHPversion (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekCrannaford authored May 17, 2023
1 parent 1ca206e commit ec32575
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cmfive.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,19 @@ function sketchComposerForCore($reference, $phpVersion)
if (PHP_MAJOR_VERSION === 7 && PHP_MINOR_VERSION === 0) {
$reference = "legacy/PHP7.0";
$phpVersion = "7.0";
} else {
$reference = "master";
}
if (PHP_MAJOR_VERSION === 7 && PHP_MINOR_VERSION === 4) {
$reference = "legacy/PHP7.4";
$phpVersion = "7.4";
}
if (is_null($reference) || is_null($phpVersion)) {
$reference = is_null($reference) ? "master" : $reference;
$phpVersion = is_null($phpVersion) ? (PHP_MAJOR_VERSION .".". PHP_MINOR_VERSION) : $phpVersion;
}
}

echo ("Composer has ref's as " . $reference . " & " . $phpVersion . ".\n");

$composer_string = <<<COMPOSER
{
"name": "2pisoftware/cmfive-boilerplate",
Expand Down

0 comments on commit ec32575

Please sign in to comment.