This isn't necessarily an issue with the code in this library but rather the code in Symfony that this library depends on. SessionManager.php depends on MongoDbSessionHandler.php from Symfony which is biased to only work with the PHP Mongo Extension having several classes from that extension hardcoded.
It would be worthwhile to have an interim solution until the fix for this propagates. I suggest one of the following:
1) Create/utilize a "shim" that essentially defines all of the Mongo classes, namely, Mongo, MongoClient, MongoId, MongoDate, and MongoBinData that are expected/used by MongoDbSessionHandler.php. This could completely overcome the issue with the exception of MongoDbSessionHandler.php Line 73.
2) Create a temporary alternate MongoDbSessionHandler.php file that is used if the MongoDB\Client class exists.
I'd suggest (2) since (1) is not a complete solution.
@jenssegers, what are your thoughts? I'm happy to submit a PR for this today.
This isn't necessarily an issue with the code in this library but rather the code in Symfony that this library depends on. SessionManager.php depends on
MongoDbSessionHandler.php
from Symfony which is biased to only work with the PHP Mongo Extension having several classes from that extension hardcoded.I've filed an issue with Symfony here: https://github.com/symfony/symfony/issues/19183
It would be worthwhile to have an interim solution until the fix for this propagates. I suggest one of the following:
1) Create/utilize a "shim" that essentially defines all of the Mongo classes, namely, Mongo, MongoClient, MongoId, MongoDate, and MongoBinData that are expected/used by MongoDbSessionHandler.php. This could completely overcome the issue with the exception of MongoDbSessionHandler.php Line 73.
2) Create a temporary alternate MongoDbSessionHandler.php file that is used if the MongoDB\Client class exists.
I'd suggest (2) since (1) is not a complete solution.
@jenssegers, what are your thoughts? I'm happy to submit a PR for this today.