-
Notifications
You must be signed in to change notification settings - Fork 208
PHPC-1195: BulkWrite::update() should append arrayFilters as array #842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
bf5cf8b
a048e0e
1b082cf
3c8fdfd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
--TEST-- | ||
MongoDB\Driver\BulkWrite::update with arrayFilters | ||
--XFAIL-- | ||
START() tests must be reimplemented (PHPC-1179) | ||
--SKIPIF-- | ||
<?php require __DIR__ . "/../utils/basic-skipif.inc"; ?> | ||
<?php START('THROWAWAY', ["version" => "36-release"]); CLEANUP(THROWAWAY); ?> | ||
<?php skip_if_not_live(); ?> | ||
<?php skip_if_server_version('<', '3.6'); ?> | ||
<?php skip_if_not_clean(); ?> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a bit misleading, innit? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change was made during #787. Technically, the function attempts to drop the test collection and skips the test if that fails for some reason. I'll admit it's unlike other If you have some ideas for renaming or revising this, a new ticket would be best 👍 |
||
--FILE-- | ||
<?php | ||
require_once __DIR__ . "/../utils/basic.inc"; | ||
|
||
$manager = new MongoDB\Driver\Manager(THROWAWAY); | ||
$manager = new MongoDB\Driver\Manager(URI); | ||
|
||
$bulk = new MongoDB\Driver\BulkWrite(); | ||
|
||
|
@@ -35,11 +35,7 @@ $cursor = $manager->executeQuery( DATABASE_NAME . '.' . COLLECTION_NAME, new \Mo | |
var_dump($cursor->toArray()); | ||
?> | ||
===DONE=== | ||
<?php DELETE("THROWAWAY"); ?> | ||
<?php exit(0); ?> | ||
--CLEAN-- | ||
<?php require __DIR__ . "/../utils/basic-skipif.inc"; ?> | ||
<?php DELETE("THROWAWAY"); ?> | ||
--EXPECTF-- | ||
array(%d) { | ||
[0]=> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this is an equivalent to bson-encode.c's
php_phongo_is_array_or_document
? Should they be placed together perhaps? I don't mind, so please do what makes sense for you.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
php_phongo_is_array_or_document()
operates on azval
, while this validates abson_t
.We can't work with the
zval
here, as we're not inspecting it until it's already been converted to abson_t
. In theory, this allows a Serializable value to produce a BSON array for this option.