diff --git a/composer.json b/composer.json index c1b64129..d9f76baa 100644 --- a/composer.json +++ b/composer.json @@ -63,7 +63,8 @@ "doctrine/couchdb": "^dev-master#9eeb9e5", "triagens/arangodb": "^3.8", "google/cloud-firestore": "^1.20", - "aws/aws-sdk-php": "~3.0" + "aws/aws-sdk-php": "~3.0", + "psr/event-dispatcher": "~1.0" }, "conflict": { "doctrine/couchdb": " 64) { + throw new PhpfastcacheInvalidArgumentException( + 'Cache key is too long (up to 64 chars maximum). + Please check: https://www.php-fig.org/psr/psr-6/' + ); + } } protected function handleExpiredCacheItem(ExtendedCacheItemInterface $item): void diff --git a/tests/Solr.test.php b/tests/Solr.test.php index 1fb0c820..f78f27f8 100644 --- a/tests/Solr.test.php +++ b/tests/Solr.test.php @@ -13,8 +13,6 @@ */ use Phpfastcache\CacheManager; -use Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface; -use Phpfastcache\Event\EventReferenceParameter; use Phpfastcache\EventManager; use Phpfastcache\Tests\Helper\TestHelper; use Phpfastcache\Drivers\Solr\Config as SolrConfig; @@ -23,6 +21,11 @@ require_once __DIR__ . '/../vendor/autoload.php'; $testHelper = new TestHelper('Solr driver'); +if(!class_exists(Psr\EventDispatcher\EventDispatcherInterface::class)) { + $testHelper->assertSkip('PSR EventDispatcher is not installed !'); + $testHelper->terminateTest(); +} + /** @var SolrConfig $solrConfig */ $solrConfig = $testHelper->preConfigure(new SolrConfig()); $solrConfig->setCoreName('phpfastcache'); // Optional: Default value