File tree Expand file tree Collapse file tree 2 files changed +31
-31
lines changed Expand file tree Collapse file tree 2 files changed +31
-31
lines changed Original file line number Diff line number Diff line change 1
1
--TEST--
2
- PHPC-2457: Query modifiers can be passed reference
2
+ PHPC-2457: Query options can be passed reference
3
3
--FILE--
4
4
<?php
5
5
6
- $ modifiers = ['$orderby ' => ['x ' => 1 ]];
6
+ $ collation = ['locale ' => 'fr_FR ' , 'strength ' => 2 ];
7
+ $ let = ['x ' => 1 ];
8
+ $ sort = ['_id ' => 1 ];
7
9
8
10
$ query = new MongoDB \Driver \Query ([], [
9
- 'modifiers ' => &$ modifiers ,
11
+ 'collation ' => &$ collation ,
12
+ 'let ' => &$ let ,
13
+ 'sort ' => &$ sort ,
10
14
]);
11
15
12
16
var_dump ($ query );
13
17
14
18
?>
15
19
===DONE===
16
20
<?php exit (0 ); ?>
17
- --EXPECTF--
18
- Deprecated: MongoDB\Driver\Query::__construct(): The "modifiers" option is deprecated and will be removed in a future release in %s
21
+ --EXPECT--
19
22
object(MongoDB\Driver\Query)#1 (3) {
20
23
["filter"]=>
21
24
object(stdClass)#2 (0) {
22
25
}
23
26
["options"]=>
24
- object(stdClass)#4 (1) {
25
- ["sort"]=>
26
- object(stdClass)#3 (1) {
27
+ object(stdClass)#6 (3) {
28
+ ["collation"]=>
29
+ object(stdClass)#3 (2) {
30
+ ["locale"]=>
31
+ string(5) "fr_FR"
32
+ ["strength"]=>
33
+ int(2)
34
+ }
35
+ ["let"]=>
36
+ object(stdClass)#4 (1) {
27
37
["x"]=>
28
38
int(1)
29
39
}
40
+ ["sort"]=>
41
+ object(stdClass)#5 (1) {
42
+ ["_id"]=>
43
+ int(1)
44
+ }
30
45
}
31
46
["readConcern"]=>
32
47
NULL
Original file line number Diff line number Diff line change 1
1
--TEST--
2
- PHPC-2457: Query options can be passed reference
2
+ PHPC-2457: Query modifiers can be passed reference
3
3
--FILE--
4
4
<?php
5
5
6
- $ collation = ['locale ' => 'fr_FR ' , 'strength ' => 2 ];
7
- $ let = ['x ' => 1 ];
8
- $ sort = ['_id ' => 1 ];
6
+ $ modifiers = ['$orderby ' => ['x ' => 1 ]];
9
7
10
8
$ query = new MongoDB \Driver \Query ([], [
11
- 'collation ' => &$ collation ,
12
- 'let ' => &$ let ,
13
- 'sort ' => &$ sort ,
9
+ 'modifiers ' => &$ modifiers ,
14
10
]);
15
11
16
12
var_dump ($ query );
17
13
18
14
?>
19
15
===DONE===
20
16
<?php exit (0 ); ?>
21
- --EXPECT--
17
+ --EXPECTF--
18
+ Deprecated: MongoDB\Driver\Query::__construct(): The "modifiers" option is deprecated and will be removed in a future release in %s
22
19
object(MongoDB\Driver\Query)#1 (3) {
23
20
["filter"]=>
24
21
object(stdClass)#2 (0) {
25
22
}
26
23
["options"]=>
27
- object(stdClass)#6 (3) {
28
- ["collation"]=>
29
- object(stdClass)#3 (2) {
30
- ["locale"]=>
31
- string(5) "fr_FR"
32
- ["strength"]=>
33
- int(2)
34
- }
35
- ["let"]=>
36
- object(stdClass)#4 (1) {
37
- ["x"]=>
38
- int(1)
39
- }
24
+ object(stdClass)#4 (1) {
40
25
["sort"]=>
41
- object(stdClass)#5 (1) {
42
- ["_id "]=>
26
+ object(stdClass)#3 (1) {
27
+ ["x "]=>
43
28
int(1)
44
29
}
45
30
}
You can’t perform that action at this time.
0 commit comments