From f8c78206ac8c642ff8746d882099b8b6a7e68063 Mon Sep 17 00:00:00 2001 From: Chris Morrell Date: Fri, 12 May 2023 16:09:44 -0400 Subject: [PATCH] Fix laravel version constraint --- src/Elements/Element.php | 4 ++-- tests/Unit/ConditionableTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Elements/Element.php b/src/Elements/Element.php index d8efa55..2f593ed 100644 --- a/src/Elements/Element.php +++ b/src/Elements/Element.php @@ -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); } @@ -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(); } diff --git a/tests/Unit/ConditionableTest.php b/tests/Unit/ConditionableTest.php index 2afef7c..42f029f 100644 --- a/tests/Unit/ConditionableTest.php +++ b/tests/Unit/ConditionableTest.php @@ -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.'); } } }