Skip to content

Commit

Permalink
Merge pull request #75 from alcaeus/cursor-timeout-warning
Browse files Browse the repository at this point in the history
Throw warning in MongoCursor::timeout()
  • Loading branch information
alcaeus committed Mar 10, 2016
2 parents 59a3bc6 + a589134 commit f33ab79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ unserializing them.
authentication information.
- The [setFlag](https://php.net/manual/en/mongocursor.setflag.php)
method is not yet implemented.
- The [timeout](https://php.net/manual/en/mongocursor.timeout.php) method will
not change any query options. Client-side timeouts are no longer supported by
the new driver. Use the maxTimeMS setting as a replacement.

## MongoCommandCursor
- The [createFromDocument](https://php.net/manual/en/mongocommandcursor.createfromdocument.php)
Expand Down
3 changes: 2 additions & 1 deletion lib/Alcaeus/MongoDbAdapter/AbstractCursor.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ public function setReadPreference($readPreference, $tags = null)
*/
public function timeout($ms)
{
$this->notImplemented();
trigger_error('The ' . __METHOD__ . ' method is not implemented in mongo-php-adapter', E_USER_WARNING);
return $this;
}

/**
Expand Down

0 comments on commit f33ab79

Please sign in to comment.