Skip to content

Commit 02915ad

Browse files
authored
Merge pull request #119 from kulcsarbalazs/patch-1
(fix) Jetstream or Breeze verison checking
2 parents 1ba08f3 + b30c33b commit 02915ad

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Commands/InstallTallForms.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ private function setEnvironment(): void
169169
//Jetstream or Breeze
170170
try {
171171
$v = \Composer\InstalledVersions::getVersion('laravel/jetstream');
172-
$this->jetstream = $v == 'dev-master' || $v >= "2.3";
172+
$version = collect(explode('.', $v))->slice(0, 2)->toArray();
173+
$this->jetstream = $v == 'dev-master' || ($version[0] >= 2 && $version[1] >= 3);
173174
if(filled($v) && !$this->jetstream) {
174175
$this->info('ABORTING: This installer only supports Jetstream >= v2.3');
175176
exit;
@@ -179,7 +180,8 @@ private function setEnvironment(): void
179180
}
180181
try {
181182
$v = \Composer\InstalledVersions::getVersion('laravel/breeze');
182-
$this->breeze = $v == 'dev-master' || $v >= "1.1";
183+
$version = collect(explode('.', $v))->slice(0, 2)->toArray();
184+
$this->breeze = $v == 'dev-master' || ($version[0] >= 1 && $version[1] >= 1);
183185
if(filled($v) && !$this->breeze) {
184186
$this->info('ABORTING: This installer only supports Breeze >= v1.1');
185187
exit;

0 commit comments

Comments
 (0)