Skip to content

Commit

Permalink
Merge pull request #10 from IlicMiljan/rename-cache-implementation
Browse files Browse the repository at this point in the history
[Breaking Change] Rename Cache Implementation
  • Loading branch information
IlicMiljan authored Mar 10, 2024
2 parents 70ead66 + 6ee4f6a commit de2a40a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ $cache = new FilesystemAdapter(...);
// Configure the caching reader
$reader = new CachingObjectPropertiesReader(
new RuntimeObjectPropertiesReader(),
new ItemPoolCompatibleCache($cache)
new CacheItemPoolAdapter($cache)
);

// Set up the ObjectEncryptionService with the reader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Psr\Cache\CacheItemPoolInterface;
use Psr\Cache\InvalidArgumentException;

class ItemPoolCompatibleCache implements Cache
class CacheItemPoolAdapter implements Cache
{
private CacheItemPoolInterface $cachePool;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
namespace IlicMiljan\SecureProps\Tests\Cache;

use IlicMiljan\SecureProps\Cache\Exception\InvalidCacheKey;
use IlicMiljan\SecureProps\Cache\ItemPoolCompatibleCache;
use IlicMiljan\SecureProps\Cache\CacheItemPoolAdapter;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use Psr\Cache\CacheItemInterface;
use Psr\Cache\CacheItemPoolInterface;
use Psr\Cache\InvalidArgumentException;

class ItemPoolCompatibleCacheTest extends TestCase
class CacheItemPoolAdapterTest extends TestCase
{
/**
* @var CacheItemPoolInterface&MockObject
Expand All @@ -20,15 +20,15 @@ class ItemPoolCompatibleCacheTest extends TestCase
* @var CacheItemInterface&MockObject
*/
private $cacheItem;
private ItemPoolCompatibleCache $cache;
private CacheItemPoolAdapter $cache;

protected function setUp(): void
{
parent::setUp();

$this->cachePool = $this->createMock(CacheItemPoolInterface::class);
$this->cacheItem = $this->createMock(CacheItemInterface::class);
$this->cache = new ItemPoolCompatibleCache($this->cachePool);
$this->cache = new CacheItemPoolAdapter($this->cachePool);
}

public function testGetWithCacheHit(): void
Expand Down

0 comments on commit de2a40a

Please sign in to comment.