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

Fix Match::$query type #1640

Closed
wants to merge 1 commit into from
Closed

Fix Match::$query type #1640

wants to merge 1 commit into from

Conversation

olvlvl
Copy link
Contributor

@olvlvl olvlvl commented Sep 2, 2017

Hi,

Doctrine\MongoDB\Query\Expr doesn't have the methods references() or includesReferenceTo(), but Doctrine\ODM\MongoDB\Query\Expr does.


/**
* Fluent interface for building aggregation pipelines.
*/
class Match extends BaseStage\Match
{
/**
* @var Expr
*/
protected $query;
Copy link
Member

Choose a reason for hiding this comment

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

This does not need to be redeclared just to change a typehint. Use the property annotation on the class if you want to fix that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The @property annotation is for public properties, this one is protected.

Copy link
Member

Choose a reason for hiding this comment

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

Oh. I forgot, sorry about that. In that case, I’d much rather just leave this out. It’s a non-issue at the docs level, and we’re changing the API for 2.0 anyways: the base classes of the query and aggregation builders will move into this project. doctrine/mongodb won’t be adapted for ext-mongodb (its job is done by mongodb/mongodb now) and there’s no point bothering with that two-level API. It’s caused enough problems as it is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the detailed explanation.

@alcaeus alcaeus closed this Sep 2, 2017
@olvlvl olvlvl deleted the olvlvl-fix-property-type-1 branch September 3, 2017 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants