Skip to content

[3.x] Remove chained method Stage::search() as the $search stage must be the first of the pipeline#2929

Merged
GromNaN merged 1 commit intodoctrine:3.0.xfrom
GromNaN:3-stage-search
Dec 2, 2025
Merged

[3.x] Remove chained method Stage::search() as the $search stage must be the first of the pipeline#2929
GromNaN merged 1 commit intodoctrine:3.0.xfrom
GromNaN:3-stage-search

Conversation

@GromNaN
Copy link
Member

@GromNaN GromNaN commented Nov 24, 2025

Q A
Type improvement
BC Break yes
Fixed issues #2823

@GromNaN GromNaN added this to the 3.0.0 milestone Nov 24, 2025
@GromNaN GromNaN changed the title Remove chained method Stage::search() as the $search stage must be first Remove chained method Stage::search() as the $search stage must be the first of the pipeline Nov 24, 2025
@GromNaN GromNaN requested a review from alcaeus November 25, 2025 11:38
@IonBazan IonBazan changed the title Remove chained method Stage::search() as the $search stage must be the first of the pipeline [3.x] Remove chained method Stage::search() as the $search stage must be the first of the pipeline Nov 25, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes a deprecated chained method Stage::search() from the aggregation pipeline API, enforcing that the $search stage must be the first stage in a MongoDB aggregation pipeline by only allowing its use through Builder::search().

Key changes:

  • Removed the deprecated Stage::search() method that allowed incorrectly chaining the $search stage
  • Removed the unused trigger_deprecation import

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@GromNaN GromNaN merged commit 377061d into doctrine:3.0.x Dec 2, 2025
11 checks passed
@GromNaN GromNaN deleted the 3-stage-search branch December 2, 2025 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants