[Form] Fixed: Filter non-integers when selecting entities by int ID#14950
[Form] Fixed: Filter non-integers when selecting entities by int ID#14950fabpot merged 1 commit intosymfony:2.7from
Conversation
There was a problem hiding this comment.
This reference should be removed. It will be part of the merge commit anyway with the full discussion.
|
Does it replace #14617? |
|
Yes, I closed that issue. The PR is updated now. |
|
Thank you @webmozart. |
…by int ID (webmozart) This PR was merged into the 2.7 branch. Discussion ---------- [Form] Fixed: Filter non-integers when selecting entities by int ID | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #14583 (for Doctrine, not Propel) | License | MIT | Doc PR | - This PR fixes #14583 for Doctrine. Non-integer values (like `""`) are not passed to the database anymore when selecting entities by integer PK, which causes an error on some DBMSs (like PostgreSQL). Commits ------- 352be8e [Form] Fixed: Filter non-integers when selecting entities by int ID
|
It's a pity that this fix isn't part of the 2.7.1 release. So there's still a BC break. 😞 |
|
Shouldn't this one go in 2.3 also? |
|
an empty list of identifiers should skip the DB query entirely anyway, even if newer DBAL versions can handle them. We already know it won't return anything |
|
@nicolas-grekas Good point, can you work on a backport? Handling empty arrays properly across DBMS should be a Doctrine issue no? |
|
See #15027 |
|
@webmozart this has been solved in DBAL. But not backported to EOMed versions |
…by int ID (webmozart, nicolas-grekas) This PR was merged into the 2.3 branch. Discussion ---------- [Form] Fixed: Filter non-integers when selecting entities by int ID | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #14950 | License | MIT | Doc PR | - This is #14950 cherry-picked on 2.3 with a fix embedded. Commits ------- 086c58c [DoctrineBridge] Bypass the db when no valid identifier is provided in ORMQueryBuilderLoader 45579fd [Form] Fixed: Filter non-integers when selecting entities by int ID
|
My symfony requirement in composer.json is "~2.7", after a composer update I received symfony 2.7.1, and I'm still experiencing this issue, of sql error when submit the entity field blank. This problem is solved in which version of symfony? |
|
@murilolobato The fix is merged, but not released yet. 😞 |
|
Can we have a release for this? At least an expected release date? This is quite annoying... |
|
@zefrog already in the new version 2.7.2 |
|
How the release process works? Fabien is who generates the new tag? There is any documentation for this? So we can follow more precisely the process. |
|
@murilolobato, please read this doc entry about the release process. |
|
My fault to not give the correct attention to Contributing to Symfony part of documentation. I read it completely now, and all my doubts are answered. |
This PR fixes #14583 for Doctrine. Non-integer values (like
"") are not passed to the database anymore when selecting entities by integer PK, which causes an error on some DBMSs (like PostgreSQL).