From 57ef51b92e186016f459f356088697a1d7966644 Mon Sep 17 00:00:00 2001 From: Jordan Hall Date: Thu, 12 Jul 2018 21:57:59 +0100 Subject: [PATCH] Release under new namespace --- .gitignore | 4 +++- README.md | 6 +++--- composer.json | 10 +++++----- src/CacheInvalidArgumentException.php | 2 +- src/CacheItem.php | 2 +- src/CacheItemPool.php | 18 +++++++++--------- tests/Functional/PoolIntegrationTest.php | 2 +- 7 files changed, 23 insertions(+), 21 deletions(-) diff --git a/.gitignore b/.gitignore index 88e99d5..d26ecc0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ vendor -composer.lock \ No newline at end of file +composer.lock + +.idea \ No newline at end of file diff --git a/README.md b/README.md index 5b4bc0a..44ce201 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # PSR-6 adapter for RW File Cache -[![Build Status](https://travis-ci.org/rapidwebltd/RW-File-Cache-PSR-6.svg?branch=master)](https://travis-ci.org/rapidwebltd/RW-File-Cache-PSR-6) -[![Coverage Status](https://coveralls.io/repos/github/rapidwebltd/RW-File-Cache-PSR-6/badge.svg?branch=master)](https://coveralls.io/github/rapidwebltd/RW-File-Cache-PSR-6?branch=master) +[![Build Status](https://travis-ci.org/DivineOmega/DO-File-Cache-PSR-6.svg?branch=master)](https://travis-ci.org/DivineOmega/DO-File-Cache-PSR-6) +[![Coverage Status](https://coveralls.io/repos/github/DivineOmega/DO-File-Cache-PSR-6/badge.svg?branch=master)](https://coveralls.io/github/DivineOmega/DO-File-Cache-PSR-6?branch=master) This package provides a [PSR-6](http://www.php-fig.org/psr/psr-6/) adapter for [RW File Cache](https://github.com/rapidwebltd/RW-File-Cache). @@ -10,5 +10,5 @@ This package provides a [PSR-6](http://www.php-fig.org/psr/psr-6/) adapter for [ You can install this package easily via Composer. Just run the following command from the root of your project. ``` -composer require rapidwebltd/rw-file-cache-psr-6 +composer require divineomega/do-file-cache-psr-6 ``` diff --git a/composer.json b/composer.json index 09390c3..caa78c9 100644 --- a/composer.json +++ b/composer.json @@ -1,26 +1,26 @@ { - "name": "rapidwebltd/rw-file-cache-psr-6", + "name": "divineomega/do-file-cache-psr-6", "description": "PSR-6 adapter for RW File Cache", "type": "library", "authors": [ { "name": "Jordan Hall", - "email": "jordan.hall@rapidweb.biz" + "email": "jordan@hall05.co.uk" } ], "license": "LGPL-3.0-only", "require": { - "rapidwebltd/rw-file-cache": "^1.2.3", + "divineomega/do-file-cache": "^2.0.0", "psr/cache": "^1.0" }, "require-dev": { "cache/integration-tests": "^0.16.0", "phpunit/phpunit": "^5.7", - "satooshi/php-coveralls": "^2.0" + "php-coveralls/php-coveralls": "^2.1" }, "autoload": { "psr-4": { - "rapidweb\\RWFileCachePSR6\\": "src/" + "DivineOmega\\DOFileCachePSR6\\": "src/" } } } diff --git a/src/CacheInvalidArgumentException.php b/src/CacheInvalidArgumentException.php index 3f5bb36..3e14ac1 100644 --- a/src/CacheInvalidArgumentException.php +++ b/src/CacheInvalidArgumentException.php @@ -1,6 +1,6 @@ rwFileCache = new RWFileCache(); + $this->doFileCache = new DOFileCache(); } public function changeConfig(array $config) { - return $this->rwFileCache->changeConfig($config); + return $this->doFileCache->changeConfig($config); } private function sanityCheckKey($key) @@ -45,7 +45,7 @@ public function getItem($key) return $this->deferredItems[$key]; } - return new CacheItem($key, $this->rwFileCache->get($key)); + return new CacheItem($key, $this->doFileCache->get($key)); } public function getItems(array $keys = []) @@ -69,7 +69,7 @@ public function hasItem($key) public function clear() { $this->deferredItems = []; - return $this->rwFileCache->flush(); + return $this->doFileCache->flush(); } public function deleteItem($key) @@ -81,7 +81,7 @@ public function deleteItem($key) return true; } - $this->rwFileCache->delete($key); + $this->doFileCache->delete($key); return true; } @@ -99,7 +99,7 @@ public function deleteItems(array $keys) public function save(CacheItemInterface $item) { - return $this->rwFileCache->set($item->getKey(), $item->get(), $item->getExpires()); + return $this->doFileCache->set($item->getKey(), $item->get(), $item->getExpires()); } public function saveDeferred(CacheItemInterface $item) diff --git a/tests/Functional/PoolIntegrationTest.php b/tests/Functional/PoolIntegrationTest.php index e621841..307c770 100644 --- a/tests/Functional/PoolIntegrationTest.php +++ b/tests/Functional/PoolIntegrationTest.php @@ -3,7 +3,7 @@ use PHPUnit\Framework\TestCase; use Cache\IntegrationTests\CachePoolTest; -use rapidweb\RWFileCachePSR6\CacheItemPool; +use DivineOmega\DOFileCachePSR6\CacheItemPool; class PoolIntegrationTest extends CachePoolTest {