Skip to content

Commit

Permalink
Merge pull request #119 from kulcsarbalazs/patch-1
Browse files Browse the repository at this point in the history
(fix) Jetstream or Breeze verison checking
  • Loading branch information
tanthammar authored Aug 22, 2022
2 parents 1ba08f3 + b30c33b commit 02915ad
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Commands/InstallTallForms.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ private function setEnvironment(): void
//Jetstream or Breeze
try {
$v = \Composer\InstalledVersions::getVersion('laravel/jetstream');
$this->jetstream = $v == 'dev-master' || $v >= "2.3";
$version = collect(explode('.', $v))->slice(0, 2)->toArray();
$this->jetstream = $v == 'dev-master' || ($version[0] >= 2 && $version[1] >= 3);
if(filled($v) && !$this->jetstream) {
$this->info('ABORTING: This installer only supports Jetstream >= v2.3');
exit;
Expand All @@ -179,7 +180,8 @@ private function setEnvironment(): void
}
try {
$v = \Composer\InstalledVersions::getVersion('laravel/breeze');
$this->breeze = $v == 'dev-master' || $v >= "1.1";
$version = collect(explode('.', $v))->slice(0, 2)->toArray();
$this->breeze = $v == 'dev-master' || ($version[0] >= 1 && $version[1] >= 1);
if(filled($v) && !$this->breeze) {
$this->info('ABORTING: This installer only supports Breeze >= v1.1');
exit;
Expand Down

0 comments on commit 02915ad

Please sign in to comment.