Allow to test hydration mode in platform DB.#587
Allow to test hydration mode in platform DB.#587VincentLanglet wants to merge 2 commits intophpstan:1.4.xfrom
Conversation
455e1c1 to
c9b13bf
Compare
c9b13bf to
7cfacc5
Compare
|
I was thinking about just using all hydratation modes that should be equal in |
But hydration mode doesn't always give the same result like bigInt which is a numeric-string with hydrate_object but an int with hydrate_scalar. |
|
Since 95% of the dataset in platform test uses DQL expressions, those should behave equally in all hydratation modes (I think, didnt check). Then there are few cases with entity field fetches (+ TypedExpressions) which would differ. So maybe we can keep your MR and assert those assumptions:
|
For instance,
So for the same query,
The second point need extra logic, I currently don't have in the PR.
Yes, this could be a nice solution. So I updated the PR to use But it still require to add extra logic to check ALL modes return the same. And so far this dev does not seems to be an easy one to me, specially because I didn't succeed running the docker locally... |
How is that, which part of the readme is wrong? |
When I run I get and didn't found time to debug this ATM |
|
I checked this a bit and I think it should be better to create separate regular test for it. We dont really need all drivers to be tested for hydratation modes imo. Also, you cannot test e.g. HYDRATE_SIMPLEOBJECT in platform one. |
|
Here is a draft of how it might look like: #590 |
|
Superseded by #590 |
WDYT @janedbal ? is it a good way to introduce test about different hydration mode ?