-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DoctrineBridge] Middleware fails to handle binary values #46744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It should also accept arrays as an argument, for example array of ids. |
@l-vo could this maybe be relaxed to |
@dmaicher, yes, using mixed should fix the problem. doctrine/dbal 4.x uses a mixed type for the value. I'm going to suggest a fix. |
PR proposed. Actually, versions 5.4 and 6.0 are not affected. |
…middlewares) (l-vo) This PR was merged into the 5.4 branch. Discussion ---------- [DoctrineBridge] Fix comment for type on Query::setValue (middlewares) | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | See #46810 and #46744 Commits ------- 928a754 [DoctrineBridge] Fix comment for type on Query::setValue (middlewares)
Hi, thank you for the fix for setValue(), but how about setParam() 11 lines above it (line 46 in current implementations of Query) - looks like the exact same issue. I know bindParam() is marked as deprecated, still current solutions rely on this behavior. |
This PR was merged into the 6.2 branch. Discussion ---------- Allow resources in Query::setParam | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | See #46744 (comment) (failures in tests seem not related) Commits ------- 318e0e4 Allow resources in Query::setParam
Symfony version(s) affected
>= 5.4
Description
Hello there,
I just upgraded my application today (I switched from doctrine bundle 2.6.3 to 2.7.0) which is in 6.1 and my tests detected something weird.
Here is a part of the stack trace :
After digging a bit, I realized that this commit introduced a change in the query loggers (dbal logger -> middleware) which is the starting point of the issue. Indeed, it looks like the
Query
class does not handle binary values so that's why we end up with a fatal error.How to reproduce
Create an entity with a field of 'binary' type (I guess it would work for blob values as well) ... pushing further the thought I'm even wondering if the DateTime would be handled correctly but I'm far from being an expert on this one 🤔
Possible Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: