2.20.7 / 3.5.3 seems to break EntityRepository::findBy... Empty Array Queries #7564

Closed
opened 2026-01-22 15:53:30 +01:00 by admin · 5 comments
Owner

Originally created by @alexander-schranz on GitHub (Oct 28, 2025).

Bug Report

Q A
Version 2.20.7
Previous Version if the bug is a regression 2.20.6

Summary

The latest release seems to have a regression in it which breaks some of our code.

I debugged through the changes and it seems be related to: https://github.com/doctrine/orm/pull/11895

Current behavior

  Exception: An exception occurred while executing a query: SQLSTATE[42601]: Syntax error: 7 ERROR:  syntax error at or near ")"
  LINE 1: ...anger AS iduserschanger_8 FROM me_media t0 WHERE t0.id IN ()

Expected behavior

No error.

See also: https://github.com/doctrine/orm/pull/12190#issuecomment-3455298734

How to reproduce

git clone git@github.com:sulu/sulu.git
cd sulu
git checkout 3.0

docker compose up --wait

bin/runtests -i -t ContactBundle -C --flags="--filter=ContactControllerTest::testPostAccountIDNull"
Originally created by @alexander-schranz on GitHub (Oct 28, 2025). ### Bug Report <!-- Fill in the relevant information below to help triage your issue. --> | Q | A |-------------------------------------------- | ------ | Version | 2.20.7 | Previous Version if the bug is a regression | 2.20.6 #### Summary The latest release seems to have a regression in it which breaks some of our code. I debugged through the changes and it seems be related to: https://github.com/doctrine/orm/pull/11895 #### Current behavior ```bash Exception: An exception occurred while executing a query: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near ")" LINE 1: ...anger AS iduserschanger_8 FROM me_media t0 WHERE t0.id IN () ``` #### Expected behavior No error. See also: https://github.com/doctrine/orm/pull/12190#issuecomment-3455298734 #### How to reproduce ```bash git clone git@github.com:sulu/sulu.git cd sulu git checkout 3.0 docker compose up --wait bin/runtests -i -t ContactBundle -C --flags="--filter=ContactControllerTest::testPostAccountIDNull" ```
admin added the Bug label 2026-01-22 15:53:30 +01:00
admin closed this issue 2026-01-22 15:53:30 +01:00
Author
Owner

@elliotbruneel commented on GitHub (Oct 28, 2025):

Got the same error for 3.5.3

@elliotbruneel commented on GitHub (Oct 28, 2025): Got the same error for 3.5.3
Author
Owner

@alexander-schranz commented on GitHub (Oct 28, 2025):

Deeper debugging, in my case it seems like EntityRepository::findById was called with an empty array:

$ids = [];
$this->entityRepository->findById($ids)

That seems to have worked previously but fails now on 2.20.7.

@alexander-schranz commented on GitHub (Oct 28, 2025): Deeper debugging, in my case it seems like `EntityRepository::findById` was called with an empty `array`: ```php $ids = []; $this->entityRepository->findById($ids) ``` That seems to have worked previously but fails now on 2.20.7.
Author
Owner

@elliotbruneel commented on GitHub (Oct 28, 2025):

It's link to this fix: https://github.com/doctrine/orm/pull/12190#issuecomment-3455298734

@elliotbruneel commented on GitHub (Oct 28, 2025): It's link to this fix: https://github.com/doctrine/orm/pull/12190#issuecomment-3455298734
Author
Owner

@derrabus commented on GitHub (Oct 29, 2025):

Does any of you want to work on a PR that fixes the issue?

@derrabus commented on GitHub (Oct 29, 2025): Does any of you want to work on a PR that fixes the issue?
Author
Owner

@W0rma commented on GitHub (Nov 12, 2025):

The bug should have been fixed in version 2.20.8 and 3.5.7.

@W0rma commented on GitHub (Nov 12, 2025): The bug should have been fixed in version `2.20.8` and `3.5.7`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#7564