diff --git a/composer.json b/composer.json index 81fd2b01..966d9fe8 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,15 @@ "psr/cache": "^2.0||^3.0", "psr/simple-cache": "^2.0||^3.0", "ext-mbstring": "*", - "ext-json": "*" + "ext-json": "*", + "doctrine/couchdb": "dev-master", + "phpfastcache/phpssdb": "~1.1", + "predis/predis": "~1.1", + "mongodb/mongodb": "~1.9", + "triagens/arangodb": "~3.8", + "aws/aws-sdk-php": "~3.2", + "google/cloud-firestore": "~1.20", + "solarium/solarium": "~6.1" }, "require-dev": { "league/climate": "^3.8", diff --git a/lib/Phpfastcache/Drivers/Solr/Driver.php b/lib/Phpfastcache/Drivers/Solr/Driver.php index c2d8ca2f..73c6f863 100644 --- a/lib/Phpfastcache/Drivers/Solr/Driver.php +++ b/lib/Phpfastcache/Drivers/Solr/Driver.php @@ -270,11 +270,18 @@ public function getStats(): DriverStatistic } } + $version = 'Unknown version'; + if (method_exists($this->instance, 'getVersion')) { + $version = $this->instance::getVersion(); + } elseif (defined($this->instance::class . '::VERSION')) { + $version = constant($this->instance::class . '::VERSION'); + } + return (new DriverStatistic()) ->setData(implode(', ', array_keys($this->itemInstances))) ->setInfo(sprintf( 'Solarium %s and Solr %s for %s %s. %d document(s) stored in the "%s" core', - $this->instance::VERSION, + $version, $serverSystemInfo['lucene']['solr-spec-version'] ?? '[unknown SOLR version]', $serverSystemInfo['system']['name'] ?? '[unknown OS]', $serverSystemInfo['system']['version'] ?? '[unknown OS version]',