Skip to content

Commit

Permalink
(fix) Jetstream or Breeze verison checking
Browse files Browse the repository at this point in the history
  • Loading branch information
kulcsarbalazs authored Aug 21, 2022
1 parent 1ba08f3 commit b30c33b
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 b30c33b

Please sign in to comment.