Skip to content

Commit 9870ad1

Browse files
authored
Merge pull request #306 from Geolim4/final
Warn users about Mongo/MongoDB extension
2 parents e8d6894 + 186fbb9 commit 9870ad1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/phpFastCache/Drivers/Mongodb/Driver.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
use MongoCursorException;
2323
use MongoDate;
2424
use phpFastCache\Core\DriverAbstract;
25-
use phpFastCache\Core\StandardPsr6StructureTrait;
2625
use phpFastCache\Entities\driverStatistic;
2726
use phpFastCache\Exceptions\phpFastCacheDriverCheckException;
2827
use phpFastCache\Exceptions\phpFastCacheDriverException;
@@ -60,6 +59,11 @@ public function __construct(array $config = [])
6059
*/
6160
public function driverCheck()
6261
{
62+
if(class_exists('MongoDB\Driver\Manager')){
63+
trigger_error('PhpFastCache currently only support the pecl Mongo extension.<br />
64+
The Support for the MongoDB extension will be added coming soon.', E_USER_ERROR);
65+
}
66+
6367
return extension_loaded('Mongodb');
6468
}
6569

0 commit comments

Comments
 (0)