Skip to content

Commit 5ea3503

Browse files
committed
Remove chained method Stage::search() as the $search stage must be first
1 parent 0102816 commit 5ea3503

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/Aggregation/Stage.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
use GeoJson\Geometry\Point;
88

9-
use function trigger_deprecation;
10-
119
/**
1210
* Fluent interface for building aggregation pipelines.
1311
*
@@ -343,21 +341,6 @@ public function sample(int $size): Stage\Sample
343341
return $this->builder->sample($size);
344342
}
345343

346-
/**
347-
* The $search stage performs a full-text search on the specified field or
348-
* fields which must be covered by an Atlas Search index.
349-
*
350-
* @deprecated Since doctrine/mongodb-odm 2.13. This $search stage must be the first of the pipeline, use Builder::search() instead.
351-
*
352-
* @see https://www.mongodb.com/docs/atlas/atlas-search/query-syntax/#mongodb-pipeline-pipe.-search
353-
*/
354-
public function search(): Stage\Search
355-
{
356-
trigger_deprecation('doctrine/mongodb-odm', '2.13', 'Using "%s" is deprecated because the $search stage must be the first of the pipeline, use "%s::search()" instead.', __METHOD__, Builder::class);
357-
358-
return $this->builder->search();
359-
}
360-
361344
/**
362345
* Adds new fields to documents. $set outputs documents that contain all
363346
* existing fields from the input documents and newly added fields.

0 commit comments

Comments
 (0)