Skip to content

Commit b96aef8

Browse files
committed
refactor: Remove deprecated Cookie::withNeverExpiring()
1 parent 2df92ae commit b96aef8

File tree

3 files changed

+0
-23
lines changed

3 files changed

+0
-23
lines changed

system/Cookie/CloneableCookieInterface.php

-9
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,6 @@ public function withExpires($expires);
5858
*/
5959
public function withExpired();
6060

61-
/**
62-
* Creates a new Cookie that will virtually never expire from the browser.
63-
*
64-
* @return static
65-
*
66-
* @deprecated See https://github.com/codeigniter4/CodeIgniter4/pull/6413
67-
*/
68-
public function withNeverExpiring();
69-
7061
/**
7162
* Creates a new Cookie with a new path on the server the cookie is available.
7263
*

system/Cookie/Cookie.php

-12
Original file line numberDiff line numberDiff line change
@@ -465,18 +465,6 @@ public function withExpired()
465465
return $cookie;
466466
}
467467

468-
/**
469-
* @deprecated See https://github.com/codeigniter4/CodeIgniter4/pull/6413
470-
*/
471-
public function withNeverExpiring()
472-
{
473-
$cookie = clone $this;
474-
475-
$cookie->expires = Time::now()->getTimestamp() + 5 * YEAR;
476-
477-
return $cookie;
478-
}
479-
480468
/**
481469
* {@inheritDoc}
482470
*/

tests/system/Cookie/CookieTest.php

-2
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ public function testCloningCookies(): void
235235
$e = $a->withValue('muffin');
236236
$f = $a->withExpires('+30 days');
237237
$g = $a->withExpired();
238-
$h = $a->withNeverExpiring();
239238
$i = $a->withDomain('localhost');
240239
$j = $a->withPath('/web');
241240
$k = $a->withSecure();
@@ -248,7 +247,6 @@ public function testCloningCookies(): void
248247
$this->assertNotSame($a, $e);
249248
$this->assertNotSame($a, $f);
250249
$this->assertNotSame($a, $g);
251-
$this->assertNotSame($a, $h);
252250
$this->assertNotSame($a, $i);
253251
$this->assertNotSame($a, $j);
254252
$this->assertNotSame($a, $k);

0 commit comments

Comments
 (0)