Skip to content

Add @no-named-arguments to QueryBuilder condition helpers - #12512

Open
savinmikhail wants to merge 1 commit into
doctrine:3.7.xfrom
savinmikhail:codex/querybuilder-no-named-arguments
Open

Add @no-named-arguments to QueryBuilder condition helpers#12512
savinmikhail wants to merge 1 commit into
doctrine:3.7.xfrom
savinmikhail:codex/querybuilder-no-named-arguments

Conversation

@savinmikhail

Copy link
Copy Markdown

Summary

Add @no-named-arguments to the variadic QueryBuilder helpers that build WHERE and HAVING conditions:

  • where()
  • andWhere()
  • orWhere()
  • having()
  • andHaving()
  • orHaving()

Why

These helpers use a variadic predicate-style API where parameter names are not meant to be part of a stable public contract.

There is already a related issue showing that named-argument usage is problematic for where():

Adding the annotation makes that intent explicit and helps tooling avoid introducing named arguments for these methods.

Validation

  • vendor/bin/phpunit tests/Tests/ORM/QueryBuilderTest.php
  • vendor/bin/phpcs --standard=phpcs.xml.dist src/QueryBuilder.php

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.

1 participant