diff --git a/composer.json b/composer.json index c65c03b959d..2db6652521f 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 fabbff44b7d..9f1394ad6ca 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,20 +279,20 @@ - $mapping + - static + - $repositoryClassName + - $class + @@ -303,41 +303,41 @@ columnNames]]> - $mapping - $mapping - $mapping - $mapping - $overrideMapping + + + + + - ReflectionClass|null + - $definition + reflClass]]> - $entity + - $class - $className + + declaredField]]]> - getProperty - getProperty - getProperty - getValue - getValue - getValue - instantiate - setValue - setValue + + + + + + + + + @@ -347,26 +347,26 @@ - $idGenerator - $table + + - $mapping !== false - $mapping !== false + + - array_values + table]]> table]]> - null - null + + - $platformFamily + @@ -380,28 +380,28 @@ em]]> - getAllClassNames - getConfiguration - getConfiguration - getConfiguration - getConnection - hasListeners - hasListeners - loadMetadataForClass + + + + + + + + generatorType]]> idGenerator]]> - assert($owningSide instanceof ManyToManyOwningSideMapping || + + $owningSide instanceof ManyToOneAssociationMapping)]]> - new $className() + instances]]> @@ -414,18 +414,18 @@ - $mapping + - array + - array_merge(self::DEFAULT_TYPED_FIELD_MAPPINGS, $typedFieldMappings) + - $mapping + $seqGeneratorAttribute->sequenceName, 'allocationSize' => $seqGeneratorAttribute->allocationSize, @@ -433,13 +433,13 @@ ]]]> - $mapping + - $metadata + - array{ + + * }]]> - $listenerClassName + getReflectionClass()]]> - assert($cacheAttribute instanceof Mapping\Cache) - assert($method instanceof ReflectionMethod) - assert($method instanceof ReflectionMethod) - assert($property instanceof ReflectionProperty) + + + + name)]]> @@ -471,35 +471,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)]]> @@ -513,15 +513,15 @@ {'discriminator-map'}]]> - $mapping - $result + + $usage, 'region' => $region, ]]]> - array{ + - array{usage: int|null, region?: string} - loadMappingFile + * }]]> + + - $metadata + {'discriminator-column'}]]> @@ -555,17 +555,17 @@ - ManyToManyInverseSideMapping + - $joinTable + - OneToManyAssociationMapping + mappedBy)]]> @@ -573,49 +573,49 @@ - OneToOneInverseSideMapping + - $object + - ReflectionEmbeddedProperty - ReflectionEmbeddedProperty + + - $object + - ReflectionEnumProperty - ReflectionEnumProperty + + - ReflectionReadonlyProperty - ReflectionReadonlyProperty + + - $mapping + - static + - $instance - $mapping + + - static - static + + @@ -625,7 +625,7 @@ - $sql + @@ -645,15 +645,15 @@ unwrap()->matching($criteria)]]> - $value - $value + + backRefFieldName]]> - setValue - setValue + + unwrap(), 'add']]]> @@ -668,11 +668,11 @@ getOwner()]]> getOwner()]]> getOwner()]]> - $owner + - getFieldForColumn - getFieldForColumn + + @@ -684,33 +684,33 @@ - $value === null + - $hints - $hints + + true]]]> true]]]> true]]]> - $newValue - [$params, $types] - [$sqlParams, $sqlTypes] + + + - array - array + + ]]> - getValue - getValue - getValue - getValue - getValue - getValue - setValue + + + + + + + currentPersisterContext->sqlTableAliases]]> @@ -718,33 +718,33 @@ - $autoloader + - $autoloader + - Closure(string): void + - require $file + - $className - substr($className, $pos + Proxy::MARKER_LENGTH + 2) + + - string + - $classMetadata + - Closure + proxyFactories]]> @@ -757,10 +757,10 @@ proxyFactories[$className] = $proxyFactory]]> - $i + - $i + @@ -771,22 +771,25 @@ $initializer($object, $proxy); }, $skippedProperties)]]> + + + - require $fileName + - $sqlParams + getDQL()]]> - evictEntityRegion + - $parserResult + @@ -823,7 +826,7 @@ - $sqlWalker + @@ -833,36 +836,36 @@ - walkJoinPathExpression + - walkJoinVariableDeclaration + - walkWhenClauseExpression + - walkWhenClauseExpression + - $numDeleted + - int + sqlStatements]]> - MultiTableDeleteExecutor + sqlStatements]]> @@ -870,13 +873,13 @@ - $paramTypes + - $numUpdated + - int + sqlStatements]]> @@ -892,19 +895,19 @@ executeStatement($this->sqlStatements, $params, $types)]]> - int + sqlStatements]]> - SingleTableDeleteUpdateExecutor + - $allowedClasses - $parts + + @@ -917,7 +920,7 @@ - $parts + @@ -927,19 +930,19 @@ - $parts + - $allowedClasses - $parts + + - $allowedClasses - $parts + + @@ -949,39 +952,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]]> @@ -1004,65 +1007,63 @@ ]]> - Comparison::EQ + - throw QueryException::invalidLiteral($literal) + - $expr + simpleArithmeticExpression]]> subselect]]> - $condExpr - elseScalarExpression]]> + rangeVariableDeclaration]]> caseOperand]]> - elseScalarExpression]]> scalarResultAliasMap]]> scalarResultAliasMap]]> - dispatch + - $having - $having - $where - $where + + + + $join]]]> $join]]]> - getRootAlias - getRootAlias + + isEmpty() ? $filteredParameters->first() : null]]> - Parameter|null + - new ArrayCollection($parameters) + - $spacePos - $spacePos + + - $spacePos - $spacePos + + - $dqlPart + @@ -1070,20 +1071,20 @@ repositoryList[$repositoryHash] ??= $this->createRepository($entityManager, $entityName)]]> - EntityRepository + - new $repositoryClassName($entityManager, $metadata) + - evictAll + - evictAll + @@ -1096,7 +1097,7 @@ - getAllClassNames + @@ -1104,20 +1105,20 @@ entityListeners]]> - getAllClassNames + - $metadatas - $metadatas + + - $metadatas - $metadatas - $metadatas + + + getName()]]> @@ -1126,7 +1127,7 @@ - $metadatas + getName()]]> @@ -1135,15 +1136,15 @@ - new ArrayIterator($metadatas) + - MetadataFilter + - $state === UnitOfWork::STATE_DETACHED + @@ -1162,46 +1163,46 @@ - $parameters + - $orderByClause + - $classes + - $asset + - $referencedFieldName + - is_numeric($indexName) + - $indexName + - $collectionToDelete - $collectionToUpdate + + entityChangeSets]]> entityChangeSets]]> - $entityState - $entityState + + - $value + identityMap[$rootClassName]]]> @@ -1210,42 +1211,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 @@ + + + + + +