Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: drop deprecated Item class #569

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@ parameters:
- src
featureToggles:
disableRuntimeReflectionProvider: true
excludePaths:
- src/Cache/Item.php
175 changes: 0 additions & 175 deletions src/Cache/Item.php

This file was deleted.

3 changes: 0 additions & 3 deletions src/Cache/TypedItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
/**
* A cache item.
*
* This class will be used by MemoryCacheItemPool and SysVCacheItemPool
* on PHP 8.0 and above. It is compatible with psr/cache 3.0 (PSR-6).
* @see Item for compatiblity with previous versions of PHP.
*/
final class TypedItem implements CacheItemInterface
{
Expand Down
4 changes: 1 addition & 3 deletions tests/mocks/TestFileCacheItemPool.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

namespace Google\Auth\Tests;

use Google\Auth\Cache\Item;
use Google\Auth\Cache\TypedItem;
use Psr\Cache\CacheItemInterface;
use Psr\Cache\CacheItemPoolInterface;
Expand Down Expand Up @@ -69,8 +68,7 @@ public function getItems(array $keys = []): iterable
if ($this->hasItem($key)) {
$items[$key] = unserialize(file_get_contents($this->cacheDir . '/' . $key));
} else {
$itemClass = \PHP_VERSION_ID >= 80000 ? TypedItem::class : Item::class;
$items[$key] = new $itemClass($key);
$items[$key] = new TypedItem($key);
}
}

Expand Down