Skip to content

Commit 2decf0d

Browse files
committed
Merge pull request #631
2 parents d8d9511 + f3094ec commit 2decf0d

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

src/Operation/Watch.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,6 @@ final public function commandSucceeded(CommandSucceededEvent $event)
213213
*/
214214
public function execute(Server $server)
215215
{
216-
$inTransaction = isset($this->options['session']) && $this->options['session']->isInTransaction();
217-
if ($inTransaction && isset($this->options['readConcern'])) {
218-
throw UnsupportedException::readConcernNotSupportedInTransaction();
219-
}
220-
221216
return new ChangeStream($this->executeAggregate($server), $this->resumeCallable);
222217
}
223218

tests/Collection/CollectionFunctionalTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,17 @@ function($collection, $session, $options = []) {
551551
);
552552
}, 'w'
553553
],
554+
555+
/* Disabled, as it's illegal to use change streams in transactions
556+
[
557+
function($collection, $session, $options = []) {
558+
$collection->watch(
559+
[],
560+
['session' => $session] + $options
561+
);
562+
}, 'r'
563+
],
564+
*/
554565
];
555566
}
556567

0 commit comments

Comments
 (0)