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

Allow "Expr\Func" as condition in join in PHPDoc #10202

Merged
merged 1 commit into from
Nov 10, 2022
Merged

Allow "Expr\Func" as condition in join in PHPDoc #10202

merged 1 commit into from
Nov 10, 2022

Conversation

willemverspyck
Copy link
Contributor

I use "Expr\Func" as 4th parameter of innerJoin, but according to the PHPDoc it's not allowed:

Solves #8151

Current parameter is https://github.com/doctrine/orm/blob/2.13.x/lib/Doctrine/ORM/QueryBuilder.php#L1025

For example when I use the "in" expression in the join condition:

$qb = $this->entityManager->createQueryBuilder();
$qb
    ->select('u', 'a')
    ->from(CmsUser::class, 'u')
    ->innerJoin('u.articles', 'a', Join::WITH, $qb->expr()->in(
        'u.id',
        [1, 2, 3]
    ));

it generates the query .... WITH u.id IN(1, 2, 3), but currently it's not allowed according to the PHPDoc.

@derrabus derrabus changed the base branch from 2.13.x to 2.14.x November 4, 2022 12:06
@derrabus derrabus changed the base branch from 2.14.x to 2.13.x November 4, 2022 12:10
@derrabus derrabus changed the base branch from 2.13.x to 2.14.x November 4, 2022 12:10
@derrabus derrabus added this to the 2.14.0 milestone Nov 10, 2022
@derrabus derrabus merged commit 90ececc into doctrine:2.14.x Nov 10, 2022
@derrabus
Copy link
Member

Thank you!

derrabus added a commit to derrabus/orm that referenced this pull request Nov 11, 2022
* 2.14.x:
  Add a constructor to CacheKey (doctrine#10212)
  Psalm 4.30.0, PHPStan 1.9.2 (doctrine#10213)
  Allow "Expr\Func" as condition in join (doctrine#10202)
  refactor: use list type in SchemaTool (doctrine#10199)
derrabus added a commit to derrabus/orm that referenced this pull request Nov 11, 2022
* 2.14.x:
  Add a constructor to CacheKey (doctrine#10212)
  Psalm 4.30.0, PHPStan 1.9.2 (doctrine#10213)
  Allow "Expr\Func" as condition in join (doctrine#10202)
  refactor: use list type in SchemaTool (doctrine#10199)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants