Skip to content

Commit a0d2d65

Browse files
committed
wip UnsupportedException for w:0 writes when hint is unsupported
1 parent 33fc56f commit a0d2d65

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Operation/Update.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ class Update implements Executable, Explainable
5555
private static $wireVersionForDocumentLevelValidation = 4;
5656

5757
/** @var integer */
58-
private static $wireVersionForHintServerSideError = 5;
58+
private static $wireVersionForHint = 8;
59+
60+
/** @var integer */
61+
private static $wireVersionForUnsupportedOptionServerSideError = 5;
5962

6063
/** @var string */
6164
private $databaseName;
@@ -206,7 +209,7 @@ public function execute(Server $server)
206209
/* Server versions >= 3.4.0 raise errors for unknown update
207210
* options. For previous versions, the CRUD spec requires a client-side
208211
* error. */
209-
if (isset($this->options['hint']) && ! server_supports_feature($server, self::$wireVersionForHintServerSideError)) {
212+
if (isset($this->options['hint']) && ! server_supports_feature($server, self::$wireVersionForUnsupportedOptionServerSideError)) {
210213
throw UnsupportedException::hintNotSupported();
211214
}
212215

0 commit comments

Comments
 (0)