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

Enforced argument and return types in QueryBuilder and ExpressionBuilder #3841

Merged
merged 1 commit into from
Jan 22, 2020

Conversation

morozov
Copy link
Member

@morozov morozov commented Jan 22, 2020

Q A
Type improvement
BC Break yes
  1. Some of the ExpressionBuilder method arguments were mistakenly marked as mixed and weren't automatically converted to type declarations. A similar type enforcement was done in Modified AbstractPlatform::getLocateExpression() and ::getSubstringExpression() signatures #3494 and Reworked AbstractPlatform::get*Expression() methods #3498.
  2. The QueryBuilder methods returning the instance are enforced to return self.

Copy link
Member

@greg0ire greg0ire 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 but I'm starting to think that maybe some docblocks could be removed entirely… not sure how much value is brought by comments such as "The left expression.". We could use $left and $right instead of $x and $y

@morozov
Copy link
Member Author

morozov commented Jan 22, 2020

Frankly speaking, I'm not even sure why this comparison() method is needed at all. It just concatenates all given values and adds a space in between. In the rest of the cases, the names of the arguments would be more obvious.

@morozov morozov merged commit 4d9a08c into doctrine:master Jan 22, 2020
@morozov morozov deleted the issues/3825-NEXT branch January 22, 2020 07:47
@morozov morozov self-assigned this Jan 22, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants