Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 58f77cf

Browse files
committed
Added additional check in cache manager for extensions
1 parent c877fac commit 58f77cf

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

‎CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
## 9.2.1
2+
##### 07 january 2024
3+
- __Misc__
4+
- Added additional check in cache manager for extensions
5+
16
## 9.2.0
2-
##### 10 january 2024
7+
##### 07 january 2024
38
- __API__
49
- Upgraded Phpfastcache API to `4.3.0` ([see changes](CHANGELOG_API.md))
510
- __Extensions__ (💡 New in 9.2)

‎lib/Phpfastcache/CacheManager.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,19 @@ public static function getInstance(string $driver, ?ConfigurationOptionInterface
119119
ExtensionManager::loadExtension($driver);
120120
return CacheManager::getInstance($driver, $config, $instanceId);
121121
} catch (PhpfastcacheExtensionNotFoundException) {
122+
// Temporary check until v10
123+
$extensionWarning = '';
124+
if (in_array($driver, ['Arangodb', 'Couchdb', 'Dynamodb', 'Firestore', 'Mongodb', 'Solr'], true)) {
125+
$extensionWarning .= sprintf(
126+
'However, it seems that you are using a driver which is now an extension. Run the following command to solve this issue: %s',
127+
sprintf('composer install phpfastcache/%s-extension', strtolower($driver))
128+
);
129+
}
122130
throw new PhpfastcacheDriverNotFoundException(sprintf(
123-
'The driver "%s" does not exist or does not implement %s',
131+
'The driver "%s" does not exist or does not implement %s. %s',
124132
$driver,
125-
ExtendedCacheItemPoolInterface::class
133+
ExtendedCacheItemPoolInterface::class,
134+
$extensionWarning,
126135
));
127136
}
128137
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /