Skip to content

Commit a61df73

Browse files
committed
Merge pull request #626
2 parents 06d608b + 7a9c02d commit a61df73

8 files changed

+13
-17
lines changed

src/BSON/functions.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ static void phongo_bson_to_json(INTERNAL_FUNCTION_PARAMETERS, php_phongo_json_mo
131131
if (mode == PHONGO_JSON_MODE_LEGACY) {
132132
json = bson_as_json(bson, &json_len);
133133
} else if (mode == PHONGO_JSON_MODE_CANONICAL) {
134-
json = bson_as_canonical_json(bson, &json_len);
134+
json = bson_as_canonical_extended_json(bson, &json_len);
135135
} else if (mode == PHONGO_JSON_MODE_RELAXED) {
136-
json = bson_as_relaxed_json(bson, &json_len);
136+
json = bson_as_relaxed_extended_json(bson, &json_len);
137137
}
138138

139139
if (!json) {

src/libmongoc

tests/bson/bson-toCanonicalJSON_error-001.phpt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ MongoDB\BSON\toCanonicalJSON(): BSON decoding exceptions
55

66
require_once __DIR__ . '/../utils/tools.php';
77

8-
/* We can't really test for bson_iter_init() failure within
9-
* bson_as_canonical_json(), since bson_reader_read() already checks that the
10-
* buffer is at least 5 bytes. */
8+
/* We can't really test for bson_iter_init() failure within libbson, since
9+
* bson_reader_read() already checks that the buffer is at least 5 bytes. */
1110
$tests = [
1211
'',
1312
str_repeat(fromJSON('{"x": "y"}'), 2),

tests/bson/bson-toJSON_error-001.phpt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ MongoDB\BSON\toJSON(): BSON decoding exceptions
55

66
require_once __DIR__ . '/../utils/tools.php';
77

8-
/* We can't really test for bson_iter_init() failure within bson_as_json(),
9-
* since bson_reader_read() already checks that the buffer is at least 5 bytes.
10-
*/
8+
/* We can't really test for bson_iter_init() failure within libbson, since
9+
* bson_reader_read() already checks that the buffer is at least 5 bytes. */
1110
$tests = [
1211
'',
1312
str_repeat(fromJSON('{"x": "y"}'), 2),

tests/bson/bson-toPHP_error-001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ MongoDB\BSON\toPHP(): Type classes must be instantiatable and implement Unserial
33
--FILE--
44
<?php
55

6-
require_once __DIR__ . "/../utils/basic.inc";
6+
require_once __DIR__ . '/../utils/tools.php';
77

88
abstract class MyAbstractDocument implements MongoDB\BSON\Unserializable {}
99

tests/bson/bson-toPHP_error-002.phpt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ MongoDB\BSON\toPHP(): BSON decoding exceptions
55

66
require_once __DIR__ . '/../utils/tools.php';
77

8-
/* We can't really test for bson_iter_init() failure, since bson_reader_read()
9-
* already checks that the buffer is at least 5 bytes.
10-
*/
8+
/* We can't really test for bson_iter_init() failure within libbson, since
9+
* bson_reader_read() already checks that the buffer is at least 5 bytes. */
1110
$invalidBson = array(
1211
'',
1312
str_repeat(fromJSON('{"x": "y"}'), 2),

tests/bson/bson-toRelaxedJSON_error-001.phpt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ MongoDB\BSON\toRelaxedJSON(): BSON decoding exceptions
55

66
require_once __DIR__ . '/../utils/tools.php';
77

8-
/* We can't really test for bson_iter_init() failure within
9-
* bson_as_relaxed_json(), since bson_reader_read() already checks that the
10-
* buffer is at least 5 bytes. */
8+
/* We can't really test for bson_iter_init() failure within libbson, since
9+
* bson_reader_read() already checks that the buffer is at least 5 bytes. */
1110
$tests = [
1211
'',
1312
str_repeat(fromJSON('{"x": "y"}'), 2),

0 commit comments

Comments
 (0)