Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
proc
/
self
/
root
/
opt
/
php-7.4
/
share
/
test
/
mongodb
/
tests
/
bulk
/
//proc/self/root/opt/php-7.4/share/test/mongodb/tests/bulk/bulkwrite-update_error-007.phpt
--TEST-- MongoDB\Driver\BulkWrite::update() arrayFilters option requires MongoDB 3.6 --SKIPIF-- <?php require __DIR__ . "/../utils/basic-skipif.inc"; ?> <?php skip_if_not_live(); ?> <?php skip_if_server_version('>=', '3.6'); ?> --FILE-- <?php require_once __DIR__ . "/../utils/basic.inc"; $manager = create_test_manager(); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->update( ['grades' => ['$gte' => 100]], ['$set' => ['grades.$[element]' => 100 ]], [ 'arrayFilters' => [['element' => ['$gte' => 100]]], 'multi' => true, ] ); echo throws(function() use ($manager, $bulk) { $manager->executeBulkWrite(DATABASE_NAME . '.' . COLLECTION_NAME, $bulk); }, 'MongoDB\Driver\Exception\BulkWriteException'), "\n"; ?> ===DONE=== <?php exit(0); ?> --EXPECT-- OK: Got MongoDB\Driver\Exception\BulkWriteException Bulk write failed due to previous MongoDB\Driver\Exception\RuntimeException: The selected server does not support array filters ===DONE===