diff --git a/system/Cookie/CloneableCookieInterface.php b/system/Cookie/CloneableCookieInterface.php index 0b7d6fdf5015..3055129a0b4b 100644 --- a/system/Cookie/CloneableCookieInterface.php +++ b/system/Cookie/CloneableCookieInterface.php @@ -58,15 +58,6 @@ public function withExpires($expires); */ public function withExpired(); - /** - * Creates a new Cookie that will virtually never expire from the browser. - * - * @return static - * - * @deprecated See https://github.com/codeigniter4/CodeIgniter4/pull/6413 - */ - public function withNeverExpiring(); - /** * Creates a new Cookie with a new path on the server the cookie is available. * diff --git a/system/Cookie/Cookie.php b/system/Cookie/Cookie.php index 468254f65336..df75c03c7bcb 100644 --- a/system/Cookie/Cookie.php +++ b/system/Cookie/Cookie.php @@ -465,18 +465,6 @@ public function withExpired() return $cookie; } - /** - * @deprecated See https://github.com/codeigniter4/CodeIgniter4/pull/6413 - */ - public function withNeverExpiring() - { - $cookie = clone $this; - - $cookie->expires = Time::now()->getTimestamp() + 5 * YEAR; - - return $cookie; - } - /** * {@inheritDoc} */ diff --git a/tests/system/Cookie/CookieTest.php b/tests/system/Cookie/CookieTest.php index 7f98e5e1e0b0..e4421a8bc443 100644 --- a/tests/system/Cookie/CookieTest.php +++ b/tests/system/Cookie/CookieTest.php @@ -235,7 +235,6 @@ public function testCloningCookies(): void $e = $a->withValue('muffin'); $f = $a->withExpires('+30 days'); $g = $a->withExpired(); - $h = $a->withNeverExpiring(); $i = $a->withDomain('localhost'); $j = $a->withPath('/web'); $k = $a->withSecure(); @@ -248,7 +247,6 @@ public function testCloningCookies(): void $this->assertNotSame($a, $e); $this->assertNotSame($a, $f); $this->assertNotSame($a, $g); - $this->assertNotSame($a, $h); $this->assertNotSame($a, $i); $this->assertNotSame($a, $j); $this->assertNotSame($a, $k);