[PR #10202] Allow "Expr\Func" as condition in join in PHPDoc #12172

Open
opened 2026-01-22 16:13:09 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/10202

State: closed
Merged: Yes


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.

**Original Pull Request:** https://github.com/doctrine/orm/pull/10202 **State:** closed **Merged:** Yes --- 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: ```mysql $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.
admin added the pull-request label 2026-01-22 16:13:09 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#12172