Skip to content

Commit 465b91d

Browse files
authored
Allow adapters
If we only verify that the MongoClient class exists then we can use adapters for the new Mongodb library. For example, "alcaeus/mongo-php-adapter"
1 parent 288bc41 commit 465b91d

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/phpFastCache/Drivers/Mongodb/Driver.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,7 @@ public function __construct(array $config = [])
5454
*/
5555
public function driverCheck()
5656
{
57-
if(class_exists('MongoDB\Driver\Manager')){
58-
trigger_error('PhpFastCache currently only support the pecl Mongo extension.<br />
59-
The Support for the MongoDB extension will be added coming soon.', E_USER_ERROR);
60-
}
61-
62-
return extension_loaded('Mongodb') && class_exists('MongoClient');
57+
return class_exists('MongoClient');
6358
}
6459

6560
/**

0 commit comments

Comments
 (0)