Skip to content

Commit

Permalink
Fix laravel version constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
inxilpro committed May 12, 2023
1 parent 4c16bab commit f8c7820
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Elements/Element.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public function when($value = null, callable $callback = null, callable $default
? $value($this)
: $value;

if (version_compare(App::version(), '8.46.0', '>=')) {
if (version_compare(App::version(), '9.0.0', '>=')) {
if (func_num_args() === 0) {
return new HigherOrderWhenProxy($this);
}
Expand All @@ -276,7 +276,7 @@ public function unless($value = null, callable $callback = null, callable $defau
? $value($this)
: $value;

if (version_compare(App::version(), '8.46.0', '>=')) {
if (version_compare(App::version(), '9.0.0', '>=')) {
if (func_num_args() === 0) {
return (new HigherOrderWhenProxy($this))->negateConditionOnCapture();
}
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/ConditionableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public function test_when_with_proxy()

protected function requiresHigherOrderProxies()
{
if (version_compare($this->app->version(), '8.46.0', '<')) {
$this->markTestSkipped('Requires Laravel 8.46 or higher.');
if (version_compare($this->app->version(), '9.0.0', '<')) {
$this->markTestSkipped('Requires Laravel 9 or higher.');
}
}
}

0 comments on commit f8c7820

Please sign in to comment.