-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Merge release 2.20.0 into 3.0.x #11662
Closed
Closed
Conversation
This file contains 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
* Add TokenType class Co-authored-by: Alexander M. Turek <[email protected]> * Deprecated Lexer constants in favour of TokenType * Replace all Lexer::T_ occurrences with TokenType::T_ * Add upgrade note * Fixed import Lexer => TokenType * Fixed deprecation phpdoc * Replaced int value with matching constant of TokenType * Update src/Query/Lexer.php --------- Co-authored-by: Alexander M. Turek <[email protected]>
Merge 2.18.x up into 2.19.x
… not yet fully completed on eagerLoadCollections
Merge 2.18.x up into 2.19.x
After 2.17 (some?) EAGER fetched OneToMany associations stopped working, if they have multiple join columns. Loads for these associations will trigger a `MessingPositionalParameter` exception "Positional parameter at index 1 does not have a bound value". This test case should reproduce this issue, so it can be fixed.
* 2.18.x: Backport QueryParameterTest (#11288)
Merge 2.18.x up into 2.19.x
`getAssociationMappedByTargetField()` returns `null` when called with the owning side of an association. This is undocumented and wrong because the phpdoc advertises a string as a return type. Instead, callers should ensure they are calling that method with an inverse side. Closes #11250
Deprecate invalid method call
Merge 2.18.x up into 2.19.x
* 2.18.x: PHPStan 1.10.59 (#11320)
* 2.18.x: Psalm 5.22.2 (#11326)
* 2.18.x: Fix annotation
doctrine/rst-parser does not appear to support orphan metadata yet, and renders it verbatim on the website. Let's move this to the CI job.
Remove guides-specific markup
… exploration, and we only need the regression test.
…ith-fetch-eager [2.17.x] Failed getting entity with fetch eager property
…XnS7Xw9 Merge release 2.19.1 into 2.20.x
Page: https://www.doctrine-project.org/projects/doctrine-orm/en/2.19/reference/dql-doctrine-query-language.html#query-result-formats Follow-up of #11359 The table I suggested is probably not working, since the text for each method is too long. And what I really wanted is to make it more *scanable*. So I tried boldfacing - if this doesn't work, I'll try something else. Questions: 1. This section here is basically the same as https://www.doctrine-project.org/projects/doctrine-orm/en/2.10/reference/dql-doctrine-query-language.html#hydration-modes ! So I'll try to merge them (in another PR), OK? I think the list is a better format (more scanable) - since those methods all work the same, there's no need for a full-blown code sample for each, IMO. 2. `getSingleColumnResult()` is missing.
Replace custom directives with native option
* 2.19.x: Replace custom directives with native option
For now doctrine/common generates proxies that trigger deprecation, so let us only test with lazy ghosts only.
E_STRICT is deprecated as of PHP 8.4
Add CI job for PHP 8.4
Prevent property hooks from being used as they currently would work on external non-raw values without explicit code.
People that might have experimented with property hooks while still using ORM < 2.20.0 need to know that they need to remove their experiment or upgrade to a version that explicitly supports them.
* 2.19.x: PHPStan 1.12.6 (#11635)
…)` method (#11641) We use this method only from within one of our own test cases, and I don't see how it would be useful to anybody else outside – it has to be called on the `Parser` instance which exists internally in the `Query` only. Deprecating and removing it in 3.x allows for a slight simplification in the `Parser` there, since we do no longer need the field (it can be a local variable).
catch blocks are not supposed to fail. If you want to do something despite an exception happening, you should do it in a finally block. Closes #7545
It maybe happen that the SQL COMMIT statement is successful, but then something goes wrong. In that kind of case, you do not want to attempt a rollback. This was implemented in UnitOfWork::commit(), but for some reason not in the similar EntityManager methods.
This should make a warning we have in the CI go away. > fatal: No url found for submodule path 'docs/en/_theme' in .gitmodules
Submodule cleanup
Run risky code in finally block
Merge 2.19.x up into 2.20.x
…1188) * Add a test covering the #11112 issue * Add new OutputWalker and SqlFinalizer interfaces * Add a SingleSelectSqlFinalizer that can take care of adding offset/limit as well as locking mode statements to a given SQL query. Add a FinalizedSelectExecutor that executes given, finalized SQL statements. * In SqlWalker, split SQL query generation into the two parts that shall happen before and after the finalization phase. Move the part that generates "pre-finalization" SQL into a dedicated method. Use a side channel in SingleSelectSqlFinalizer to access the "finalization" logic and avoid duplication. * Fix CS violations * Skip the GH11112 test while applying refactorings * Avoid a Psalm complaint due to invalid (?) docblock syntax * Establish alternate code path - queries can obtain the sql executor through the finalizer, parser knows about output walkers yielding finalizers * Remove a possibly premature comment * Re-enable the #11112 test * Fix CS * Make RootTypeWalker inherit from SqlOutputWalker so it becomes finalizer-aware * Update QueryCacheTest, since first/max results no longer need extra cache entries * Fix ParserResultSerializationTest by forcing the parser to produce a ParserResult of the old kind (with the executor already constructed) * Fix WhereInWalkerTest * Update lib/Doctrine/ORM/Query/Exec/PreparedExecutorFinalizer.php Co-authored-by: Grégoire Paris <[email protected]> * Fix tests * Fix a Psalm complaint * Fix a test * Fix CS * Make the NullSqlWalker an instance of SqlOutputWalker * Avoid multiple cache entries caused by LimitSubqueryOutputWalker * Fix Psalm complaints * Fix static analysis complaints * Remove experimental code that I committed accidentally * Remove unnecessary baseline entry * Make AddUnknownQueryComponentWalker subclass SqlOutputWalker That way, we have no remaining classes in the codebase subclassing SqlWalker but not SqlOutputWalker * Use more expressive exception classes * Add a deprecation message * Move SqlExecutor creation to ParserResult, to minimize public methods available on it * Avoid keeping the SqlExecutor in the Query, since it must be generated just in time (e. g. in case Query parameters change) * Address PHPStan complaints * Fix tests * Small refactorings * Add an upgrade notice * Small refactorings * Update the Psalm baseline * Add a missing namespace import * Update Psalm baseline * Fix CS * Fix Psalm baseline --------- Co-authored-by: Grégoire Paris <[email protected]>
…eservesTheOriginalExceptionOnRollbackFailure()`
test: cover all transactional methods in `EntityManagerTest::testItPreservesTheOriginalExceptionOnRollbackFailure()`
Merge 2.19.x up into 2.20.x
Wrong branch |
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.
Release Notes for 2.20.0
2.20.0
Test Suite
EntityManagerTest::testItPreservesTheOriginalExceptionOnRollbackFailure()
thanks to @simPodImprovement
Static Analysis
Deprecation
\Doctrine\ORM\Query\Parser::setCustomOutputTreeWalker()
method thanks to @mpdudeDocumentation
CI
Bug