From b30c33b8925ad3f9b024975f3981003617d6b73b Mon Sep 17 00:00:00 2001 From: kulcsarbalazs Date: Sun, 21 Aug 2022 09:51:54 +0200 Subject: [PATCH] (fix) Jetstream or Breeze verison checking --- src/Commands/InstallTallForms.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Commands/InstallTallForms.php b/src/Commands/InstallTallForms.php index 63c46c6..2dc9ccf 100644 --- a/src/Commands/InstallTallForms.php +++ b/src/Commands/InstallTallForms.php @@ -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; @@ -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;