You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/Doctrine/ODM/MongoDB/Aggregation/Expr.php
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,9 @@
23
23
useDoctrine\MongoDB\Aggregation\ExprasBaseExpr;
24
24
useDoctrine\ODM\MongoDB\DocumentManager;
25
25
useDoctrine\ODM\MongoDB\Types\Type;
26
+
useconstE_USER_DEPRECATED;
27
+
usefunctionsprintf;
28
+
usefunctiontrigger_error;
26
29
27
30
/**
28
31
* Fluent interface for building aggregation pipelines.
@@ -64,9 +67,15 @@ public function field($fieldName)
64
67
/**
65
68
* @param mixed|self $expression
66
69
* @return mixed
70
+
*
71
+
* @internal This method will be private in MongoDB ODM 2.0.
67
72
*/
68
73
protectedfunctionensureArray($expression)
69
74
{
75
+
if (self::class !== static::class) {
76
+
@trigger_error(sprintf('The "%s" method will be private in MongoDB ODM 2.0. You should not rely on calling this method.', __METHOD__), E_USER_DEPRECATED);
77
+
}
78
+
70
79
// Convert field names in expressions
71
80
if (is_string($expression) && substr($expression, 0, 1) === '$') {
Copy file name to clipboardExpand all lines: lib/Doctrine/ODM/MongoDB/Aggregation/Stage/Bucket.php
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,10 @@ public function __construct(Builder $builder, DocumentManager $documentManager,
47
47
48
48
protectedfunctionconvertExpression($expression)
49
49
{
50
+
if (self::class !== static::class) {
51
+
@trigger_error(sprintf('The "%s" method will be private in MongoDB ODM 2.0. You should not rely on calling this method.', __METHOD__), E_USER_DEPRECATED);
Copy file name to clipboardExpand all lines: lib/Doctrine/ODM/MongoDB/Aggregation/Stage/BucketAuto.php
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,10 @@ public function __construct(Builder $builder, DocumentManager $documentManager,
47
47
48
48
protectedfunctionconvertExpression($expression)
49
49
{
50
+
if (self::class !== static::class) {
51
+
@trigger_error(sprintf('The "%s" method will be private in MongoDB ODM 2.0. You should not rely on calling this method.', __METHOD__), E_USER_DEPRECATED);
Copy file name to clipboardExpand all lines: lib/Doctrine/ODM/MongoDB/Aggregation/Stage/GraphLookup.php
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -155,6 +155,10 @@ private function fromReference($fieldName)
155
155
156
156
protectedfunctionconvertExpression($expression)
157
157
{
158
+
if (self::class !== static::class) {
159
+
@trigger_error(sprintf('The "%s" method will be private in MongoDB ODM 2.0. You should not rely on calling this method.', __METHOD__), E_USER_DEPRECATED);
@trigger_error(sprintf('The "%s" method will be private in MongoDB ODM 2.0. You should not rely on calling this method.', __METHOD__), E_USER_DEPRECATED);
Copy file name to clipboardExpand all lines: lib/Doctrine/ODM/MongoDB/Aggregation/Stage/Match.php
+53Lines changed: 53 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,11 @@
20
20
namespaceDoctrine\ODM\MongoDB\Aggregation\Stage;
21
21
22
22
useDoctrine\MongoDB\Aggregation\StageasBaseStage;
23
+
useconstE_USER_DEPRECATED;
24
+
usefunctionsprintf;
25
+
usefunctionfunc_get_args;
26
+
usefunctionfunc_num_args;
27
+
usefunctiontrigger_error;
23
28
24
29
/**
25
30
* Fluent interface for building aggregation pipelines.
@@ -47,4 +52,52 @@ public function includesReferenceTo($document)
47
52
48
53
return$this;
49
54
}
55
+
56
+
/**
57
+
* {@inheritdoc}
58
+
*
59
+
* @deprecated This method is deprecated and will be removed in MongoDB ODM 2.0.
60
+
*/
61
+
publicfunctiondebug($name = null)
62
+
{
63
+
@trigger_error(sprintf('The "%s" method is deprecated and will be removed in MongoDB ODM 2.0.', __METHOD__), E_USER_DEPRECATED);
64
+
65
+
returnparent::debug($name);
66
+
}
67
+
68
+
/**
69
+
* {@inheritdoc}
70
+
*/
71
+
publicfunctiongeoWithinPolygon()
72
+
{
73
+
if (func_num_args() < 3) {
74
+
@trigger_error(sprintf('Calling "%s" with fewer than 3 arguments was deprecated in MongoDB ODM 1.3 and will require at least 3 arguments in 2.0.', __METHOD__), E_USER_DEPRECATED);
Copy file name to clipboardExpand all lines: lib/Doctrine/ODM/MongoDB/Aggregation/Stage/ReplaceRoot.php
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,10 @@ public function __construct(Builder $builder, DocumentManager $documentManager,
47
47
48
48
protectedfunctionconvertExpression($expression)
49
49
{
50
+
if (self::class !== static::class) {
51
+
@trigger_error(sprintf('The "%s" method will be private in MongoDB ODM 2.0. You should not rely on calling this method.', __METHOD__), E_USER_DEPRECATED);
0 commit comments