mongodb/mongo-php-driver — pull request #753 by jmikola (2014-11-05 19:57:14+00:00)
Title: PHP-1263: Throw timeout exception for MongoCollection::count() maxTimeMS timeout

Previously, the count() helper threw its own exceptions instead of utilizing php_mongo_trigger_error_on_command_failure(). With this change, MongoExecutionTimeoutException will now be thrown for a maxTimeMS timeout and other exceptions will be handled consistently with other command helpers that use the utility function.

count() may still throw its own exception, but only if the "n" field is not found in the response, which should never happen in practice. To be consistent with other command helpers, it now throws a MongoResultException for that error (not a BC break since it sub-classes MongoException).

----

https://jira.mongodb.org/browse/PHP-1263