Commit 2decf0dc authored by Jeremy Mikola's avatar Jeremy Mikola

Merge pull request #631

parents d8d95110 f3094ec7
...@@ -213,11 +213,6 @@ class Watch implements Executable, /* @internal */ CommandSubscriber ...@@ -213,11 +213,6 @@ class Watch implements Executable, /* @internal */ CommandSubscriber
*/ */
public function execute(Server $server) public function execute(Server $server)
{ {
$inTransaction = isset($this->options['session']) && $this->options['session']->isInTransaction();
if ($inTransaction && isset($this->options['readConcern'])) {
throw UnsupportedException::readConcernNotSupportedInTransaction();
}
return new ChangeStream($this->executeAggregate($server), $this->resumeCallable); return new ChangeStream($this->executeAggregate($server), $this->resumeCallable);
} }
......
...@@ -551,6 +551,17 @@ class CollectionFunctionalTest extends FunctionalTestCase ...@@ -551,6 +551,17 @@ class CollectionFunctionalTest extends FunctionalTestCase
); );
}, 'w' }, 'w'
], ],
/* Disabled, as it's illegal to use change streams in transactions
[
function($collection, $session, $options = []) {
$collection->watch(
[],
['session' => $session] + $options
);
}, 'r'
],
*/
]; ];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment