Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove previously deprecated operations from Query Builder #1956

Merged
merged 4 commits into from
Apr 12, 2019

Conversation

jmikola
Copy link
Member

@jmikola jmikola commented Feb 14, 2019

Q A
Type improvement
BC Break yes/no
Fixed issues

Summary

The TYPE_GEO_LOCATION constant was already marked for removal in a comment. I assume this was an outstanding todo item.

While revising the Builder::limit() comment, I also realized that the ODM 2.0 Query Builder no longer supports group and mapReduce commands. I didn't find any open issues for implementing them, so I assume they were both intentionally dropped when porting over code from doctrine/mongodb. Let me know if you'd like to remove those as well and I can update this PR and create an entry in CHANGELOG-2.0.md.

As you know, group has been deprecated since MongoDB 3.4. mapReduce is not yet deprecated, but I expect it will be once Javascript support is integrated into the aggregation pipeline (no ETA on that).

@jmikola jmikola requested a review from alcaeus February 14, 2019 20:30
@alcaeus
Copy link
Member

alcaeus commented Feb 15, 2019

I didn't find any open issues for implementing them, so I assume they were both intentionally dropped when porting over code from doctrine/mongodb.

Correct, we dropped those for the reasons you mentioned below: group being deprecated and mapReduce facing the same fate soon(ish).

Double-checking I also just realised that we haven't documented these removals at all. Feel free to add that to this PR.

@alcaeus alcaeus added this to To Do in ODM 2.0 via automation Feb 15, 2019
@alcaeus alcaeus added this to the 2.0.0-Beta2 milestone Feb 15, 2019
@alcaeus alcaeus added this to 2.0 in Roadmap Feb 15, 2019
@jmikola jmikola self-assigned this Feb 19, 2019
@jmikola
Copy link
Member Author

jmikola commented Apr 9, 2019

@alcaeus: I think this is ready for another look. geoNear's removal was already documented, so I only added a changelog bullet for group and mapReduce. I also found a bunch of remnants in the public API, which were removed.

@alcaeus
Copy link
Member

alcaeus commented Apr 10, 2019

This looks good. I've created #2001 to add the corresponding deprecations for 1.3. Since the large refactoring in the Query and QueryBuilder classes will cause conflicts either way, I'm also perfectly fine merging this PR to 2.0 before merge #2001 to 1.3. Since we didn't document all deprecations properly in the code when starting 2.0, there will be more instances like this where we add deprecations to 1.3 after dropping the corresponding code in 2.0.

@malarzm
Copy link
Member

malarzm commented Apr 10, 2019

FWIW I've just merged #2001 :)

Copy link
Member

@alcaeus alcaeus left a comment

Choose a reason for hiding this comment

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

Looks good - waiting for #2003 to fix the build before merging this. Thanks Jeremy!

geoNear and mapReduce are no longer supported in Query
ODM removed support for geoNear commands in its query builder. Applications should use the $geoNear aggregation pipeline operator instead.
@alcaeus alcaeus changed the base branch from master to 1.3.x April 11, 2019 13:38
@alcaeus alcaeus changed the base branch from 1.3.x to master April 11, 2019 13:38
These helpers were originally removed when porting Doctrine MongoDB's query builder over to ODM (doctrine#1553 for 2.0.0-beta1); however, some traces remained in the public API, docs, and test suite.
@alcaeus alcaeus merged commit 280e05e into doctrine:master Apr 12, 2019
ODM 2.0 automation moved this from To Do to Done Apr 12, 2019
@jmikola jmikola deleted the builder-cleanup branch April 23, 2019 13:04
@alcaeus alcaeus added the Task label Jun 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
ODM 2.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants