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 union type on QueryExpressionVisitorTest::testWalkComparison() #9294

Merged

Conversation

derrabus
Copy link
Member

Spotted while working on #9293

@derrabus derrabus added this to the 2.10.5 milestone Dec 27, 2021
* @psalm-return list<array{
* 0: CriteriaComparison,
* 1: QueryBuilder\Comparison|QueryBuilder\Func|string,
* 2?: Parameter,
Copy link
Member

@greg0ire greg0ire Dec 27, 2021

Choose a reason for hiding this comment

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

Is this different than the previous specification for this parameter? Previously it meant always present but possibly null, whereas here it would mean never null, but optional? If there is no difference then are the numbers necessary?

Copy link
Member Author

Choose a reason for hiding this comment

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

Exactly. And if you look at the data provider you'll find that the declaration "never null, but optional" is more accurate.

Oh, and the closing > was missing, so the previous type declaration was invalid and thus ignored.

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.

Approving in case there is a difference

@derrabus derrabus merged commit 2ddeb79 into doctrine:2.10.x Dec 27, 2021
@derrabus derrabus deleted the types/query-expression-visitor-test branch December 27, 2021 22:43
derrabus added a commit that referenced this pull request Dec 28, 2021
* Bump reusable workflows

* Fix union type on QueryExpressionVisitorTest::testWalkComparison() (#9294)

* Synchronize Psalm baseline (#9296)

* Fix return type (#9295)

Co-authored-by: Grégoire Paris <[email protected]>
derrabus added a commit to derrabus/orm that referenced this pull request Dec 28, 2021
* 2.11.x:
  Fix return type (doctrine#9295)
  Synchronize Psalm baseline (doctrine#9296)
  Fix union type on QueryExpressionVisitorTest::testWalkComparison() (doctrine#9294)
  Allow arithmetic expressions within IN operator (doctrine#9242)
  Bump reusable workflows
derrabus added a commit to derrabus/orm that referenced this pull request Dec 28, 2021
* 2.11.x:
  Leverage get_debug_type() (doctrine#9297)
  Fix return type (doctrine#9295)
  Synchronize Psalm baseline (doctrine#9296)
  Fix union type on QueryExpressionVisitorTest::testWalkComparison() (doctrine#9294)
  Allow arithmetic expressions within IN operator (doctrine#9242)
  Bump reusable workflows
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.

2 participants