Skip to content

Merge 2.11.x into 2.12.x#9529

Merged
derrabus merged 7 commits intodoctrine:2.12.xfrom
derrabus:2.12.x
Feb 20, 2022
Merged

Merge 2.11.x into 2.12.x#9529
derrabus merged 7 commits intodoctrine:2.12.xfrom
derrabus:2.12.x

Conversation

@derrabus
Copy link
Member

No description provided.

rejinka and others added 7 commits February 13, 2022 21:42
Curly brackets are the annotation way of declaring array. Probably a
mistake while copy pasting some examples from annotations.
Since v2.7.0 the ORM avoids using extra queries via the paginator
component when maximum results isn't set on the original query. With
that change, this test was not executing the code path that it was
expected to run.

This makes sure we trigger the forcing of custom DBAL types when
hydrating the identifiers, making sure we don't introduce bugs.

More info:
- Forcing DBAL type conversion: doctrine#7905
- Issue on optimisation: doctrine#7829
- PR on optimisation: doctrine#7863
- Minor BC-break docs: https://github.com/doctrine/orm/blob/2.11.x/UPGRADE.md#minor-bc-break-paginator-output-walkers-arent-be-called-anymore-on-sub-queries-for-queries-without-max-results
In doctrine#8962, I established that
swallowing exceptions while creating model was bad because it could hide
other helpful exceptions.
As it turns out however, swallowing exceptions is really the way to go
here, because of the performance implication of calling dropSchema(). It
is possible to catch a more precise exception as well, which should
preserve the benefits of not swallowing them.

It looks like I based my grep on the comment inside the catch and today,
I found many other occurrences of this pattern, without the easy to grep
comment.

I decided to fix them as well, but in a lazier way: one no longer has to
remember to call dropSchema in tearDown() now, it is automated.
Make creating test models more straightforward and revert to swallowing exceptions
* 2.11.x:
  Make creating test models more straightforward
  Trigger the desired code path
  Fix syntax typo in attributes reference (doctrine#9513)
  Constructor-Argument "options" has the same type as the associated property. (doctrine#9501)
@derrabus derrabus merged commit dac1875 into doctrine:2.12.x Feb 20, 2022
@derrabus derrabus deleted the 2.12.x branch February 20, 2022 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants