Skip to content

Commit

Permalink
refactor: Remove deprecated Cookie::withNeverExpiring()
Browse files Browse the repository at this point in the history
  • Loading branch information
neznaika0 committed Jan 14, 2025
1 parent 992a895 commit d36d556
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 23 deletions.
9 changes: 0 additions & 9 deletions system/Cookie/CloneableCookieInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
12 changes: 0 additions & 12 deletions system/Cookie/Cookie.php
Original file line number Diff line number Diff line change
Expand Up @@ -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}
*/
Expand Down
2 changes: 0 additions & 2 deletions tests/system/Cookie/CookieTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
Expand Down

0 comments on commit d36d556

Please sign in to comment.