diff --git a/composer.json b/composer.json index 59950ba165c..e435f8addc2 100644 --- a/composer.json +++ b/composer.json @@ -43,7 +43,7 @@ "psr/log": "^1 || ^2 || ^3", "squizlabs/php_codesniffer": "3.7.2", "symfony/cache": "^5.4 || ^6.2 || ^7.0", - "vimeo/psalm": "5.16.0" + "vimeo/psalm": "5.22.2" }, "suggest": { "ext-dom": "Provides support for XSD validation for XML mapping files", diff --git a/psalm-baseline.xml b/psalm-baseline.xml index aef7549149d..ccb9a965194 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,28 +1,28 @@ - + isEmpty() ? $filteredParameters->first() : null]]> - Parameter|null + - $alias - $data - $data + + + - $stmt + - getCacheLogger - getQueryCache + + - getTimestampRegion + @@ -32,12 +32,12 @@ ->getCacheFactory()]]> - getCacheFactory + - getCacheRegion + @@ -52,23 +52,23 @@ class]]> - getCacheLogger + - assert($cm instanceof ClassMetadata) + - getCacheRegion - resolveAssociationEntries - resolveAssociationEntries - storeEntityCache - storeEntityCache + + + + + - $cache - $entityKey + + identifiers]]> @@ -77,8 +77,8 @@ getOwner()]]> - buildCollectionHydrator - getCacheFactory + + @@ -98,13 +98,13 @@ getOwner()]]> - lock - lock + + - $cacheEntry + class]]> @@ -117,31 +117,31 @@ getCache()]]> - getCacheFactory - getTimestampRegion + + - assert($metadata instanceof ClassMetadata) + - getCacheRegion - getCacheRegion - getCacheRegion - getCacheRegion - loadCollectionCache - loadCollectionCache - storeCollectionCache - storeCollectionCache - storeEntityCache + + + + + + + + + - $isChanged + - lock - lock + + @@ -151,7 +151,7 @@ - $className + @@ -159,17 +159,17 @@ wrapped->getClassMetadata($className)]]> - ClassMetadata + - $className + - $entity - $entity - $entity + + + name ? $entity : null]]> load($sortedId, null, null, [], $lockMode)]]> loadById($sortedId)]]> @@ -177,32 +177,32 @@ metadataFactory->getMetadataFor($className)]]> - ClassMetadataFactory - Mapping\ClassMetadata + + getProxyDir()]]> getProxyNamespace()]]> - createCache - getCacheFactory + + - new $metadataFactoryClassName() + - (string) $hydrationMode + load($criteria, null, null, [], null, 1, $orderBy)]]> - new LazyCriteriaCollection($persister, $criteria) + &Selectable]]> - T|null + loadAll($criteria, $orderBy, $limit, $offset)]]> @@ -213,34 +213,34 @@ - $entity + - return $rowData; - return $rowData; + + - $index + - $index + - $result[$resultKey] - $result[$resultKey] + + - $result + - $baseElement + resultPointers[$parent]]]> @@ -252,26 +252,26 @@ - $element + - $index + - $parentObject - $parentObject - $parentObject - $parentObject - $parentObject - $parentObject - $parentObject + + + + + + + - getValue - getValue - getValue - setValue - setValue + + + + + @@ -279,15 +279,15 @@ - $mapping + - static + - $repositoryClassName + @@ -298,38 +298,38 @@ columnNames]]> - $mapping - $mapping - $mapping - $mapping - $overrideMapping + + + + + - ReflectionClass|null + - $definition + reflClass]]> - $entity + declaredField]]]> - getProperty - getProperty - getProperty - getValue - getValue - getValue - instantiate - setValue - setValue + + + + + + + + + @@ -339,26 +339,26 @@ - $idGenerator - $table + + - $mapping !== false - $mapping !== false + + - array_values + table]]> table]]> - null - null + + - $platformFamily + @@ -372,28 +372,28 @@ em]]> - getAllClassNames - getConfiguration - getConfiguration - getConfiguration - getConnection - hasListeners - hasListeners - loadMetadataForClass + + + + + + + + generatorType]]> idGenerator]]> - assert($owningSide instanceof ManyToManyOwningSideMapping || + + $owningSide instanceof ManyToOneAssociationMapping)]]> - new $className() + instances]]> @@ -406,18 +406,18 @@ - $mapping + - array + - array_merge(self::DEFAULT_TYPED_FIELD_MAPPINGS, $typedFieldMappings) + - $mapping + $seqGeneratorAttribute->sequenceName, 'allocationSize' => $seqGeneratorAttribute->allocationSize, @@ -425,13 +425,13 @@ ]]]> - $mapping + - $metadata + - array{ + + * }]]> getReflectionClass()]]> - assert($cacheAttribute instanceof Mapping\Cache) - assert($method instanceof ReflectionMethod) - assert($method instanceof ReflectionMethod) - assert($property instanceof ReflectionProperty) + + + + name)]]> @@ -460,35 +460,35 @@ - $metadata instanceof ClassMetadata + - $metadata + tables[$tableName]]]> tables[$tableName]]]> - getColumns - getColumns - getIndexes + + + - $fileExtension - $prefixes + + - $mapping + - $columnDef + cacheToArray($manyToManyElement->cache)]]> cacheToArray($manyToOneElement->cache)]]> cacheToArray($oneToManyElement->cache)]]> @@ -502,15 +502,15 @@ {'discriminator-map'}]]> - $mapping - $result + + $usage, 'region' => $region, ]]]> - array{ + - array{usage: int|null, region?: string} - loadMappingFile + * }]]> + + - $metadata + {'discriminator-column'}]]> @@ -544,17 +544,17 @@ - ManyToManyInverseSideMapping + - $joinTable + - OneToManyAssociationMapping + mappedBy)]]> @@ -562,49 +562,49 @@ - OneToOneInverseSideMapping + - $object + - ReflectionEmbeddedProperty - ReflectionEmbeddedProperty + + - $object + - ReflectionEnumProperty - ReflectionEnumProperty + + - ReflectionReadonlyProperty - ReflectionReadonlyProperty + + - $mapping + - static + - $instance - $mapping + + - static - static + + @@ -614,7 +614,7 @@ - $sql + @@ -634,15 +634,15 @@ unwrap()->matching($criteria)]]> - $value - $value + + backRefFieldName]]> - setValue - setValue + + unwrap(), 'add']]]> @@ -657,11 +657,11 @@ getOwner()]]> getOwner()]]> getOwner()]]> - $owner + - getFieldForColumn - getFieldForColumn + + @@ -673,33 +673,33 @@ - $value === null + - $hints - $hints + + true]]]> true]]]> true]]]> - $newValue - [$params, $types] - [$sqlParams, $sqlTypes] + + + - array - array + + ]]> - getValue - getValue - getValue - getValue - getValue - getValue - setValue + + + + + + + currentPersisterContext->sqlTableAliases]]> @@ -707,33 +707,33 @@ - $autoloader + - $autoloader + - Closure(string): void + - require $file + - $className - substr($className, $pos + Proxy::MARKER_LENGTH + 2) + + - string + - $classMetadata + - Closure + proxyFactories]]> @@ -746,10 +746,10 @@ proxyFactories[$className] = $proxyFactory]]> - $i + - $i + @@ -760,22 +760,25 @@ $initializer($object, $proxy); }, $skippedProperties)]]> + + + - require $fileName + - $sqlParams + getDQL()]]> - evictEntityRegion + - $parserResult + @@ -812,7 +815,7 @@ - $sqlWalker + @@ -822,36 +825,36 @@ - walkJoinPathExpression + - walkJoinVariableDeclaration + - walkWhenClauseExpression + - walkWhenClauseExpression + - $numDeleted + - int + sqlStatements]]> - MultiTableDeleteExecutor + sqlStatements]]> @@ -859,13 +862,13 @@ - $paramTypes + - $numUpdated + - int + sqlStatements]]> @@ -881,19 +884,19 @@ executeStatement($this->sqlStatements, $params, $types)]]> - int + sqlStatements]]> - SingleTableDeleteUpdateExecutor + - $allowedClasses - $parts + + @@ -906,7 +909,7 @@ - $parts + @@ -916,19 +919,19 @@ - $parts + - $allowedClasses - $parts + + - $allowedClasses - $parts + + @@ -938,39 +941,39 @@ - $stringPattern + - AST\SelectStatement|AST\UpdateStatement|AST\DeleteStatement + queryComponents]]> - new $functionClass($functionName) - new $functionClass($functionName) - new $functionClass($functionName) + + + - $function - $function - $function + + + - $statement + - $AST - $expr + + lexer->getLiteral($token)]]> lexer->getLiteral($token)]]> lexer->getLiteral($token)]]> - $dql + query->getDQL()]]> value]]> @@ -993,31 +996,29 @@ ]]> - Comparison::EQ + - throw QueryException::invalidLiteral($literal) + - $expr + simpleArithmeticExpression]]> subselect]]> - $condExpr - elseScalarExpression]]> + rangeVariableDeclaration]]> caseOperand]]> - elseScalarExpression]]> scalarResultAliasMap]]> scalarResultAliasMap]]> - dispatch + @@ -1026,28 +1027,28 @@ $join]]]> - getRootAlias - getRootAlias + + isEmpty() ? $filteredParameters->first() : null]]> - Parameter|null + - new ArrayCollection($parameters) + - $spacePos - $spacePos + + - $spacePos - $spacePos + + - $dqlPart + @@ -1055,20 +1056,20 @@ repositoryList[$repositoryHash] ??= $this->createRepository($entityManager, $entityName)]]> - EntityRepository + - new $repositoryClassName($entityManager, $metadata) + - evictAll + - evictAll + @@ -1081,7 +1082,7 @@ - getAllClassNames + @@ -1089,20 +1090,20 @@ entityListeners]]> - getAllClassNames + - $metadatas - $metadatas + + - $metadatas - $metadatas - $metadatas + + + getName()]]> @@ -1111,7 +1112,7 @@ - $metadatas + getName()]]> @@ -1120,15 +1121,15 @@ - new ArrayIterator($metadatas) + - MetadataFilter + - $state === UnitOfWork::STATE_DETACHED + @@ -1147,46 +1148,46 @@ - $parameters + - $orderByClause + - $classes + - $asset + - $referencedFieldName + - is_numeric($indexName) + - $indexName + - $collectionToDelete - $collectionToUpdate + + entityChangeSets]]> entityChangeSets]]> - $entityState - $entityState + + - $value + identityMap[$rootClassName]]]> @@ -1195,42 +1196,42 @@ getTypeOfField($class->getSingleIdentifierFieldName())]]> getOwner()]]> getOwner()]]> - $owner + - buildCachedCollectionPersister - buildCachedEntityPersister - getCacheFactory - getCacheFactory - getValue - getValue - getValue - getValue - getValue - getValue - getValue - getValue - setValue - setValue - setValue - setValue - setValue - setValue - setValue - setValue - setValue - setValue - setValue - setValue - setValue + + + + + + + + + + + + + + + + + + + + + + + + + - unwrap - unwrap - unwrap + + + - $visited + diff --git a/psalm.xml b/psalm.xml index 6036c3a1017..3b27be7f8e2 100644 --- a/psalm.xml +++ b/psalm.xml @@ -170,6 +170,12 @@ + + + + + +