Skip to content

Commit 9ce16f4

Browse files
committed
Throw warning in MongoCursor::timeout()
1 parent 14dddf0 commit 9ce16f4

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ unserializing them.
125125
authentication information.
126126
- The [setFlag](https://php.net/manual/en/mongocursor.setflag.php)
127127
method is not yet implemented.
128+
- The [timeout](https://php.net/manual/en/mongocursor.timeout.php) method will
129+
not change any query options. Client-side timeouts are no longer supported by
130+
the new driver. Use the maxTimeMS setting as a replacement.
128131

129132
## MongoCommandCursor
130133
- The [createFromDocument](https://php.net/manual/en/mongocommandcursor.createfromdocument.php)

lib/Alcaeus/MongoDbAdapter/AbstractCursor.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ public function setReadPreference($readPreference, $tags = null)
246246
*/
247247
public function timeout($ms)
248248
{
249-
$this->notImplemented();
249+
trigger_error('The ' . __METHOD__ . ' method is not implemented in mongo-php-adapter', E_USER_WARNING);
250+
return $this;
250251
}
251252

252253
/**

0 commit comments

Comments
 (0)