[PR #7564] Add Expr\Andx as allowed parameter in Expr::andX() #10546

Closed
opened 2026-01-22 16:07:55 +01:00 by admin · 0 comments
Owner

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

State: closed
Merged: No


As defined in Andx::$allowedClasses.

An alternative would be to allow Doctrine\ORM\Query\Expr\Composite.

Noticed by PHPStan

Parameter #1 $x of method Doctrine\ORM\Query\Expr::andX() expects                
         Doctrine\ORM\Query\Expr\Comparison|Doctrine\ORM\Query\Expr\Func|Doctrin          
         e\ORM\Query\Expr\Orx|string|null, Doctrine\ORM\Query\Expr\Andx given. 
**Original Pull Request:** https://github.com/doctrine/orm/pull/7564 **State:** closed **Merged:** No --- As defined in [Andx::$allowedClasses](https://github.com/doctrine/orm/blob/bb1fe1d6c9e3b2ab837445a73b0e76e57683fb78/lib/Doctrine/ORM/Query/Expr/Andx.php). An alternative would be to allow `Doctrine\ORM\Query\Expr\Composite`. Noticed by PHPStan ``` Parameter #1 $x of method Doctrine\ORM\Query\Expr::andX() expects Doctrine\ORM\Query\Expr\Comparison|Doctrine\ORM\Query\Expr\Func|Doctrin e\ORM\Query\Expr\Orx|string|null, Doctrine\ORM\Query\Expr\Andx given. ```
admin added the pull-request label 2026-01-22 16:07:55 +01:00
admin closed this issue 2026-01-22 16:07:56 +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#10546