Merged
Conversation
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
Trigger the desired code path
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.