From 660197ea71dc7a1e53bdf4bef28c0124f43e8b0a Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Wed, 8 Feb 2023 08:16:43 +0100 Subject: [PATCH 01/11] Avoid unnecessary information in query hints to improve query cache hit ratio MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I've noticed that over time my query caches fill up with redundant queries, i. e. different cache entries for the DQL -> SQL translation that are exactly the same. For me, it's an issue because the cache entries fill up precious OPcache memory. Further investigation revealed that the queries themselves do not differ, but only the query hints – that are part of the computed cache key – do. In particular, only the value for the `WhereInWalker::HINT_PAGINATOR_ID_COUNT` query hint are different. Since `WhereInWalker` only needs to know _if_ there are matching IDs but not _how many_, we could avoid such cache misses by using just a boolean value as cache hint. --- .../ORM/Tools/Pagination/Paginator.php | 3 +-- .../ORM/Tools/Pagination/WhereInWalker.php | 10 ++++----- .../Tests/ORM/Functional/PaginationTest.php | 21 +++++++++++++++++++ .../Tools/Pagination/WhereInWalkerTest.php | 2 +- .../Doctrine/Tests/OrmFunctionalTestCase.php | 2 +- 5 files changed, 29 insertions(+), 9 deletions(-) diff --git a/lib/Doctrine/ORM/Tools/Pagination/Paginator.php b/lib/Doctrine/ORM/Tools/Pagination/Paginator.php index 8d9bc2fdd6b..fed197039ab 100644 --- a/lib/Doctrine/ORM/Tools/Pagination/Paginator.php +++ b/lib/Doctrine/ORM/Tools/Pagination/Paginator.php @@ -22,7 +22,6 @@ use function array_map; use function array_sum; use function assert; -use function count; use function is_string; /** @@ -160,7 +159,7 @@ public function getIterator() $ids = array_map('current', $foundIdRows); $this->appendTreeWalker($whereInQuery, WhereInWalker::class); - $whereInQuery->setHint(WhereInWalker::HINT_PAGINATOR_ID_COUNT, count($ids)); + $whereInQuery->setHint(WhereInWalker::HINT_PAGINATOR_HAS_IDS, true); $whereInQuery->setFirstResult(0)->setMaxResults(null); $whereInQuery->setCacheable($this->query->isCacheable()); diff --git a/lib/Doctrine/ORM/Tools/Pagination/WhereInWalker.php b/lib/Doctrine/ORM/Tools/Pagination/WhereInWalker.php index fc694788abe..6613e1e7474 100644 --- a/lib/Doctrine/ORM/Tools/Pagination/WhereInWalker.php +++ b/lib/Doctrine/ORM/Tools/Pagination/WhereInWalker.php @@ -28,15 +28,15 @@ * The parameter namespace (dpid) is defined by * the PAGINATOR_ID_ALIAS * - * The total number of parameters is retrieved from - * the HINT_PAGINATOR_ID_COUNT query hint. + * The HINT_PAGINATOR_HAS_IDS query hint indicates whether there are + * any ids in the parameter at all. */ class WhereInWalker extends TreeWalkerAdapter { /** * ID Count hint name. */ - public const HINT_PAGINATOR_ID_COUNT = 'doctrine.id.count'; + public const HINT_PAGINATOR_HAS_IDS = 'doctrine.paginator_has_ids'; /** * Primary key alias for query. @@ -65,9 +65,9 @@ public function walkSelectStatement(SelectStatement $AST) $pathExpression = new PathExpression(PathExpression::TYPE_STATE_FIELD | PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION, $rootAlias, $identifierFieldName); $pathExpression->type = $pathType; - $count = $this->_getQuery()->getHint(self::HINT_PAGINATOR_ID_COUNT); + $hasIds = $this->_getQuery()->getHint(self::HINT_PAGINATOR_HAS_IDS); - if ($count > 0) { + if ($hasIds) { $arithmeticExpression = new ArithmeticExpression(); $arithmeticExpression->simpleArithmeticExpression = new SimpleArithmeticExpression( [$pathExpression] diff --git a/tests/Doctrine/Tests/ORM/Functional/PaginationTest.php b/tests/Doctrine/Tests/ORM/Functional/PaginationTest.php index 20f33ee7251..d352ae1ed48 100644 --- a/tests/Doctrine/Tests/ORM/Functional/PaginationTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/PaginationTest.php @@ -667,6 +667,27 @@ public function testPaginationWithSubSelectOrderByExpression($useOutputWalker, $ self::assertCount(9, $paginator->getIterator()); } + public function testDifferentResultLengthsDoNotRequireExtraQueryCacheEntries(): void + { + $dql = 'SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id >= :id'; + $query = $this->_em->createQuery($dql); + $query->setMaxResults(10); + + $query->setParameter('id', 1); + $paginator = new Paginator($query); + $paginator->getIterator(); // exercise the Paginator + + $initialCount = count(self::$queryCache->getValues()); + + $query->setParameter('id', 2); + $paginator = new Paginator($query); + $paginator->getIterator(); // exercise the Paginator again, with a smaller result set + + $newCount = count(self::$queryCache->getValues()); + + self::assertSame($initialCount, $newCount); + } + public function populate(): void { $groups = []; diff --git a/tests/Doctrine/Tests/ORM/Tools/Pagination/WhereInWalkerTest.php b/tests/Doctrine/Tests/ORM/Tools/Pagination/WhereInWalkerTest.php index 75af9dd6612..1f4427f1a71 100644 --- a/tests/Doctrine/Tests/ORM/Tools/Pagination/WhereInWalkerTest.php +++ b/tests/Doctrine/Tests/ORM/Tools/Pagination/WhereInWalkerTest.php @@ -19,7 +19,7 @@ public function testDqlQueryTransformation(string $dql, string $expectedSql): vo { $query = $this->entityManager->createQuery($dql); $query->setHint(Query::HINT_CUSTOM_TREE_WALKERS, [WhereInWalker::class]); - $query->setHint(WhereInWalker::HINT_PAGINATOR_ID_COUNT, 10); + $query->setHint(WhereInWalker::HINT_PAGINATOR_HAS_IDS, true); $result = (new Parser($query))->parse(); diff --git a/tests/Doctrine/Tests/OrmFunctionalTestCase.php b/tests/Doctrine/Tests/OrmFunctionalTestCase.php index ba70d70b4b4..c2054179d6f 100644 --- a/tests/Doctrine/Tests/OrmFunctionalTestCase.php +++ b/tests/Doctrine/Tests/OrmFunctionalTestCase.php @@ -74,7 +74,7 @@ abstract class OrmFunctionalTestCase extends OrmTestCase * * @var CacheItemPoolInterface|null */ - private static $queryCache = null; + protected static $queryCache = null; /** * Shared connection when a TestCase is run alone (outside of its functional suite). From 31ff969628946ef2df87d0b6d49dabb1cc40119d Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Thu, 9 Feb 2023 00:19:38 +0100 Subject: [PATCH 02/11] Put up a warning sign that mapping may not be inherited from transient classes (#10392) This _seems_ to work, but... To my understanding, that is only because `ReflectionClass::getProperties` will report `protected` properties also for subclasses, including DocBlocks etc. The mapping drivers are unable to tell where a field comes from, so they pick up the mapping and treat it as originating from the inheriting class. If that is indeed outside of what the ORM was designed for (sombody please confirm?), then we should explicitly discourage it. Yes, I have seen examples of this in the wild. --- docs/en/reference/inheritance-mapping.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/en/reference/inheritance-mapping.rst b/docs/en/reference/inheritance-mapping.rst index 58cae459df9..712df333c29 100644 --- a/docs/en/reference/inheritance-mapping.rst +++ b/docs/en/reference/inheritance-mapping.rst @@ -32,6 +32,19 @@ need not have an ``#[Id]`` property. For further support of inheritance, the single or joined table inheritance features have to be used. +.. warning:: + + At least when using attributes or annotations to specify your mapping, + it _seems_ as if you could inherit from a base class that is neither + an entity nor a mapped superclass, but has properties with mapping configuration + on them that would also be used in the inheriting class. + + This, however, is due to how the corresponding mapping + drivers work and what the PHP reflection API reports for inherited fields. + + Such a configuration is explicitly not supported. To give just one example, + it will break for ``private`` properties. + .. note:: You may be tempted to use traits to mix mapped fields or relationships From 29bc6cc9551214c92d87b6f30ab9f7bc76835833 Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Tue, 14 Feb 2023 08:42:39 +0100 Subject: [PATCH 03/11] Write a test in a more specific way MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... so we can be sure that in fact the second result has a different size. Co-authored-by: Luís Cobucci --- .../Tests/ORM/Functional/PaginationTest.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/Doctrine/Tests/ORM/Functional/PaginationTest.php b/tests/Doctrine/Tests/ORM/Functional/PaginationTest.php index d352ae1ed48..c4fa3296d0b 100644 --- a/tests/Doctrine/Tests/ORM/Functional/PaginationTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/PaginationTest.php @@ -674,18 +674,19 @@ public function testDifferentResultLengthsDoNotRequireExtraQueryCacheEntries(): $query->setMaxResults(10); $query->setParameter('id', 1); - $paginator = new Paginator($query); - $paginator->getIterator(); // exercise the Paginator + $paginator = new Paginator($query); + $initialResult = iterator_to_array($paginator->getIterator()); // exercise the Paginator + self::assertCount(9, $initialResult); - $initialCount = count(self::$queryCache->getValues()); + $initialQueryCount = count(self::$queryCache->getValues()); - $query->setParameter('id', 2); + $query->setParameter('id', $initialResult[1]->id); // skip the first result element $paginator = new Paginator($query); - $paginator->getIterator(); // exercise the Paginator again, with a smaller result set + self::assertCount(8, $paginator->getIterator()); // exercise the Paginator again, with a smaller result set $newCount = count(self::$queryCache->getValues()); - self::assertSame($initialCount, $newCount); + self::assertSame($initialQueryCount, $newCount); } public function populate(): void From 5369e4f4256ee47cfe7d9d67cbc80ad8f9a0711d Mon Sep 17 00:00:00 2001 From: Simon Podlipsky Date: Tue, 14 Feb 2023 19:14:28 +0100 Subject: [PATCH 04/11] fix: use executeStatement in SchemaTool (#10516) --- lib/Doctrine/ORM/Tools/SchemaTool.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Doctrine/ORM/Tools/SchemaTool.php b/lib/Doctrine/ORM/Tools/SchemaTool.php index d71b7f1d9d3..fa5f87335fd 100644 --- a/lib/Doctrine/ORM/Tools/SchemaTool.php +++ b/lib/Doctrine/ORM/Tools/SchemaTool.php @@ -97,7 +97,7 @@ public function createSchema(array $classes) foreach ($createSchemaSql as $sql) { try { - $conn->executeQuery($sql); + $conn->executeStatement($sql); } catch (Throwable $e) { throw ToolsException::schemaToolFailure($sql, $e); } @@ -831,7 +831,7 @@ public function dropSchema(array $classes) foreach ($dropSchemaSql as $sql) { try { - $conn->executeQuery($sql); + $conn->executeStatement($sql); } catch (Throwable $e) { // ignored } @@ -849,7 +849,7 @@ public function dropDatabase() $conn = $this->em->getConnection(); foreach ($dropSchemaSql as $sql) { - $conn->executeQuery($sql); + $conn->executeStatement($sql); } } @@ -939,7 +939,7 @@ public function updateSchema(array $classes, $saveMode = false) $conn = $this->em->getConnection(); foreach ($updateSchemaSql as $sql) { - $conn->executeQuery($sql); + $conn->executeStatement($sql); } } From 5464e21022765deeca6d7ba19bca65d74fc1ccf2 Mon Sep 17 00:00:00 2001 From: Al Zee Date: Fri, 17 Feb 2023 15:25:10 +0800 Subject: [PATCH 05/11] fix typo in faq.rst (#10526) --- docs/en/reference/faq.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/reference/faq.rst b/docs/en/reference/faq.rst index 249761f400a..5d218306877 100644 --- a/docs/en/reference/faq.rst +++ b/docs/en/reference/faq.rst @@ -38,7 +38,7 @@ upon insert: private string $algorithm = "sha1"; /** @var self::STATUS_* */ - private int $status = self:STATUS_DISABLED; + private int $status = self::STATUS_DISABLED; } . From 052887765b90c596e82b26870a583507d965a6ea Mon Sep 17 00:00:00 2001 From: Josh P Date: Mon, 20 Feb 2023 15:37:30 +1100 Subject: [PATCH 06/11] Correct use of PHP attribute Incorrect syntax used in php 8 attribute. This should be key: value, rather than key=value --- docs/en/cookbook/working-with-datetime.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/cookbook/working-with-datetime.rst b/docs/en/cookbook/working-with-datetime.rst index b877b5c82b0..0a2d0bbe6f6 100644 --- a/docs/en/cookbook/working-with-datetime.rst +++ b/docs/en/cookbook/working-with-datetime.rst @@ -21,7 +21,7 @@ these comparisons are always made **BY REFERENCE**. That means the following cha #[Entity] class Article { - #[Column(type='datetime')] + #[Column(type: 'datetime')] private DateTime $updated; public function setUpdated(): void From 9a6e1b350559f963427669e63555c1ed09928519 Mon Sep 17 00:00:00 2001 From: Matthieu Lempereur Date: Wed, 22 Feb 2023 14:00:30 +0100 Subject: [PATCH 07/11] docs: consistency order for docblock in association mapping (#10534) --- docs/en/reference/association-mapping.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/en/reference/association-mapping.rst b/docs/en/reference/association-mapping.rst index 0f323de21d7..1ff30d3df65 100644 --- a/docs/en/reference/association-mapping.rst +++ b/docs/en/reference/association-mapping.rst @@ -1386,6 +1386,14 @@ Is essentially the same as following: .. configuration-block:: + .. code-block:: attribute + + From 9485d4d83540f8593aae33b6b0050d371b09de50 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Sun, 26 Feb 2023 15:21:47 +0100 Subject: [PATCH 08/11] Mark SqlWalker methods as not deprecated (#10540) phpstan treats implementations of deprecated methods of an interface as being deprecated themselves by default. However, SqlWalker does not intend to deprecate all those methods that are deprecated in TreeWalker, as they are moved down. Marking them as not deprecated will avoid reporting usages of deprecated APIs when implementing custom DQL functions for instance. --- lib/Doctrine/ORM/Query/SqlWalker.php | 112 +++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) diff --git a/lib/Doctrine/ORM/Query/SqlWalker.php b/lib/Doctrine/ORM/Query/SqlWalker.php index 160e4cdecf0..9d28dc1288c 100644 --- a/lib/Doctrine/ORM/Query/SqlWalker.php +++ b/lib/Doctrine/ORM/Query/SqlWalker.php @@ -258,6 +258,8 @@ public function getQueryComponents() * @psalm-param QueryComponent $queryComponent * * @return void + * + * @not-deprecated */ public function setQueryComponent($dqlAlias, array $queryComponent) { @@ -276,6 +278,8 @@ public function setQueryComponent($dqlAlias, array $queryComponent) * @param AST\DeleteStatement|AST\UpdateStatement|AST\SelectStatement $AST * * @return Exec\AbstractSqlExecutor + * + * @not-deprecated */ public function getExecutor($AST) { @@ -628,6 +632,8 @@ public function walkDeleteStatement(AST\DeleteStatement $AST) * @param string $identVariable * * @return string + * + * @not-deprecated */ public function walkEntityIdentificationVariable($identVariable) { @@ -649,6 +655,8 @@ public function walkEntityIdentificationVariable($identVariable) * @param string $fieldName * * @return string The SQL. + * + * @not-deprecated */ public function walkIdentificationVariable($identificationVariable, $fieldName = null) { @@ -670,6 +678,8 @@ public function walkIdentificationVariable($identificationVariable, $fieldName = * @param AST\PathExpression $pathExpr * * @return string + * + * @not-deprecated */ public function walkPathExpression($pathExpr) { @@ -731,6 +741,8 @@ public function walkPathExpression($pathExpr) * @param AST\SelectClause $selectClause * * @return string + * + * @not-deprecated */ public function walkSelectClause($selectClause) { @@ -854,6 +866,8 @@ public function walkSelectClause($selectClause) * @param AST\FromClause $fromClause * * @return string + * + * @not-deprecated */ public function walkFromClause($fromClause) { @@ -873,6 +887,8 @@ public function walkFromClause($fromClause) * @param AST\IdentificationVariableDeclaration $identificationVariableDecl * * @return string + * + * @not-deprecated */ public function walkIdentificationVariableDeclaration($identificationVariableDecl) { @@ -895,6 +911,8 @@ public function walkIdentificationVariableDeclaration($identificationVariableDec * @param AST\IndexBy $indexBy * * @return void + * + * @not-deprecated */ public function walkIndexBy($indexBy) { @@ -948,6 +966,8 @@ public function walkIndexBy($indexBy) * @param AST\RangeVariableDeclaration $rangeVariableDeclaration * * @return string + * + * @not-deprecated */ public function walkRangeVariableDeclaration($rangeVariableDeclaration) { @@ -998,6 +1018,8 @@ private function generateRangeVariableDeclarationSQL( * @return string * * @throws QueryException + * + * @not-deprecated */ public function walkJoinAssociationDeclaration($joinAssociationDeclaration, $joinType = AST\Join::JOIN_TYPE_INNER, $condExpr = null) { @@ -1162,6 +1184,8 @@ public function walkJoinAssociationDeclaration($joinAssociationDeclaration, $joi * @param AST\Functions\FunctionNode $function * * @return string + * + * @not-deprecated */ public function walkFunction($function) { @@ -1174,6 +1198,8 @@ public function walkFunction($function) * @param AST\OrderByClause $orderByClause * * @return string + * + * @not-deprecated */ public function walkOrderByClause($orderByClause) { @@ -1193,6 +1219,8 @@ public function walkOrderByClause($orderByClause) * @param AST\OrderByItem $orderByItem * * @return string + * + * @not-deprecated */ public function walkOrderByItem($orderByItem) { @@ -1217,6 +1245,8 @@ public function walkOrderByItem($orderByItem) * @param AST\HavingClause $havingClause * * @return string The SQL. + * + * @not-deprecated */ public function walkHavingClause($havingClause) { @@ -1229,6 +1259,8 @@ public function walkHavingClause($havingClause) * @param AST\Join $join * * @return string + * + * @not-deprecated */ public function walkJoin($join) { @@ -1291,6 +1323,8 @@ public function walkJoin($join) * @param AST\CoalesceExpression $coalesceExpression * * @return string The SQL. + * + * @not-deprecated */ public function walkCoalesceExpression($coalesceExpression) { @@ -1311,6 +1345,8 @@ public function walkCoalesceExpression($coalesceExpression) * @param AST\NullIfExpression $nullIfExpression * * @return string The SQL. + * + * @not-deprecated */ public function walkNullIfExpression($nullIfExpression) { @@ -1329,6 +1365,8 @@ public function walkNullIfExpression($nullIfExpression) * Walks down a GeneralCaseExpression AST node and generates the corresponding SQL. * * @return string The SQL. + * + * @not-deprecated */ public function walkGeneralCaseExpression(AST\GeneralCaseExpression $generalCaseExpression) { @@ -1350,6 +1388,8 @@ public function walkGeneralCaseExpression(AST\GeneralCaseExpression $generalCase * @param AST\SimpleCaseExpression $simpleCaseExpression * * @return string The SQL. + * + * @not-deprecated */ public function walkSimpleCaseExpression($simpleCaseExpression) { @@ -1371,6 +1411,8 @@ public function walkSimpleCaseExpression($simpleCaseExpression) * @param AST\SelectExpression $selectExpression * * @return string + * + * @not-deprecated */ public function walkSelectExpression($selectExpression) { @@ -1575,6 +1617,8 @@ public function walkSelectExpression($selectExpression) * @param AST\QuantifiedExpression $qExpr * * @return string + * + * @not-deprecated */ public function walkQuantifiedExpression($qExpr) { @@ -1587,6 +1631,8 @@ public function walkQuantifiedExpression($qExpr) * @param AST\Subselect $subselect * * @return string + * + * @not-deprecated */ public function walkSubselect($subselect) { @@ -1616,6 +1662,8 @@ public function walkSubselect($subselect) * @param AST\SubselectFromClause $subselectFromClause * * @return string + * + * @not-deprecated */ public function walkSubselectFromClause($subselectFromClause) { @@ -1635,6 +1683,8 @@ public function walkSubselectFromClause($subselectFromClause) * @param AST\SimpleSelectClause $simpleSelectClause * * @return string + * + * @not-deprecated */ public function walkSimpleSelectClause($simpleSelectClause) { @@ -1733,6 +1783,8 @@ public function walkNewObject($newObjectExpression, $newObjectResultAlias = null * @param AST\SimpleSelectExpression $simpleSelectExpression * * @return string + * + * @not-deprecated */ public function walkSimpleSelectExpression($simpleSelectExpression) { @@ -1788,6 +1840,8 @@ public function walkSimpleSelectExpression($simpleSelectExpression) * @param AST\AggregateExpression $aggExpression * * @return string + * + * @not-deprecated */ public function walkAggregateExpression($aggExpression) { @@ -1801,6 +1855,8 @@ public function walkAggregateExpression($aggExpression) * @param AST\GroupByClause $groupByClause * * @return string + * + * @not-deprecated */ public function walkGroupByClause($groupByClause) { @@ -1819,6 +1875,8 @@ public function walkGroupByClause($groupByClause) * @param AST\PathExpression|string $groupByItem * * @return string + * + * @not-deprecated */ public function walkGroupByItem($groupByItem) { @@ -1868,6 +1926,8 @@ public function walkGroupByItem($groupByItem) * Walks down a DeleteClause AST node, thereby generating the appropriate SQL. * * @return string + * + * @not-deprecated */ public function walkDeleteClause(AST\DeleteClause $deleteClause) { @@ -1887,6 +1947,8 @@ public function walkDeleteClause(AST\DeleteClause $deleteClause) * @param AST\UpdateClause $updateClause * * @return string + * + * @not-deprecated */ public function walkUpdateClause($updateClause) { @@ -1906,6 +1968,8 @@ public function walkUpdateClause($updateClause) * @param AST\UpdateItem $updateItem * * @return string + * + * @not-deprecated */ public function walkUpdateItem($updateItem) { @@ -1941,6 +2005,8 @@ public function walkUpdateItem($updateItem) * @param AST\WhereClause $whereClause * * @return string + * + * @not-deprecated */ public function walkWhereClause($whereClause) { @@ -1985,6 +2051,8 @@ public function walkWhereClause($whereClause) * @param AST\ConditionalExpression $condExpr * * @return string + * + * @not-deprecated */ public function walkConditionalExpression($condExpr) { @@ -2003,6 +2071,8 @@ public function walkConditionalExpression($condExpr) * @param AST\ConditionalTerm $condTerm * * @return string + * + * @not-deprecated */ public function walkConditionalTerm($condTerm) { @@ -2021,6 +2091,8 @@ public function walkConditionalTerm($condTerm) * @param AST\ConditionalFactor $factor * * @return string The SQL. + * + * @not-deprecated */ public function walkConditionalFactor($factor) { @@ -2037,6 +2109,8 @@ public function walkConditionalFactor($factor) * @param AST\ConditionalPrimary $primary * * @return string + * + * @not-deprecated */ public function walkConditionalPrimary($primary) { @@ -2057,6 +2131,8 @@ public function walkConditionalPrimary($primary) * @param AST\ExistsExpression $existsExpr * * @return string + * + * @not-deprecated */ public function walkExistsExpression($existsExpr) { @@ -2073,6 +2149,8 @@ public function walkExistsExpression($existsExpr) * @param AST\CollectionMemberExpression $collMemberExpr * * @return string + * + * @not-deprecated */ public function walkCollectionMemberExpression($collMemberExpr) { @@ -2174,6 +2252,8 @@ public function walkCollectionMemberExpression($collMemberExpr) * @param AST\EmptyCollectionComparisonExpression $emptyCollCompExpr * * @return string + * + * @not-deprecated */ public function walkEmptyCollectionComparisonExpression($emptyCollCompExpr) { @@ -2189,6 +2269,8 @@ public function walkEmptyCollectionComparisonExpression($emptyCollCompExpr) * @param AST\NullComparisonExpression $nullCompExpr * * @return string + * + * @not-deprecated */ public function walkNullComparisonExpression($nullCompExpr) { @@ -2275,6 +2357,8 @@ public function walkInSubselectExpression(AST\InSubselectExpression $inExpr): st * @return string * * @throws QueryException + * + * @not-deprecated */ public function walkInstanceOfExpression($instanceOfExpr) { @@ -2301,6 +2385,8 @@ public function walkInstanceOfExpression($instanceOfExpr) * @param mixed $inParam * * @return string + * + * @not-deprecated */ public function walkInParameter($inParam) { @@ -2315,6 +2401,8 @@ public function walkInParameter($inParam) * @param AST\Literal $literal * * @return string + * + * @not-deprecated */ public function walkLiteral($literal) { @@ -2339,6 +2427,8 @@ public function walkLiteral($literal) * @param AST\BetweenExpression $betweenExpr * * @return string + * + * @not-deprecated */ public function walkBetweenExpression($betweenExpr) { @@ -2360,6 +2450,8 @@ public function walkBetweenExpression($betweenExpr) * @param AST\LikeExpression $likeExpr * * @return string + * + * @not-deprecated */ public function walkLikeExpression($likeExpr) { @@ -2399,6 +2491,8 @@ public function walkLikeExpression($likeExpr) * @param AST\PathExpression $stateFieldPathExpression * * @return string + * + * @not-deprecated */ public function walkStateFieldPathExpression($stateFieldPathExpression) { @@ -2411,6 +2505,8 @@ public function walkStateFieldPathExpression($stateFieldPathExpression) * @param AST\ComparisonExpression $compExpr * * @return string + * + * @not-deprecated */ public function walkComparisonExpression($compExpr) { @@ -2437,6 +2533,8 @@ public function walkComparisonExpression($compExpr) * @param AST\InputParameter $inputParam * * @return string + * + * @not-deprecated */ public function walkInputParameter($inputParam) { @@ -2460,6 +2558,8 @@ public function walkInputParameter($inputParam) * @param AST\ArithmeticExpression $arithmeticExpr * * @return string + * + * @not-deprecated */ public function walkArithmeticExpression($arithmeticExpr) { @@ -2474,6 +2574,8 @@ public function walkArithmeticExpression($arithmeticExpr) * @param AST\SimpleArithmeticExpression $simpleArithmeticExpr * * @return string + * + * @not-deprecated */ public function walkSimpleArithmeticExpression($simpleArithmeticExpr) { @@ -2490,6 +2592,8 @@ public function walkSimpleArithmeticExpression($simpleArithmeticExpr) * @param mixed $term * * @return string + * + * @not-deprecated */ public function walkArithmeticTerm($term) { @@ -2514,6 +2618,8 @@ public function walkArithmeticTerm($term) * @param mixed $factor * * @return string + * + * @not-deprecated */ public function walkArithmeticFactor($factor) { @@ -2540,6 +2646,8 @@ public function walkArithmeticFactor($factor) * @param mixed $primary * * @return string The SQL. + * + * @not-deprecated */ public function walkArithmeticPrimary($primary) { @@ -2560,6 +2668,8 @@ public function walkArithmeticPrimary($primary) * @param mixed $stringPrimary * * @return string + * + * @not-deprecated */ public function walkStringPrimary($stringPrimary) { @@ -2574,6 +2684,8 @@ public function walkStringPrimary($stringPrimary) * @param string $resultVariable * * @return string + * + * @not-deprecated */ public function walkResultVariable($resultVariable) { From e0ad7ac506b9cbb13df88831ad0a2ce8cec41c17 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Tue, 28 Feb 2023 08:28:45 +0100 Subject: [PATCH 09/11] Bump dev tools (#10541) * phpstan/phpstan (1.9.14 => 1.10.3) * squizlabs/php_codesniffer (3.7.1 => 3.7.2) * vimeo/psalm (5.6.0 => 5.7.7) --- composer.json | 8 +- phpstan-baseline.neon | 5 - psalm-baseline.xml | 1281 +++++++++++++++++++++-------------------- 3 files changed, 646 insertions(+), 648 deletions(-) diff --git a/composer.json b/composer.json index 5ac64d8af91..1a77e471c61 100644 --- a/composer.json +++ b/composer.json @@ -42,14 +42,14 @@ "doctrine/annotations": "^1.13 || ^2", "doctrine/coding-standard": "^9.0.2 || ^11.0", "phpbench/phpbench": "^0.16.10 || ^1.0", - "phpstan/phpstan": "~1.4.10 || 1.9.14", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "phpstan/phpstan": "~1.4.10 || 1.10.3", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6", "psr/log": "^1 || ^2 || ^3", - "squizlabs/php_codesniffer": "3.7.1", + "squizlabs/php_codesniffer": "3.7.2", "symfony/cache": "^4.4 || ^5.4 || ^6.0", "symfony/var-exporter": "^4.4 || ^5.4 || ^6.2", "symfony/yaml": "^3.4 || ^4.0 || ^5.0 || ^6.0", - "vimeo/psalm": "4.30.0 || 5.6.0" + "vimeo/psalm": "4.30.0 || 5.7.7" }, "conflict": { "doctrine/annotations": "<1.13 || >= 3.0" diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index ecfdf4fa0eb..0367f213fe8 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -605,11 +605,6 @@ parameters: count: 1 path: lib/Doctrine/ORM/Tools/Pagination/WhereInWalker.php - - - message: "#^Result of \\|\\| is always true\\.$#" - count: 1 - path: lib/Doctrine/ORM/Tools/Pagination/WhereInWalker.php - - message: "#^Else branch is unreachable because ternary operator condition is always true\\.$#" count: 1 diff --git a/psalm-baseline.xml b/psalm-baseline.xml index c103b8e645d..93a00d79e8c 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,5 +1,5 @@ - + IterableResult @@ -11,7 +11,7 @@ in_array($fetchMode, [Mapping\ClassMetadata::FETCH_EAGER, Mapping\ClassMetadata::FETCH_LAZY], true) - ! $filteredParameters->isEmpty() ? $filteredParameters->first() : null + isEmpty() ? $filteredParameters->first() : null]]> Parameter|null @@ -25,8 +25,8 @@ $data - $this->_em->getConfiguration()->getResultCacheImpl() - $this->_queryCacheProfile->getResultCacheDriver() + _em->getConfiguration()->getResultCacheImpl()]]> + _queryCacheProfile->getResultCacheDriver()]]> $stmt @@ -56,12 +56,12 @@ - ! $association['type'] + - $em->getConfiguration() - ->getSecondLevelCacheConfiguration() - ->getCacheFactory() + getConfiguration() + ->getSecondLevelCacheConfiguration() + ->getCacheFactory()]]> getCacheFactory @@ -72,7 +72,7 @@ string - $this->fileLockRegionDirectory + fileLockRegionDirectory]]> (string) $fileLockRegionDirectory @@ -80,15 +80,15 @@ - $em->getMetadataFactory() + getMetadataFactory()]]> - $targetClassMetadata->associationMappings + associationMappings]]> - $assoc['joinColumnFieldNames'] - $assoc['targetToSourceKeyColumns'] - $owningAssociation['targetToSourceKeyColumns'] + + + getCacheRegion @@ -96,17 +96,17 @@ - $assocKeys->identifiers[$assocIndex] - $assocKeys->identifiers[$assocIndex] - $cacheKeys->identifiers[$index] - $cacheKeys->identifiers[$index] + identifiers[$assocIndex]]]> + identifiers[$assocIndex]]]> + identifiers[$index]]]> + identifiers[$index]]]> $id - $assocEntry->class - $assocEntry->class + class]]> + class]]> getCacheLogger @@ -128,11 +128,11 @@ $entityKey - $entry->identifiers + identifiers]]> - $collection->getOwner() - $collection->getOwner() + getOwner()]]> + getOwner()]]> buildCollectionHydrator @@ -141,19 +141,19 @@ - $collection->getOwner() - $collection->getOwner() + getOwner()]]> + getOwner()]]> - $collection->getOwner() + getOwner()]]> - $collection->getOwner() - $collection->getOwner() + getOwner()]]> + getOwner()]]> lock @@ -168,14 +168,14 @@ loadAll - $cacheEntry->class + class]]> - $collection->getOwner() - $collection->getOwner() + getOwner()]]> + getOwner()]]> - $em->getCache() + getCache()]]> getCacheFactory @@ -207,7 +207,7 @@ - $this->cache + cache]]> CacheProvider @@ -235,7 +235,7 @@ - $timestamp->time + time]]> @@ -258,7 +258,7 @@ transactional - $this->wrapped->getClassMetadata($className) + wrapped->getClassMetadata($className)]]> getClassMetadata @@ -290,7 +290,7 @@ merge - $entityName !== null && ! is_string($entityName) + is_object($entity) is_object($entity) is_object($entity) @@ -305,11 +305,11 @@ $entity $entity $entity - $entity instanceof $class->name ? $entity : null - $entity instanceof $class->name ? $entity : null - $persister->load($sortedId, null, null, [], $lockMode) - $persister->loadById($sortedId) - $this->metadataFactory->getMetadataFor($className) + name ? $entity : null]]> + name ? $entity : null]]> + load($sortedId, null, null, [], $lockMode)]]> + loadById($sortedId)]]> + metadataFactory->getMetadataFor($className)]]> ?T @@ -328,8 +328,8 @@ $entityName - $config->getProxyDir() - $config->getProxyNamespace() + getProxyDir()]]> + getProxyNamespace()]]> createCache @@ -346,7 +346,7 @@ is_object($connection) - ': "' . $connection . '"' + new $class($this) @@ -357,12 +357,12 @@ addNamedNativeQueryMapping - $persister->load($criteria, null, null, [], null, 1, $orderBy) + load($criteria, null, null, [], null, 1, $orderBy)]]> new LazyCriteriaCollection($persister, $criteria) ?T - AbstractLazyCollection<int, T>&Selectable<int, T> + &Selectable]]> find @@ -392,8 +392,8 @@ $currentLevel - $this->_nextValue - $this->_nextValue + _nextValue]]> + _nextValue]]> getTableHiLoCurrentValSql @@ -402,8 +402,8 @@ - $vertex->state !== VertexState::VISITED - $vertex->state !== VertexState::VISITED + state !== VertexState::VISITED]]> + state !== VertexState::VISITED]]> @@ -412,8 +412,8 @@ new IterableResult($this) - $class->associationMappings[$fieldName]['joinColumns'] - $class->associationMappings[$fieldName]['joinColumns'] + associationMappings[$fieldName]['joinColumns']]]> + associationMappings[$fieldName]['joinColumns']]]> return $rowData; @@ -429,7 +429,7 @@ $result[$resultKey] - $newObject['args'] + $result @@ -438,8 +438,8 @@ $baseElement - $baseElement =& $this->_resultPointers[$parent][key($first)] - $this->_resultPointers[$dqlAlias] =& $coll[key($coll)] + _resultPointers[$parent][key($first)]]]> + _resultPointers[$dqlAlias] =& $coll[key($coll)]]]> @@ -450,11 +450,11 @@ Iterator - $this->_hydrator->hydrateRow() - $this->next() + _hydrator->hydrateRow()]]> + next()]]> - $this->_current !== false + _current !== false]]> @@ -471,10 +471,10 @@ $parentObject - $relation['mappedBy'] + - $targetClass->reflFields + reflFields]]> getValue @@ -485,9 +485,9 @@ setValue - $class->associationMappings[$class->identifier[0]]['joinColumns'] - $class->associationMappings[$fieldName]['joinColumns'] - $newObject['args'] + associationMappings[$class->identifier[0]]['joinColumns']]]> + associationMappings[$fieldName]['joinColumns']]]> + @@ -532,7 +532,7 @@ $class $class - new $definition['class']() + new UuidGenerator() @@ -545,27 +545,27 @@ addNamedQuery - $subClass->table[$indexType][$indexName] + table[$indexType][$indexName]]]> - $subClass->table + table]]> $driver $evm - $subClass->table[$indexType][$indexName] + table[$indexType][$indexName]]]> - $parentClass->table[$indexType] + table[$indexType]]]> - $this->em - $this->em + em]]> + em]]> - $this->em->getConfiguration()->getMetadataDriverImpl() + em->getConfiguration()->getMetadataDriverImpl()]]> getConfiguration @@ -588,15 +588,17 @@ canRequireSQLConversion - $this->columnNames - $this->columnNames - $this->columnNames - $this->columnNames + columnNames]]> + columnNames]]> + columnNames]]> + columnNames]]> - ! $this->table - ! class_exists($mapping['targetEntity']) - $this->table + + table]]> + + table]]> + $mapping @@ -610,19 +612,18 @@ $definition - $this->identifier - $this->sqlResultSetMappings - $this->subClasses + identifier]]> + sqlResultSetMappings]]> + subClasses]]> $mapping $mapping - $mapping - $this->reflClass + reflClass]]> AssociationMapping - array{ + , * isCascadeRemove: bool, * isCascadePersist: bool, * isCascadeRefresh: bool, * isCascadeMerge: bool, * isCascadeDetach: bool, * orphanRemoval: bool - * } - array{ - * mappedBy: mixed|null, - * inversedBy: mixed|null, - * isOwningSide: bool, - * sourceEntity: class-string, - * targetEntity: string, - * fieldName: mixed, - * fetch: mixed, - * cascade: array<string>, - * isCascadeRemove: bool, - * isCascadePersist: bool, - * isCascadeRefresh: bool, - * isCascadeMerge: bool, - * isCascadeDetach: bool, - * type: int, - * originalField: string, - * originalClass: class-string, - * joinColumns?: array{0: array{name: string, referencedColumnName: string}}|mixed, - * id?: mixed, - * sourceToTargetKeyColumns?: array<string, string>, - * joinColumnFieldNames?: array<string, string>, - * targetToSourceKeyColumns?: array<string, string>, - * orphanRemoval: bool - * } + * }]]> getReflectionClass @@ -670,14 +647,15 @@ $className $columnNames $mapping + $mapping $quotedColumnNames - $this->namespace . '\\' . $className + namespace . '\\' . $className]]> __toString - array{ + , * isCascadeRemove: bool, * isCascadePersist: bool, * isCascadeRefresh: bool, @@ -695,22 +673,46 @@ * originalField: string, * originalClass: class-string, * joinTable?: array{inverseJoinColumns: mixed}|mixed, - * joinTableColumns?: list<mixed>, + * joinTableColumns?: list, * isOnDeleteCascade?: true, * relationToSourceKeyColumns?: array, * relationToTargetKeyColumns?: array, * orphanRemoval: bool - * } + * }]]> + , + * isCascadeRemove: bool, + * isCascadePersist: bool, + * isCascadeRefresh: bool, + * isCascadeMerge: bool, + * isCascadeDetach: bool, + * type: int, + * originalField: string, + * originalClass: class-string, + * joinColumns?: array{0: array{name: string, referencedColumnName: string}}|mixed, + * id?: mixed, + * sourceToTargetKeyColumns?: array, + * joinColumnFieldNames?: array, + * targetToSourceKeyColumns?: array, + * orphanRemoval: bool + * }]]> array{usage: int, region: string|null} class-string|null - list<string> - list<string> + ]]> + ]]> - $this->associationMappings[$fieldName]['mappedBy'] - $this->reflClass - $this->reflFields[$name] - $this->reflFields[$this->identifier[0]] + associationMappings[$fieldName]['mappedBy']]]> + reflClass]]> + reflFields[$name]]]> + reflFields[$this->identifier[0]]]]> $entity @@ -720,16 +722,16 @@ $class $className - $entityResult['entityClass'] - $mapping['targetEntity'] - $mapping['targetEntity'] - $parentReflFields[$embeddedClass['declaredField']] - $parentReflFields[$mapping['declaredField']] - $queryMapping['resultClass'] + + + + + + - $embeddable->reflClass->name - $this->reflClass->name + reflClass->name]]> + reflClass->name]]> getProperty @@ -743,16 +745,16 @@ setValue - $mapping['fieldName'] - $mapping['originalClass'] - $mapping['originalField'] - $mapping['targetEntity'] - $table['name'] - $this->associationMappings[$assocName]['joinColumns'] - $this->associationMappings[$fieldName]['joinColumns'] - $this->associationMappings[$fieldName]['joinColumns'] - $this->associationMappings[$idProperty]['joinColumns'] - $this->associationMappings[$idProperty]['joinColumns'] + + + + + + associationMappings[$assocName]['joinColumns']]]> + associationMappings[$fieldName]['joinColumns']]]> + associationMappings[$fieldName]['joinColumns']]]> + associationMappings[$idProperty]['joinColumns']]]> + associationMappings[$idProperty]['joinColumns']]]> $idGenerator @@ -762,21 +764,22 @@ $identifier - $this->associationMappings - $this->associationMappings - $this->entityListeners - $this->fieldMappings - $this->fullyQualifiedClassName($repositoryClassName) - $this->table - $this->table - $this->table - $this->table - $this->table - $this->table + associationMappings]]> + associationMappings]]> + entityListeners]]> + fieldMappings]]> + fullyQualifiedClassName($repositoryClassName)]]> + table]]> + table]]> + table]]> + table]]> + table]]> + table]]> $mapping !== false $mapping !== false + array_values @@ -799,12 +802,12 @@ new $className() - $this->instances + instances]]> - strrpos($className, '\\') + @@ -819,7 +822,7 @@ getIdentifierColumnNames - $class->associationMappings[$fieldName]['joinColumns'] + associationMappings[$fieldName]['joinColumns']]]> @@ -833,11 +836,11 @@ addNamedQuery - [ - 'sequenceName' => $seqGeneratorAnnot->sequenceName, - 'allocationSize' => $seqGeneratorAnnot->allocationSize, - 'initialValue' => $seqGeneratorAnnot->initialValue, - ] + $seqGeneratorAnnot->sequenceName, + 'allocationSize' => $seqGeneratorAnnot->allocationSize, + 'initialValue' => $seqGeneratorAnnot->initialValue, + ]]]> $mapping @@ -867,14 +870,14 @@ $listenerClassName - $primaryTable['indexes'] - $primaryTable['uniqueConstraints'] + + - $metadata->getReflectionClass() + getReflectionClass()]]> - new ReflectionClass($metadata->name) + name)]]> mapEmbedded @@ -886,18 +889,18 @@ - [ - 'name' => isset($discrColumnAttribute->name) ? (string) $discrColumnAttribute->name : null, - 'type' => isset($discrColumnAttribute->type) ? (string) $discrColumnAttribute->type : 'string', - 'length' => isset($discrColumnAttribute->length) ? (int) $discrColumnAttribute->length : 255, - 'columnDefinition' => isset($discrColumnAttribute->columnDefinition) ? (string) $discrColumnAttribute->columnDefinition : null, - 'enumType' => isset($discrColumnAttribute->enumType) ? (string) $discrColumnAttribute->enumType : null, - ] - [ - 'sequenceName' => $seqGeneratorAttribute->sequenceName, - 'allocationSize' => $seqGeneratorAttribute->allocationSize, - 'initialValue' => $seqGeneratorAttribute->initialValue, - ] + isset($discrColumnAttribute->name) ? (string) $discrColumnAttribute->name : null, + 'type' => isset($discrColumnAttribute->type) ? (string) $discrColumnAttribute->type : 'string', + 'length' => isset($discrColumnAttribute->length) ? (int) $discrColumnAttribute->length : 255, + 'columnDefinition' => isset($discrColumnAttribute->columnDefinition) ? (string) $discrColumnAttribute->columnDefinition : null, + 'enumType' => isset($discrColumnAttribute->enumType) ? (string) $discrColumnAttribute->enumType : null, + ]]]> + $seqGeneratorAttribute->sequenceName, + 'allocationSize' => $seqGeneratorAttribute->allocationSize, + 'initialValue' => $seqGeneratorAttribute->initialValue, + ]]]> $mapping @@ -924,7 +927,7 @@ $listenerClassName - $metadata->getReflectionClass() + getReflectionClass()]]> assert($cacheAttribute instanceof Mapping\Cache) @@ -933,7 +936,7 @@ assert($property instanceof ReflectionProperty) - new ReflectionClass($metadata->name) + name)]]> @@ -941,8 +944,8 @@ $metadata instanceof ClassMetadata - $this->namespace . $this->classNamesForTables[$tableName] - $this->namespace . $this->inflector->classify(strtolower($tableName)) + namespace . $this->classNamesForTables[$tableName]]]> + namespace . $this->inflector->classify(strtolower($tableName))]]> $metadata @@ -951,8 +954,8 @@ class-string - $this->tables[$tableName] - $this->tables[$tableName] + tables[$tableName]]]> + tables[$tableName]]]> getColumns @@ -979,24 +982,24 @@ - (string) $xmlRoot['repository-class'] - isset($xmlRoot['repository-class']) ? (string) $xmlRoot['repository-class'] : null + + addNamedNativeQuery addNamedQuery - [ - 'name' => isset($discrColumn['name']) ? (string) $discrColumn['name'] : null, - 'type' => isset($discrColumn['type']) ? (string) $discrColumn['type'] : 'string', - 'length' => isset($discrColumn['length']) ? (int) $discrColumn['length'] : 255, - 'columnDefinition' => isset($discrColumn['column-definition']) ? (string) $discrColumn['column-definition'] : null, - 'enumType' => isset($discrColumn['enum-type']) ? (string) $discrColumn['enum-type'] : null, - ] + isset($discrColumn['name']) ? (string) $discrColumn['name'] : null, + 'type' => isset($discrColumn['type']) ? (string) $discrColumn['type'] : 'string', + 'length' => isset($discrColumn['length']) ? (int) $discrColumn['length'] : 255, + 'columnDefinition' => isset($discrColumn['column-definition']) ? (string) $discrColumn['column-definition'] : null, + 'enumType' => isset($discrColumn['enum-type']) ? (string) $discrColumn['enum-type'] : null, + ]]]> - $metadata->table + table]]> $mapping @@ -1020,10 +1023,10 @@ * } - [ - 'usage' => $usage, - 'region' => $region, - ] + $usage, + 'region' => $region, + ]]]> $fileExtension @@ -1036,40 +1039,40 @@ array{usage: int|null, region?: string} - $indexXml->options - $uniqueXml->options - $xmlRoot->{'discriminator-column'} - $xmlRoot->{'discriminator-map'} + options]]> + options]]> + {'discriminator-column'}]]> + {'discriminator-map'}]]> - $indexXml->options - $uniqueXml->options - $xmlRoot->{'discriminator-column'} - $xmlRoot->{'discriminator-map'} + options]]> + options]]> + {'discriminator-column'}]]> + {'discriminator-map'}]]> - isset($xmlRoot->cache) - isset($xmlRoot->embedded) - isset($xmlRoot->field) - isset($xmlRoot->indexes) - isset($xmlRoot->options) - isset($xmlRoot->{'association-overrides'}) - isset($xmlRoot->{'attribute-overrides'}) - isset($xmlRoot->{'entity-listeners'}) - isset($xmlRoot->{'lifecycle-callbacks'}) - isset($xmlRoot->{'many-to-many'}) - isset($xmlRoot->{'many-to-one'}) - isset($xmlRoot->{'named-native-queries'}) - isset($xmlRoot->{'named-queries'}) - isset($xmlRoot->{'one-to-many'}) - isset($xmlRoot->{'one-to-one'}) - isset($xmlRoot->{'sql-result-set-mappings'}) - isset($xmlRoot->{'unique-constraints'}) + cache)]]> + embedded)]]> + field)]]> + indexes)]]> + options)]]> + {'association-overrides'})]]> + {'attribute-overrides'})]]> + {'entity-listeners'})]]> + {'lifecycle-callbacks'})]]> + {'many-to-many'})]]> + {'many-to-one'})]]> + {'named-native-queries'})]]> + {'named-queries'})]]> + {'one-to-many'})]]> + {'one-to-one'})]]> + {'sql-result-set-mappings'})]]> + {'unique-constraints'})]]> - $xmlRoot->getName() === 'embeddable' - $xmlRoot->getName() === 'entity' - $xmlRoot->getName() === 'mapped-superclass' + getName() === 'embeddable']]> + getName() === 'entity']]> + getName() === 'mapped-superclass']]> @@ -1078,19 +1081,19 @@ addNamedQuery - [ - 'name' => isset($discrColumn['name']) ? (string) $discrColumn['name'] : null, - 'type' => isset($discrColumn['type']) ? (string) $discrColumn['type'] : 'string', - 'length' => isset($discrColumn['length']) ? (int) $discrColumn['length'] : 255, - 'columnDefinition' => isset($discrColumn['columnDefinition']) ? (string) $discrColumn['columnDefinition'] : null, - 'enumType' => isset($discrColumn['enumType']) ? (string) $discrColumn['enumType'] : null, - ] + isset($discrColumn['name']) ? (string) $discrColumn['name'] : null, + 'type' => isset($discrColumn['type']) ? (string) $discrColumn['type'] : 'string', + 'length' => isset($discrColumn['length']) ? (int) $discrColumn['length'] : 255, + 'columnDefinition' => isset($discrColumn['columnDefinition']) ? (string) $discrColumn['columnDefinition'] : null, + 'enumType' => isset($discrColumn['enumType']) ? (string) $discrColumn['enumType'] : null, + ]]]> - [ - 'usage' => $usage, - 'region' => $region, - ] + $usage, + 'region' => $region, + ]]]> $fileExtension @@ -1123,7 +1126,7 @@ $element - $metadata->table + table]]> $element @@ -1199,7 +1202,7 @@ - $this->embeddedClass + embeddedClass]]> $object @@ -1233,7 +1236,7 @@ - strrpos($className, '\\') + @@ -1248,21 +1251,21 @@ - Collection<TKey, T> + ]]> object|null object|null - $this->association['fetch'] === ClassMetadata::FETCH_EXTRA_LAZY + association['fetch'] === ClassMetadata::FETCH_EXTRA_LAZY ? new LazyCriteriaCollection($persister, $criteria) - : new ArrayCollection($persister->loadCriteria($criteria)) - $this->em->find($this->typeClass->name, $key) + : new ArrayCollection($persister->loadCriteria($criteria))]]> + em->find($this->typeClass->name, $key)]]> - Collection<TKey, T> + ]]> - $this->unwrap()->matching($criteria) + unwrap()->matching($criteria)]]> $offset @@ -1272,46 +1275,46 @@ $value - $this->association - $this->association - $this->association - $this->association['targetEntity'] - $this->backRefFieldName + association]]> + association]]> + association]]> + association['targetEntity']]]> + backRefFieldName]]> - $this->association['fetch'] - $this->association['fetch'] - $this->association['fetch'] - $this->association['fetch'] - $this->association['fetch'] - $this->association['isOwningSide'] - $this->association['orphanRemoval'] - $this->association['targetEntity'] - $this->association['type'] - $this->association['type'] - $this->association['type'] - $this->association['type'] + association['fetch']]]> + association['fetch']]]> + association['fetch']]]> + association['fetch']]]> + association['fetch']]]> + association['isOwningSide']]]> + association['orphanRemoval']]]> + association['targetEntity']]]> + association['type']]]> + association['type']]]> + association['type']]]> + association['type']]]> setValue setValue - [$this->unwrap(), 'add'] + unwrap(), 'add']]]> $association - $collection->getOwner() - $collection->getOwner() - $collection->getOwner() - $collection->getOwner() - $collection->getOwner() - $collection->getOwner() - $collection->getOwner() - $collection->getOwner() - $collection->getOwner() + getOwner()]]> + getOwner()]]> + getOwner()]]> + getOwner()]]> + getOwner()]]> + getOwner()]]> + getOwner()]]> + getOwner()]]> + getOwner()]]> $filterMapping $filterMapping $indexBy @@ -1323,104 +1326,104 @@ $mapping $mapping $mapping - $mapping['joinTableColumns'] - $mapping['relationToSourceKeyColumns'] - $mapping['relationToSourceKeyColumns'][$joinTableColumn] - $mapping['relationToTargetKeyColumns'][$joinTableColumn] - $mapping['sourceEntity'] - $mapping['sourceEntity'] - $mapping['sourceEntity'] - $mapping['sourceEntity'] - $mapping['sourceEntity'] - $mapping['sourceEntity'] - $mapping['sourceEntity'] - $mapping['sourceEntity'] - $mapping['sourceEntity'] - $mapping['targetEntity'] - $mapping['targetEntity'] - $mapping['targetEntity'] - $mapping['targetEntity'] - $mapping['targetEntity'] - $mapping['targetEntity'] - $mapping['targetEntity'] - $mapping['targetEntity'] - $mapping['targetEntity'] + + + + + + + + + + + + + + + + + + + + + + $owner - $mapping['indexBy'] - $mapping['isOwningSide'] - $mapping['isOwningSide'] - $mapping['isOwningSide'] - $mapping['isOwningSide'] - $mapping['isOwningSide'] - $mapping['joinTable'] - $mapping['joinTable'] - $mapping['joinTable'] - $mapping['joinTable'] - $mapping['joinTable']['inverseJoinColumns'] - $mapping['joinTable']['inverseJoinColumns'] - $mapping['joinTable']['inverseJoinColumns'] - $mapping['joinTable']['joinColumns'] - $mapping['joinTable']['joinColumns'] - $mapping['joinTable']['joinColumns'] - $mapping['joinTableColumns'] - $mapping['mappedBy'] - $mapping['mappedBy'] - $mapping['mappedBy'] - $mapping['relationToSourceKeyColumns'] - $mapping['relationToSourceKeyColumns'] - $mapping['relationToSourceKeyColumns'] - $mapping['relationToSourceKeyColumns'][$joinTableColumn] - $mapping['relationToTargetKeyColumns'] - $mapping['relationToTargetKeyColumns'][$joinTableColumn] - $mapping['sourceEntity'] - $mapping['sourceEntity'] - $mapping['sourceEntity'] - $mapping['sourceEntity'] - $mapping['sourceEntity'] - $mapping['sourceEntity'] - $mapping['sourceEntity'] - $mapping['sourceEntity'] - $mapping['targetEntity'] - $mapping['targetEntity'] - $mapping['targetEntity'] - $mapping['targetEntity'] - $mapping['targetEntity'] - $mapping['targetEntity'] - $mapping['targetEntity'] - $mapping['targetEntity'] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - $associationSourceClass->associationMappings - $sourceClass->associationMappings - $targetClass->associationMappings + associationMappings]]> + associationMappings]]> + associationMappings]]> $joinColumns - $mapping['joinTable']['inverseJoinColumns'] - $mapping['joinTable']['inverseJoinColumns'] - $mapping['joinTable']['joinColumns'] - $mapping['joinTable']['joinColumns'] - $mapping['joinTable']['joinColumns'] - $mapping['joinTableColumns'] - $mapping['relationToSourceKeyColumns'] + + + + + + + getFieldForColumn getFieldForColumn - $association['joinTable'] - $association['joinTable'] - $association['joinTable'] - $association['joinTable'] + + + + $mapping[$sourceRelationMode] $mapping[$targetRelationMode] - $mapping['joinTable'] - $mapping['joinTableColumns'] - $mapping['joinTableColumns'] - $mapping['relationToSourceKeyColumns'] + + + + @@ -1429,48 +1432,48 @@ $numDeleted - $this->conn->executeStatement($statement, $parameters) + conn->executeStatement($statement, $parameters)]]> int int - $collection->getOwner() - $collection->getOwner() - $collection->getOwner() + getOwner()]]> + getOwner()]]> + getOwner()]]> $mapping - $mapping['mappedBy'] - $mapping['mappedBy'] - $mapping['sourceEntity'] - $mapping['sourceEntity'] - $mapping['targetEntity'] - $mapping['targetEntity'] - $mapping['targetEntity'] - $mapping['targetEntity'] - $mapping['targetEntity'] - $mapping['targetEntity'] + + + + + + + + + + - $mapping['mappedBy'] - $mapping['mappedBy'] - $mapping['mappedBy'] - $mapping['mappedBy'] - $mapping['orphanRemoval'] - $mapping['sourceEntity'] - $mapping['sourceEntity'] - $mapping['targetEntity'] - $mapping['targetEntity'] - $mapping['targetEntity'] - $mapping['targetEntity'] - $mapping['targetEntity'] - $mapping['targetEntity'] + + + + + + + + + + + + + - $targetClass->associationMappings + associationMappings]]> - $targetClass->associationMappings[$mapping['mappedBy']]['joinColumns'] + associationMappings[$mapping['mappedBy']]['joinColumns']]]> @@ -1478,12 +1481,12 @@ $value === null - $em->getMetadataFactory() + getMetadataFactory()]]> $hints $hints - [Query::HINT_REFRESH => true] - [UnitOfWork::HINT_DEFEREAGERLOAD => true] - [UnitOfWork::HINT_DEFEREAGERLOAD => true] + true]]]> + true]]]> + true]]]> loadOneToOneEntity @@ -1501,23 +1504,23 @@ executeInserts expandCriteriaParameters expandParameters - list<mixed> + ]]> $targetEntity $targetEntity - $assoc['mappedBy'] + $association $type - $assoc['isOwningSide'] + - $class->associationMappings - $class->associationMappings + associationMappings]]> + associationMappings]]> getValue @@ -1529,25 +1532,25 @@ setValue - $assoc['inversedBy'] - $assoc['joinColumns'] - $assoc['joinColumns'] - $assoc['relationToTargetKeyColumns'] - $assoc['sourceToTargetKeyColumns'] - $association['joinColumns'] - $association['joinColumns'] - $association['joinColumns'] - $association['joinTable'] - $association['joinTable'] - $association['joinTable'] - $association['joinTable'] - $owningAssoc['targetToSourceKeyColumns'] - $owningAssoc['targetToSourceKeyColumns'] - $this->class->associationMappings[$fieldName]['joinColumns'] - $this->class->associationMappings[$idField]['joinColumns'] + + + + + + + + + + + + + + + class->associationMappings[$fieldName]['joinColumns']]]> + class->associationMappings[$idField]['joinColumns']]]> - $this->currentPersisterContext->sqlTableAliases + currentPersisterContext->sqlTableAliases]]> @@ -1574,14 +1577,14 @@ executeInserts - $assoc['targetToSourceKeyColumns'] - $mapping['joinColumns'] - $mapping['joinColumns'] + + + - $assoc['joinColumns'] + $columnList @@ -1599,18 +1602,18 @@ $classMetadata - $classMetadata->getReflectionProperties() - $em->getMetadataFactory() - $em->getMetadataFactory() + getReflectionProperties()]]> + getMetadataFactory()]]> + getMetadataFactory()]]> - $metadata->isEmbeddedClass - $metadata->isMappedSuperclass - $proxy->__isCloning + isEmbeddedClass]]> + isMappedSuperclass]]> + __isCloning]]> - $property->name - $property->name + name]]> + name]]> setAccessible @@ -1631,13 +1634,13 @@ $sqlParams - $this->parse()->getSqlExecutor()->getSqlStatements() + parse()->getSqlExecutor()->getSqlStatements()]]> - list<string>|string + |string]]> - $this->getDQL() + getDQL()]]> evictEntityRegion @@ -1718,34 +1721,34 @@ - $parser->SimpleArithmeticExpression() + SimpleArithmeticExpression()]]> - $parser->ArithmeticPrimary() - $parser->ArithmeticPrimary() + ArithmeticPrimary()]]> + ArithmeticPrimary()]]> - $parser->ArithmeticPrimary() - $parser->ArithmeticPrimary() + ArithmeticPrimary()]]> + ArithmeticPrimary()]]> - $this->intervalExpression->dispatch($sqlWalker) - $this->intervalExpression->dispatch($sqlWalker) - $this->intervalExpression->dispatch($sqlWalker) - $this->intervalExpression->dispatch($sqlWalker) - $this->intervalExpression->dispatch($sqlWalker) - $this->intervalExpression->dispatch($sqlWalker) - $this->intervalExpression->dispatch($sqlWalker) + intervalExpression->dispatch($sqlWalker)]]> + intervalExpression->dispatch($sqlWalker)]]> + intervalExpression->dispatch($sqlWalker)]]> + intervalExpression->dispatch($sqlWalker)]]> + intervalExpression->dispatch($sqlWalker)]]> + intervalExpression->dispatch($sqlWalker)]]> + intervalExpression->dispatch($sqlWalker)]]> - $parser->ArithmeticPrimary() - $parser->ArithmeticPrimary() + ArithmeticPrimary()]]> + ArithmeticPrimary()]]> null @@ -1753,27 +1756,27 @@ null - $this->unit->value + unit->value]]> - $parser->ArithmeticPrimary() - $parser->ArithmeticPrimary() + ArithmeticPrimary()]]> + ArithmeticPrimary()]]> - $this->intervalExpression->dispatch($sqlWalker) - $this->intervalExpression->dispatch($sqlWalker) - $this->intervalExpression->dispatch($sqlWalker) - $this->intervalExpression->dispatch($sqlWalker) - $this->intervalExpression->dispatch($sqlWalker) - $this->intervalExpression->dispatch($sqlWalker) - $this->intervalExpression->dispatch($sqlWalker) + intervalExpression->dispatch($sqlWalker)]]> + intervalExpression->dispatch($sqlWalker)]]> + intervalExpression->dispatch($sqlWalker)]]> + intervalExpression->dispatch($sqlWalker)]]> + intervalExpression->dispatch($sqlWalker)]]> + intervalExpression->dispatch($sqlWalker)]]> + intervalExpression->dispatch($sqlWalker)]]> - $this->unit->value + unit->value]]> @@ -1783,57 +1786,57 @@ - $assoc['joinColumns'] + - $this->stringPrimary + stringPrimary]]> - $this->simpleArithmeticExpression + simpleArithmeticExpression]]> - $parser->SimpleArithmeticExpression() + SimpleArithmeticExpression()]]> - $this->stringPrimary + stringPrimary]]> - $parser->SimpleArithmeticExpression() - $parser->SimpleArithmeticExpression() + SimpleArithmeticExpression()]]> + SimpleArithmeticExpression()]]> - $targetClass->associationMappings - $targetClass->associationMappings + associationMappings]]> + associationMappings]]> - $owningAssoc['joinTable'] - $owningAssoc['targetToSourceKeyColumns'] + + - $parser->SimpleArithmeticExpression() + SimpleArithmeticExpression()]]> - $parser->SimpleArithmeticExpression() - $parser->SimpleArithmeticExpression() + SimpleArithmeticExpression()]]> + SimpleArithmeticExpression()]]> - $this->stringPrimary + stringPrimary]]> @@ -1863,13 +1866,13 @@ - $this->simpleStateFieldPathExpression + simpleStateFieldPathExpression]]> dispatch - $sqlWalker->walkIndexBy($this) + walkIndexBy($this)]]> $sqlWalker @@ -2041,14 +2044,14 @@ int - $this->_sqlStatements + _sqlStatements]]> MultiTableDeleteExecutor MultiTableDeleteExecutor - $this->_sqlStatements + _sqlStatements]]> @@ -2059,22 +2062,22 @@ int - $this->_sqlStatements + _sqlStatements]]> MultiTableUpdateExecutor MultiTableUpdateExecutor - $this->_sqlStatements + _sqlStatements]]> - $this->_sqlStatements + _sqlStatements]]> - $this->_sqlStatements + _sqlStatements]]> SingleSelectExecutor @@ -2082,13 +2085,13 @@ - $conn->executeStatement($this->_sqlStatements, $params, $types) + executeStatement($this->_sqlStatements, $params, $types)]]> int - $this->_sqlStatements + _sqlStatements]]> SingleTableDeleteUpdateExecutor @@ -2108,7 +2111,7 @@ - $this->parts + parts]]> __toString @@ -2134,13 +2137,13 @@ - $this->arguments + arguments]]> __toString - list<mixed> + ]]> @@ -2153,7 +2156,7 @@ __toString - $this->conditionType + conditionType]]> @@ -2194,7 +2197,7 @@ static function ($value) use ($connection, $param) { - $this->parameters + parameters]]> @@ -2211,20 +2214,20 @@ AST\SelectStatement|AST\UpdateStatement|AST\DeleteStatement - $this->queryComponents + queryComponents]]> $factors[0] $primary $terms[0] - $this->CollectionMemberExpression() - $this->ComparisonExpression() - $this->EmptyCollectionComparisonExpression() - $this->ExistsExpression() - $this->InExpression() - $this->InstanceOfExpression() - $this->LikeExpression() - $this->NullComparisonExpression() + CollectionMemberExpression()]]> + ComparisonExpression()]]> + EmptyCollectionComparisonExpression()]]> + ExistsExpression()]]> + InExpression()]]> + InstanceOfExpression()]]> + LikeExpression()]]> + NullComparisonExpression()]]> AST\ArithmeticFactor @@ -2246,41 +2249,41 @@ $statement - strrpos($fromClassName, '\\') + $AST $conditionalExpression $expr $pathExp - $this->ConditionalExpression() - $this->ConditionalExpression() - $this->lexer->getLiteral($token) - $this->lexer->getLiteral($token) - $this->lexer->getLiteral($token) + ConditionalExpression()]]> + ConditionalExpression()]]> + lexer->getLiteral($token)]]> + lexer->getLiteral($token)]]> + lexer->getLiteral($token)]]> - $this->ConditionalExpression() - $this->ConditionalExpression() - $this->SimpleArithmeticExpression() + ConditionalExpression()]]> + ConditionalExpression()]]> + SimpleArithmeticExpression()]]> $dql - $this->query->getDQL() + query->getDQL()]]> - $this->lexer->glimpse()['type'] - $token['value'] + lexer->glimpse()['type']]]> + - $this->lexer->glimpse() + lexer->glimpse()]]> $token $args - $this->lexer->lookahead !== null + lexer->lookahead !== null]]> $AST instanceof AST\SelectStatement @@ -2294,10 +2297,10 @@ - new ArrayCollection($this->parameters) + parameters)]]> - ArrayCollection<int, mixed> + ]]> Comparison::EQ @@ -2317,14 +2320,14 @@ __toString - $associationMapping['joinColumns'] - $associationMapping['joinColumns'] - $associationMapping['joinColumns'] + + + - '' + is_string($expression) @@ -2391,45 +2394,45 @@ $query - $aggExpression->pathExpression - $whereClause->conditionalExpression + pathExpression]]> + conditionalExpression]]> - $AST->whereClause - $AST->whereClause - $AST->whereClause - $arithmeticExpr->simpleArithmeticExpression - $arithmeticExpr->subselect + whereClause]]> + whereClause]]> + whereClause]]> + simpleArithmeticExpression]]> + subselect]]> $condExpr - $identificationVariableDecl->rangeVariableDeclaration - $subselect->whereClause + rangeVariableDeclaration]]> + whereClause]]> - $targetClass->associationMappings - $targetClass->associationMappings - $this->scalarResultAliasMap - $this->scalarResultAliasMap + associationMappings]]> + associationMappings]]> + scalarResultAliasMap]]> + scalarResultAliasMap]]> dispatch - $assoc['joinColumns'] - $assoc['joinColumns'] - $assoc['joinColumns'] - $assoc['joinTable'] - $assoc['sourceToTargetKeyColumns'] - $assoc['targetToSourceKeyColumns'] - $assoc['type'] - $assoc['type'] - $association['sourceToTargetKeyColumns'] - $association['targetToSourceKeyColumns'] - $owningAssoc['joinTable'] - $owningAssoc['targetToSourceKeyColumns'] + + + + + + + + + + + + $whereClause !== null - ($factor->not ? 'NOT ' : '') . $this->walkConditionalPrimary($factor->conditionalPrimary) + not ? 'NOT ' : '') . $this->walkConditionalPrimary($factor->conditionalPrimary)]]> @@ -2460,14 +2463,14 @@ TreeWalker|null - class-string<TreeWalker>|false + |false]]> - $this->walkers + walkers]]> - $this->walkers - $this->walkers + walkers]]> + walkers]]> @@ -2476,15 +2479,15 @@ $args $args $args - [$rootAlias => $join] - [$rootAlias => $join] + $join]]]> + $join]]]> getRootAlias getRootAlias - ! $filteredParameters->isEmpty() ? $filteredParameters->first() : null + isEmpty() ? $filteredParameters->first() : null]]> Parameter|null @@ -2500,8 +2503,8 @@ __toString - list<string> - list<string> + ]]> + ]]> $spacePos @@ -2524,8 +2527,8 @@ - $this->repositoryList[$repositoryHash] - $this->repositoryList[$repositoryHash] = $this->createRepository($entityManager, $entityName) + repositoryList[$repositoryHash]]]> + repositoryList[$repositoryHash] = $this->createRepository($entityManager, $entityName)]]> ObjectRepository @@ -2614,7 +2617,7 @@ configure - $class->name + name]]> @@ -2637,7 +2640,7 @@ configure - $metadata->name + name]]> @@ -2645,10 +2648,10 @@ configure - $metadata->name + name]]> - $em->getConfiguration()->getProxyDir() + getConfiguration()->getProxyDir()]]> @@ -2659,7 +2662,7 @@ configure - $metadata->customRepositoryClassName + customRepositoryClassName]]> @@ -2672,7 +2675,7 @@ - $metadata->entityListeners + entityListeners]]> getAllClassNames @@ -2680,7 +2683,7 @@ - Debug::dump($resultSet, (int) $input->getOption('depth'), true, false) + getOption('depth'), true, false)]]> configure @@ -2691,7 +2694,7 @@ int - $this->executeSchemaCommand($input, $output, new SchemaTool($em), $metadatas, $ui) + executeSchemaCommand($input, $output, new SchemaTool($em), $metadatas, $ui)]]> @@ -2713,8 +2716,8 @@ configure - $this->getName() - $this->getName() + getName()]]> + getName()]]> @@ -2725,8 +2728,8 @@ configure - $this->getName() - $this->getName() + getName()]]> + getName()]]> @@ -2744,7 +2747,7 @@ - $column['type'] + @@ -2758,17 +2761,17 @@ - $this->getClassToExtend() - $this->getClassToExtend() ?: $metadata->name - $this->getClassToExtend() ?: $metadata->name - array_map('strlen', $paramTypes) + getClassToExtend()]]> + getClassToExtend() ?: $metadata->name]]> + getClassToExtend() ?: $metadata->name]]> + $tokens[$i - 1] $last - strrpos($metadata->name, '\\') + name, '\\')]]> $variableType @@ -2780,7 +2783,7 @@ (bool) $embeddablesImmutable - isset($metadata->lifecycleCallbacks) + lifecycleCallbacks)]]> @@ -2790,7 +2793,7 @@ $fullClassName - strrpos($fullClassName, '\\') + $repositoryName @@ -2827,7 +2830,7 @@ string - $this->_outputDir + _outputDir]]> @@ -2842,7 +2845,7 @@ - $metadata->changeTrackingPolicy + changeTrackingPolicy]]> AbstractExporter @@ -2851,50 +2854,50 @@ $_extension - $associationMapping['joinColumns'] - $associationMapping['orphanRemoval'] + + - $metadata->table + table]]> - $metadata->changeTrackingPolicy - $simpleXml->asXML() + changeTrackingPolicy]]> + asXML()]]> AbstractExporter - $field['version'] + $_extension - $simpleXml->asXML() + asXML()]]> addAttribute - $field['associationKey'] - isset($field['associationKey']) && $field['associationKey'] + + - isset($metadata->lifecycleCallbacks) + lifecycleCallbacks)]]> - $metadata->changeTrackingPolicy + changeTrackingPolicy]]> AbstractExporter - ['name' => null] + null]]]> $array @@ -2903,19 +2906,19 @@ $array - array<string, mixed>&array{entityListeners: array<class-string, array<string, array{string}>>} + &array{entityListeners: array>}]]> $_extension - $associationMapping['joinColumns'] - $associationMapping['orphanRemoval'] - $associationMapping['orphanRemoval'] + + + - $metadata->table - isset($metadata->lifecycleCallbacks) + table]]> + lifecycleCallbacks)]]> @@ -2923,7 +2926,7 @@ $query - $rootClass->associationMappings[$property]['joinColumns'] + associationMappings[$property]['joinColumns']]]> @@ -2931,21 +2934,21 @@ $query - strrpos($orderByItemString, ' ') + - $orderByClause->orderByItems + orderByItems]]> - $AST->orderByClause - $query->getFirstResult() - $query->getMaxResults() + orderByClause]]> + getFirstResult()]]> + getMaxResults()]]> - $orderByClause->orderByItems + orderByItems]]> - $rootClass->associationMappings[$property]['joinColumns'] + associationMappings[$property]['joinColumns']]]> @@ -2963,17 +2966,17 @@ - $AST->whereClause->conditionalExpression instanceof ConditionalExpression - || $AST->whereClause->conditionalExpression instanceof ConditionalFactor - $AST->whereClause->conditionalExpression instanceof ConditionalFactor - $AST->whereClause->conditionalExpression instanceof ConditionalPrimary + whereClause->conditionalExpression instanceof ConditionalExpression + || $AST->whereClause->conditionalExpression instanceof ConditionalFactor]]> + whereClause->conditionalExpression instanceof ConditionalFactor]]> + whereClause->conditionalExpression instanceof ConditionalPrimary]]> - $AST->whereClause->conditionalExpression + whereClause->conditionalExpression]]> - $AST->whereClause->conditionalExpression instanceof ConditionalExpression - || $AST->whereClause->conditionalExpression instanceof ConditionalFactor + whereClause->conditionalExpression instanceof ConditionalExpression + || $AST->whereClause->conditionalExpression instanceof ConditionalFactor]]> @@ -2990,13 +2993,13 @@ $referencedFieldName - $assoc['joinColumns'] - $class->getAssociationMapping($fieldName)['joinColumns'] - $fieldMapping['precision'] - $fieldMapping['scale'] - $idMapping['joinColumns'] - $mapping['joinColumns'] - $mapping['joinTable'] + + getAssociationMapping($fieldName)['joinColumns']]]> + + + + + is_numeric($indexName) @@ -3011,14 +3014,14 @@ - $assoc['joinColumns'] - $assoc['joinTable'] - $assoc['relationToSourceKeyColumns'] - $assoc['relationToTargetKeyColumns'] + + + + - $assoc['orderBy'] !== null - isset($assoc['orderBy']) && $assoc['orderBy'] !== null + + @@ -3026,12 +3029,12 @@ $paths - new ClassLoader('Doctrine', $directory) - new ClassLoader('Symfony\Component', $directory . '/Doctrine') + + - require_once $directory . '/Doctrine/Common/ClassLoader.php' - require_once dirname($directory) . '/src/ClassLoader.php' + + @@ -3042,14 +3045,14 @@ $collectionToDelete $collectionToUpdate - $em->getMetadataFactory() + getMetadataFactory()]]> object - $this->entityChangeSets - $this->entityChangeSets + entityChangeSets]]> + entityChangeSets]]> $managedCopy @@ -3061,36 +3064,36 @@ $entityState - $this->identityMap[$rootClassName][$idHash] + identityMap[$rootClassName][$idHash]]]> $value - $this->identityMap[$rootClassName] + identityMap[$rootClassName]]]> $assoc $assoc $assoc $assoc - $assoc['targetEntity'] - $class->getTypeOfField($class->getSingleIdentifierFieldName()) - $collection->getOwner() - $collection->getOwner() - $collectionToDelete->getMapping() - $collectionToUpdate->getMapping() + + getTypeOfField($class->getSingleIdentifierFieldName())]]> + getOwner()]]> + getOwner()]]> + getMapping()]]> + getMapping()]]> $entity $entity $owner - $assoc['targetEntity'] - $assoc['type'] + + - $class->reflFields - $targetClass->reflFields + reflFields]]> + reflFields]]> buildCachedCollectionPersister @@ -3126,9 +3129,9 @@ setValue - $assoc['joinColumns'] - $assoc['orphanRemoval'] - $assoc['targetToSourceKeyColumns'] + + + unwrap @@ -3136,8 +3139,8 @@ unwrap - $i >= 0 && $this->entityDeletions - $this->entityDeletions + = 0 && $this->entityDeletions]]> + entityDeletions]]> is_array($entity) @@ -3148,21 +3151,21 @@ - $rootClassMetadata->name - $rootClassMetadata->subClasses + name]]> + subClasses]]> - $class->associationMappings[$field]['joinColumns'] + associationMappings[$field]['joinColumns']]]> - $assoc['mappedBy'] + - $assoc['joinTable'] + From 4759a1bf756b80eaa15696300cad65c58bb743ef Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Tue, 28 Feb 2023 08:29:28 +0100 Subject: [PATCH 10/11] Make data providers static (#10544) --- .../Tests/ORM/Tools/Pagination/RootTypeWalkerTest.php | 4 ++-- .../Doctrine/Tests/ORM/Tools/Pagination/WhereInWalkerTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Doctrine/Tests/ORM/Tools/Pagination/RootTypeWalkerTest.php b/tests/Doctrine/Tests/ORM/Tools/Pagination/RootTypeWalkerTest.php index b0ce0137b94..160ee998c77 100644 --- a/tests/Doctrine/Tests/ORM/Tools/Pagination/RootTypeWalkerTest.php +++ b/tests/Doctrine/Tests/ORM/Tools/Pagination/RootTypeWalkerTest.php @@ -34,8 +34,8 @@ public function testResolveTypeMapping(string $dqlQuery, string $expectedType): self::assertSame($expectedType, $query->getSQL()); } - /** @return iterable */ - public function exampleQueries(): Generator + /** @return Generator */ + public static function exampleQueries(): Generator { yield 'Entity with #Id column of special type' => [ 'SELECT e.id4 FROM ' . AuxiliaryEntity::class . ' e', diff --git a/tests/Doctrine/Tests/ORM/Tools/Pagination/WhereInWalkerTest.php b/tests/Doctrine/Tests/ORM/Tools/Pagination/WhereInWalkerTest.php index 1f4427f1a71..1f1710d2cf1 100644 --- a/tests/Doctrine/Tests/ORM/Tools/Pagination/WhereInWalkerTest.php +++ b/tests/Doctrine/Tests/ORM/Tools/Pagination/WhereInWalkerTest.php @@ -27,7 +27,7 @@ public function testDqlQueryTransformation(string $dql, string $expectedSql): vo self::assertEquals([0], $result->getSqlParameterPositions(WhereInWalker::PAGINATOR_ID_ALIAS)); } - public function exampleQueries(): Generator + public static function exampleQueries(): Generator { yield 'no WHERE condition' => [ 'SELECT u, g FROM Doctrine\Tests\ORM\Tools\Pagination\User u JOIN u.groups g', From a28e2d827745c3f9dfbaa70aae453ce8d92a5899 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Tue, 28 Feb 2023 13:35:35 +0100 Subject: [PATCH 11/11] Ignore the cache dir of PHPUnit 10 (#10546) --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 4a93c4a573b..4b84f4214b1 100644 --- a/.gitignore +++ b/.gitignore @@ -15,5 +15,6 @@ vendor/ /tests/Doctrine/Performance/history.db /.phpcs-cache composer.lock +.phpunit.cache .phpunit.result.cache /*.phpunit.xml