nicktacular/php-mongo-session — pull request #5 by rocksfrow (2014-07-29 14:40:29+00:00)
Title: defunct Mongo() usage replaced with MongoClient() and relevant changes

Firstly I've added logic to use MongoClient() if it's available, and to fallback to Mongo(). Along with that comes the now defunct 'safe' mode being used with Mongo(). Write concern/preferences are now used with MongoClient, and it fallsback to 'safe' mode with Mongo().

New config options:

connection_opts -- array of options to pass down to MongoClient()
write_concern -- same default as MongoClient, 1, can be changed to 2+ to require writes to secondaries
write_journal -- same default as MongoClient, false, can be enabled to require journal before ack

I also updated gc() so it uses w=0 instead of safe=true if using MongoClient.

NOTE: I noticed that you have 1.3+ as a requirement. MongoClient was introduced in 1.3, so we really don't even need the Mongo() fallback with the 1.3 requirement. What's the 1.3 requirement for, since we have Mongo fallback?