mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[PR #12254] [MERGED] fix: handling of empty array in SQL condition generation #13626
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/doctrine/orm/pull/12254
Author: @elliotbruneel
Created: 10/30/2025
Status: ✅ Merged
Merged: 11/10/2025
Merged by: @greg0ire
Base:
2.20.x← Head:fix/empty-array-query📝 Commits (5)
b24586bfix: handling of empty array in SQL condition generation23f2286chore: update phpstan version and regenerate baseline32d1e97chore: improve empty array check in SQL condition generation4989ca6test: add test for finding by nullable field with empty array9ef0f53fix: update SQL condition for empty array to 1=0 instead of IN (NULL)📊 Changes
5 files changed (+84 additions, -27 deletions)
View changed files
📝
composer.json(+1 -1)📝
phpstan-baseline.neon(+7 -25)📝
src/Persisters/Entity/BasicEntityPersister.php(+5 -0)➕
tests/Tests/ORM/Functional/Ticket/GH12254Test.php(+62 -0)📝
tests/Tests/ORM/Persisters/BasicEntityPersisterTypeValueSqlTest.php(+9 -1)📄 Description
Fix a regression introduced in #12190:
$repository->findBy(['uuid' => []]should be a valid expression and return an empty result.Fixes #12245, with additional discussion at https://github.com/doctrine/orm/pull/12190#issuecomment-3455298734.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.