diff --git a/.gitattributes b/.gitattributes
index 1b71dc4e5b3..cec212e0701 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -19,5 +19,3 @@ phpstan-baseline.neon export-ignore
 phpstan-dbal2.neon export-ignore
 phpstan-params.neon export-ignore
 phpstan-persistence2.neon export-ignore
-psalm.xml export-ignore
-psalm-baseline.xml export-ignore
diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml
index 12edb5facc9..9fc2664859c 100644
--- a/.github/workflows/coding-standards.yml
+++ b/.github/workflows/coding-standards.yml
@@ -24,4 +24,4 @@ on:
 
 jobs:
   coding-standards:
-    uses: "doctrine/.github/.github/workflows/coding-standards.yml@5.3.0"
+    uses: "doctrine/.github/.github/workflows/coding-standards.yml@6.0.0"
diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml
index 6ef2b0bb59b..84bf616c873 100644
--- a/.github/workflows/documentation.yml
+++ b/.github/workflows/documentation.yml
@@ -17,4 +17,4 @@ on:
 jobs:
   documentation:
     name: "Documentation"
-    uses: "doctrine/.github/.github/workflows/documentation.yml@5.3.0"
+    uses: "doctrine/.github/.github/workflows/documentation.yml@6.0.0"
diff --git a/.github/workflows/release-on-milestone-closed.yml b/.github/workflows/release-on-milestone-closed.yml
index 1b53878b22e..0a35bee6617 100644
--- a/.github/workflows/release-on-milestone-closed.yml
+++ b/.github/workflows/release-on-milestone-closed.yml
@@ -7,7 +7,7 @@ on:
 
 jobs:
   release:
-    uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@5.3.0"
+    uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@6.0.0"
     secrets:
       GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
       GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}
diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml
index 52f30872a9c..0370ddd009a 100644
--- a/.github/workflows/static-analysis.yml
+++ b/.github/workflows/static-analysis.yml
@@ -9,7 +9,6 @@ on:
       - composer.*
       - src/**
       - phpstan*
-      - psalm*
       - tests/StaticAnalysis/**
   push:
     branches:
@@ -19,7 +18,6 @@ on:
       - composer.*
       - src/**
       - phpstan*
-      - psalm*
       - tests/StaticAnalysis/**
 
 jobs:
@@ -56,34 +54,3 @@ jobs:
 
       - name: Run static analysis with phpstan/phpstan
         run: "vendor/bin/phpstan analyse -c ${{ matrix.config }} --error-format=checkstyle | cs2pr"
-
-  static-analysis-psalm:
-    name: Static Analysis with Psalm
-    runs-on: ubuntu-22.04
-
-    strategy:
-      matrix:
-        dbal-version:
-        - default
-        - 3.8.2
-
-    steps:
-      - name: "Checkout code"
-        uses: "actions/checkout@v4"
-
-      - name: Install PHP
-        uses: shivammathur/setup-php@v2
-        with:
-          coverage: none
-          php-version: "8.3"
-          tools: cs2pr
-
-      - name: Require specific DBAL version
-        run: "composer require doctrine/dbal ^${{ matrix.dbal-version }} --no-update"
-        if: "${{ matrix.dbal-version != 'default' }}"
-
-      - name: Install dependencies with Composer
-        uses: ramsey/composer-install@v3
-
-      - name: Run static analysis with Vimeo Psalm
-        run: vendor/bin/psalm --shepherd
diff --git a/composer.json b/composer.json
index 7269a3c08a1..fdc0d5e108e 100644
--- a/composer.json
+++ b/composer.json
@@ -46,8 +46,7 @@
         "phpunit/phpunit": "^10.4.0",
         "psr/log": "^1 || ^2 || ^3",
         "squizlabs/php_codesniffer": "3.7.2",
-        "symfony/cache": "^5.4 || ^6.2 || ^7.0",
-        "vimeo/psalm": "5.26.1"
+        "symfony/cache": "^5.4 || ^6.2 || ^7.0"
     },
     "suggest": {
         "ext-dom": "Provides support for XSD validation for XML mapping files",
diff --git a/psalm-baseline.xml b/psalm-baseline.xml
deleted file mode 100644
index cef61546b74..00000000000
--- a/psalm-baseline.xml
+++ /dev/null
@@ -1,1244 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<files psalm-version="5.26.1@d747f6500b38ac4f7dfc5edbcae6e4b637d7add0">
-  <file src="src/AbstractQuery.php">
-    <FalsableReturnStatement>
-      <code><![CDATA[! $filteredParameters->isEmpty() ? $filteredParameters->first() : null]]></code>
-    </FalsableReturnStatement>
-    <InvalidFalsableReturnType>
-      <code><![CDATA[Parameter|null]]></code>
-    </InvalidFalsableReturnType>
-    <MissingClosureParamType>
-      <code><![CDATA[$alias]]></code>
-      <code><![CDATA[$data]]></code>
-      <code><![CDATA[$data]]></code>
-    </MissingClosureParamType>
-    <PossiblyInvalidArgument>
-      <code><![CDATA[$stmt]]></code>
-    </PossiblyInvalidArgument>
-    <PossiblyNullReference>
-      <code><![CDATA[getCacheLogger]]></code>
-      <code><![CDATA[getQueryCache]]></code>
-    </PossiblyNullReference>
-  </file>
-  <file src="src/Cache/CacheConfiguration.php">
-    <PossiblyNullReference>
-      <code><![CDATA[getTimestampRegion]]></code>
-    </PossiblyNullReference>
-  </file>
-  <file src="src/Cache/DefaultCache.php">
-    <PossiblyNullPropertyAssignmentValue>
-      <code><![CDATA[$em->getConfiguration()
-            ->getSecondLevelCacheConfiguration()
-            ->getCacheFactory()]]></code>
-    </PossiblyNullPropertyAssignmentValue>
-    <PossiblyNullReference>
-      <code><![CDATA[getCacheFactory]]></code>
-    </PossiblyNullReference>
-  </file>
-  <file src="src/Cache/DefaultEntityHydrator.php">
-    <UndefinedInterfaceMethod>
-      <code><![CDATA[getCacheRegion]]></code>
-    </UndefinedInterfaceMethod>
-  </file>
-  <file src="src/Cache/DefaultQueryCache.php">
-    <ArgumentTypeCoercion>
-      <code><![CDATA[$assocKeys->identifiers[$assocIndex]]]></code>
-      <code><![CDATA[$assocKeys->identifiers[$assocIndex]]]></code>
-      <code><![CDATA[$cacheKeys->identifiers[$index]]]></code>
-      <code><![CDATA[$cacheKeys->identifiers[$index]]]></code>
-    </ArgumentTypeCoercion>
-    <NoInterfaceProperties>
-      <code><![CDATA[$assocEntry->class]]></code>
-      <code><![CDATA[$assocEntry->class]]></code>
-    </NoInterfaceProperties>
-    <PossiblyNullReference>
-      <code><![CDATA[getCacheLogger]]></code>
-    </PossiblyNullReference>
-    <RedundantCondition>
-      <code><![CDATA[assert($cm instanceof ClassMetadata)]]></code>
-    </RedundantCondition>
-    <UndefinedInterfaceMethod>
-      <code><![CDATA[getCacheRegion]]></code>
-      <code><![CDATA[resolveAssociationEntries]]></code>
-      <code><![CDATA[resolveAssociationEntries]]></code>
-      <code><![CDATA[storeEntityCache]]></code>
-      <code><![CDATA[storeEntityCache]]></code>
-    </UndefinedInterfaceMethod>
-  </file>
-  <file src="src/Cache/Persister/Collection/AbstractCollectionPersister.php">
-    <ArgumentTypeCoercion>
-      <code><![CDATA[$cache]]></code>
-      <code><![CDATA[$entityKey]]></code>
-    </ArgumentTypeCoercion>
-    <NoInterfaceProperties>
-      <code><![CDATA[$entry->identifiers]]></code>
-    </NoInterfaceProperties>
-    <PossiblyNullArgument>
-      <code><![CDATA[$collection->getOwner()]]></code>
-    </PossiblyNullArgument>
-    <PossiblyNullReference>
-      <code><![CDATA[buildCollectionHydrator]]></code>
-      <code><![CDATA[getCacheFactory]]></code>
-    </PossiblyNullReference>
-  </file>
-  <file src="src/Cache/Persister/Collection/NonStrictReadWriteCachedCollectionPersister.php">
-    <PossiblyNullArgument>
-      <code><![CDATA[$collection->getOwner()]]></code>
-      <code><![CDATA[$collection->getOwner()]]></code>
-    </PossiblyNullArgument>
-  </file>
-  <file src="src/Cache/Persister/Collection/ReadOnlyCachedCollectionPersister.php">
-    <PossiblyNullArgument>
-      <code><![CDATA[$collection->getOwner()]]></code>
-    </PossiblyNullArgument>
-  </file>
-  <file src="src/Cache/Persister/Collection/ReadWriteCachedCollectionPersister.php">
-    <PossiblyNullArgument>
-      <code><![CDATA[$collection->getOwner()]]></code>
-      <code><![CDATA[$collection->getOwner()]]></code>
-    </PossiblyNullArgument>
-    <UndefinedInterfaceMethod>
-      <code><![CDATA[lock]]></code>
-      <code><![CDATA[lock]]></code>
-    </UndefinedInterfaceMethod>
-  </file>
-  <file src="src/Cache/Persister/Entity/AbstractEntityPersister.php">
-    <ArgumentTypeCoercion>
-      <code><![CDATA[$cacheEntry]]></code>
-    </ArgumentTypeCoercion>
-    <NoInterfaceProperties>
-      <code><![CDATA[$cacheEntry->class]]></code>
-    </NoInterfaceProperties>
-    <PossiblyNullArgument>
-      <code><![CDATA[$collection->getOwner()]]></code>
-      <code><![CDATA[$collection->getOwner()]]></code>
-    </PossiblyNullArgument>
-    <PossiblyNullPropertyAssignmentValue>
-      <code><![CDATA[$em->getCache()]]></code>
-    </PossiblyNullPropertyAssignmentValue>
-    <PossiblyNullReference>
-      <code><![CDATA[getCacheFactory]]></code>
-      <code><![CDATA[getTimestampRegion]]></code>
-    </PossiblyNullReference>
-    <RedundantConditionGivenDocblockType>
-      <code><![CDATA[assert($metadata instanceof ClassMetadata)]]></code>
-    </RedundantConditionGivenDocblockType>
-    <UndefinedInterfaceMethod>
-      <code><![CDATA[getCacheRegion]]></code>
-      <code><![CDATA[getCacheRegion]]></code>
-      <code><![CDATA[getCacheRegion]]></code>
-      <code><![CDATA[getCacheRegion]]></code>
-      <code><![CDATA[loadCollectionCache]]></code>
-      <code><![CDATA[loadCollectionCache]]></code>
-      <code><![CDATA[storeCollectionCache]]></code>
-      <code><![CDATA[storeCollectionCache]]></code>
-      <code><![CDATA[storeEntityCache]]></code>
-    </UndefinedInterfaceMethod>
-  </file>
-  <file src="src/Cache/Persister/Entity/ReadWriteCachedEntityPersister.php">
-    <RedundantCondition>
-      <code><![CDATA[$isChanged]]></code>
-    </RedundantCondition>
-    <UndefinedInterfaceMethod>
-      <code><![CDATA[lock]]></code>
-      <code><![CDATA[lock]]></code>
-    </UndefinedInterfaceMethod>
-  </file>
-  <file src="src/Cache/TimestampQueryCacheValidator.php">
-    <NoInterfaceProperties>
-      <code><![CDATA[$timestamp->time]]></code>
-    </NoInterfaceProperties>
-  </file>
-  <file src="src/Configuration.php">
-    <ArgumentTypeCoercion>
-      <code><![CDATA[$className]]></code>
-    </ArgumentTypeCoercion>
-  </file>
-  <file src="src/EntityManager.php">
-    <ArgumentTypeCoercion>
-      <code><![CDATA[$className]]></code>
-    </ArgumentTypeCoercion>
-    <InvalidReturnStatement>
-      <code><![CDATA[$entity]]></code>
-      <code><![CDATA[$entity]]></code>
-      <code><![CDATA[$entity]]></code>
-      <code><![CDATA[$entity instanceof $class->name ? $entity : null]]></code>
-      <code><![CDATA[$persister->load($sortedId, null, null, [], $lockMode)]]></code>
-      <code><![CDATA[$persister->loadById($sortedId)]]></code>
-      <code><![CDATA[$this->metadataFactory]]></code>
-    </InvalidReturnStatement>
-    <InvalidReturnType>
-      <code><![CDATA[ClassMetadataFactory]]></code>
-    </InvalidReturnType>
-    <PossiblyNullArgument>
-      <code><![CDATA[$config->getProxyDir()]]></code>
-      <code><![CDATA[$config->getProxyNamespace()]]></code>
-    </PossiblyNullArgument>
-    <PossiblyNullReference>
-      <code><![CDATA[createCache]]></code>
-      <code><![CDATA[getCacheFactory]]></code>
-    </PossiblyNullReference>
-    <PropertyTypeCoercion>
-      <code><![CDATA[new $metadataFactoryClassName()]]></code>
-    </PropertyTypeCoercion>
-    <RedundantCastGivenDocblockType>
-      <code><![CDATA[(string) $hydrationMode]]></code>
-    </RedundantCastGivenDocblockType>
-  </file>
-  <file src="src/EntityRepository.php">
-    <InvalidReturnStatement>
-      <code><![CDATA[$persister->load($criteria, null, null, [], null, 1, $orderBy)]]></code>
-      <code><![CDATA[new LazyCriteriaCollection($persister, $criteria)]]></code>
-    </InvalidReturnStatement>
-    <InvalidReturnType>
-      <code><![CDATA[AbstractLazyCollection<int, T>&Selectable<int, T>]]></code>
-      <code><![CDATA[T|null]]></code>
-    </InvalidReturnType>
-    <LessSpecificReturnStatement>
-      <code><![CDATA[$persister->loadAll($criteria, $orderBy, $limit, $offset)]]></code>
-    </LessSpecificReturnStatement>
-    <MoreSpecificReturnType>
-      <code><![CDATA[list<T>]]></code>
-    </MoreSpecificReturnType>
-  </file>
-  <file src="src/Id/AssignedGenerator.php">
-    <PossiblyNullArgument>
-      <code><![CDATA[$entity]]></code>
-    </PossiblyNullArgument>
-  </file>
-  <file src="src/Id/SequenceGenerator.php">
-    <ParamNameMismatch>
-      <code><![CDATA[$serialized]]></code>
-    </ParamNameMismatch>
-  </file>
-  <file src="src/Internal/Hydration/AbstractHydrator.php">
-    <PossiblyUndefinedArrayOffset>
-      <code><![CDATA[$newObject['args']]]></code>
-      <code><![CDATA[$newObject['args']]]></code>
-    </PossiblyUndefinedArrayOffset>
-    <ReferenceConstraintViolation>
-      <code><![CDATA[return $rowData;]]></code>
-      <code><![CDATA[return $rowData;]]></code>
-    </ReferenceConstraintViolation>
-  </file>
-  <file src="src/Internal/Hydration/ArrayHydrator.php">
-    <PossiblyInvalidArgument>
-      <code><![CDATA[$index]]></code>
-    </PossiblyInvalidArgument>
-    <PossiblyNullArgument>
-      <code><![CDATA[$index]]></code>
-    </PossiblyNullArgument>
-    <PossiblyNullArrayAssignment>
-      <code><![CDATA[$result[$resultKey]]]></code>
-      <code><![CDATA[$result[$resultKey]]]></code>
-    </PossiblyNullArrayAssignment>
-    <ReferenceConstraintViolation>
-      <code><![CDATA[$result]]></code>
-    </ReferenceConstraintViolation>
-    <ReferenceReusedFromConfusingScope>
-      <code><![CDATA[$baseElement]]></code>
-    </ReferenceReusedFromConfusingScope>
-    <UnsupportedPropertyReferenceUsage>
-      <code><![CDATA[$baseElement =& $this->resultPointers[$parent]]]></code>
-    </UnsupportedPropertyReferenceUsage>
-    <UnsupportedReferenceUsage>
-      <code><![CDATA[$baseElement =& $this->resultPointers[$parent][key($first)]]]></code>
-      <code><![CDATA[$this->resultPointers[$dqlAlias] =& $coll[array_key_last($coll)]]]></code>
-    </UnsupportedReferenceUsage>
-  </file>
-  <file src="src/Internal/Hydration/ObjectHydrator.php">
-    <PossiblyFalseArgument>
-      <code><![CDATA[$index]]></code>
-    </PossiblyFalseArgument>
-    <PossiblyInvalidArgument>
-      <code><![CDATA[$parentObject]]></code>
-      <code><![CDATA[$parentObject]]></code>
-      <code><![CDATA[$parentObject]]></code>
-      <code><![CDATA[$parentObject]]></code>
-      <code><![CDATA[$parentObject]]></code>
-      <code><![CDATA[$parentObject]]></code>
-      <code><![CDATA[$parentObject]]></code>
-    </PossiblyInvalidArgument>
-    <PossiblyNullReference>
-      <code><![CDATA[getValue]]></code>
-      <code><![CDATA[getValue]]></code>
-      <code><![CDATA[getValue]]></code>
-      <code><![CDATA[setValue]]></code>
-      <code><![CDATA[setValue]]></code>
-    </PossiblyNullReference>
-  </file>
-  <file src="src/Mapping/AssociationMapping.php">
-    <LessSpecificReturnStatement>
-      <code><![CDATA[$mapping]]></code>
-    </LessSpecificReturnStatement>
-    <MoreSpecificReturnType>
-      <code><![CDATA[static]]></code>
-    </MoreSpecificReturnType>
-  </file>
-  <file src="src/Mapping/Builder/ClassMetadataBuilder.php">
-    <ArgumentTypeCoercion>
-      <code><![CDATA[$repositoryClassName]]></code>
-    </ArgumentTypeCoercion>
-  </file>
-  <file src="src/Mapping/ClassMetadata.php">
-    <DeprecatedProperty>
-      <code><![CDATA[$this->columnNames]]></code>
-      <code><![CDATA[$this->columnNames]]></code>
-      <code><![CDATA[$this->columnNames]]></code>
-      <code><![CDATA[$this->columnNames]]></code>
-    </DeprecatedProperty>
-    <InvalidArgument>
-      <code><![CDATA[$mapping]]></code>
-      <code><![CDATA[$mapping]]></code>
-      <code><![CDATA[$mapping]]></code>
-      <code><![CDATA[$mapping]]></code>
-      <code><![CDATA[$mapping]]></code>
-      <code><![CDATA[$mapping]]></code>
-      <code><![CDATA[$mapping]]></code>
-      <code><![CDATA[$mapping]]></code>
-      <code><![CDATA[$overrideMapping]]></code>
-    </InvalidArgument>
-    <InvalidPropertyAssignmentValue>
-      <code><![CDATA[$definition]]></code>
-    </InvalidPropertyAssignmentValue>
-    <ParamNameMismatch>
-      <code><![CDATA[$entity]]></code>
-    </ParamNameMismatch>
-    <PossiblyNullArgument>
-      <code><![CDATA[$mapping['targetEntity']]]></code>
-      <code><![CDATA[$mapping['targetEntity']]]></code>
-      <code><![CDATA[$parentReflFields[$embeddedClass->declaredField]]]></code>
-    </PossiblyNullArgument>
-    <PossiblyNullReference>
-      <code><![CDATA[getProperty]]></code>
-      <code><![CDATA[getProperty]]></code>
-      <code><![CDATA[getProperty]]></code>
-      <code><![CDATA[getValue]]></code>
-      <code><![CDATA[getValue]]></code>
-      <code><![CDATA[getValue]]></code>
-      <code><![CDATA[instantiate]]></code>
-      <code><![CDATA[setValue]]></code>
-      <code><![CDATA[setValue]]></code>
-    </PossiblyNullReference>
-    <PossiblyUndefinedArrayOffset>
-      <code><![CDATA[$mapping['isOwningSide']]]></code>
-      <code><![CDATA[$mapping['isOwningSide']]]></code>
-      <code><![CDATA[$mapping['isOwningSide']]]></code>
-      <code><![CDATA[$mapping['targetEntity']]]></code>
-      <code><![CDATA[$table['name']]]></code>
-    </PossiblyUndefinedArrayOffset>
-    <PropertyNotSetInConstructor>
-      <code><![CDATA[$idGenerator]]></code>
-      <code><![CDATA[$table]]></code>
-    </PropertyNotSetInConstructor>
-    <RedundantCondition>
-      <code><![CDATA[$mapping !== false]]></code>
-      <code><![CDATA[$mapping !== false]]></code>
-      <code><![CDATA[$this->reflClass]]></code>
-    </RedundantCondition>
-    <RedundantFunctionCall>
-      <code><![CDATA[array_values]]></code>
-    </RedundantFunctionCall>
-    <RedundantPropertyInitializationCheck>
-      <code><![CDATA[$this->table]]></code>
-      <code><![CDATA[$this->table]]></code>
-      <code><![CDATA[null]]></code>
-      <code><![CDATA[null]]></code>
-    </RedundantPropertyInitializationCheck>
-  </file>
-  <file src="src/Mapping/ClassMetadataFactory.php">
-    <ArgumentTypeCoercion>
-      <code><![CDATA[$platformFamily]]></code>
-      <code><![CDATA[new $definition['class']()]]></code>
-    </ArgumentTypeCoercion>
-    <InvalidArrayOffset>
-      <code><![CDATA[$subClass->table[$indexType][$indexName]]]></code>
-    </InvalidArrayOffset>
-    <PossiblyInvalidIterator>
-      <code><![CDATA[$parentClass->table[$indexType]]]></code>
-    </PossiblyInvalidIterator>
-    <PossiblyNullArgument>
-      <code><![CDATA[$this->em]]></code>
-      <code><![CDATA[$this->em]]></code>
-    </PossiblyNullArgument>
-    <PossiblyNullReference>
-      <code><![CDATA[getAllClassNames]]></code>
-      <code><![CDATA[getConfiguration]]></code>
-      <code><![CDATA[getConfiguration]]></code>
-      <code><![CDATA[getConfiguration]]></code>
-      <code><![CDATA[getConnection]]></code>
-      <code><![CDATA[hasListeners]]></code>
-      <code><![CDATA[hasListeners]]></code>
-      <code><![CDATA[loadMetadataForClass]]></code>
-    </PossiblyNullReference>
-    <RedundantCondition>
-      <code><![CDATA[$parent->generatorType]]></code>
-      <code><![CDATA[$parent->idGenerator]]></code>
-    </RedundantCondition>
-    <RedundantConditionGivenDocblockType>
-      <code><![CDATA[assert($owningSide instanceof ManyToManyOwningSideMapping ||
-            $owningSide instanceof OneToOneOwningSideMapping ||
-            $owningSide instanceof ManyToOneAssociationMapping)]]></code>
-    </RedundantConditionGivenDocblockType>
-  </file>
-  <file src="src/Mapping/DefaultEntityListenerResolver.php">
-    <InvalidStringClass>
-      <code><![CDATA[new $className()]]></code>
-    </InvalidStringClass>
-    <PropertyTypeCoercion>
-      <code><![CDATA[$this->instances]]></code>
-    </PropertyTypeCoercion>
-  </file>
-  <file src="src/Mapping/DefaultNamingStrategy.php">
-    <PossiblyFalseOperand>
-      <code><![CDATA[strrpos($className, '\\')]]></code>
-    </PossiblyFalseOperand>
-  </file>
-  <file src="src/Mapping/DefaultTypedFieldMapper.php">
-    <LessSpecificReturnStatement>
-      <code><![CDATA[$mapping]]></code>
-      <code><![CDATA[$mapping]]></code>
-    </LessSpecificReturnStatement>
-    <MoreSpecificReturnType>
-      <code><![CDATA[array]]></code>
-    </MoreSpecificReturnType>
-    <PropertyTypeCoercion>
-      <code><![CDATA[array_merge(self::DEFAULT_TYPED_FIELD_MAPPINGS, $typedFieldMappings)]]></code>
-    </PropertyTypeCoercion>
-  </file>
-  <file src="src/Mapping/Driver/AttributeDriver.php">
-    <InvalidArgument>
-      <code><![CDATA[$mapping]]></code>
-      <code><![CDATA[[
-                            'sequenceName' => $seqGeneratorAttribute->sequenceName,
-                            'allocationSize' => $seqGeneratorAttribute->allocationSize,
-                            'initialValue' => $seqGeneratorAttribute->initialValue,
-                        ]]]></code>
-    </InvalidArgument>
-    <LessSpecificReturnStatement>
-      <code><![CDATA[$mapping]]></code>
-    </LessSpecificReturnStatement>
-    <MoreSpecificImplementedParamType>
-      <code><![CDATA[$metadata]]></code>
-    </MoreSpecificImplementedParamType>
-    <MoreSpecificReturnType>
-      <code><![CDATA[array{
-     *                   fieldName: string,
-     *                   type: mixed,
-     *                   scale: int,
-     *                   length: int,
-     *                   unique: bool,
-     *                   nullable: bool,
-     *                   precision: int,
-     *                   enumType?: class-string,
-     *                   options?: mixed[],
-     *                   columnName?: string,
-     *                   columnDefinition?: string
-     *               }]]></code>
-    </MoreSpecificReturnType>
-    <PossiblyNullArgument>
-      <code><![CDATA[$listenerClassName]]></code>
-    </PossiblyNullArgument>
-    <RedundantCondition>
-      <code><![CDATA[$metadata->getReflectionClass()]]></code>
-    </RedundantCondition>
-    <RedundantConditionGivenDocblockType>
-      <code><![CDATA[assert($cacheAttribute instanceof Mapping\Cache)]]></code>
-      <code><![CDATA[assert($method instanceof ReflectionMethod)]]></code>
-      <code><![CDATA[assert($method instanceof ReflectionMethod)]]></code>
-      <code><![CDATA[assert($property instanceof ReflectionProperty)]]></code>
-    </RedundantConditionGivenDocblockType>
-    <TypeDoesNotContainNull>
-      <code><![CDATA[new ReflectionClass($metadata->name)]]></code>
-    </TypeDoesNotContainNull>
-  </file>
-  <file src="src/Mapping/Driver/DatabaseDriver.php">
-    <DocblockTypeContradiction>
-      <code><![CDATA[$metadata instanceof ClassMetadata]]></code>
-    </DocblockTypeContradiction>
-    <MoreSpecificImplementedParamType>
-      <code><![CDATA[$metadata]]></code>
-    </MoreSpecificImplementedParamType>
-    <PossiblyNullArrayAccess>
-      <code><![CDATA[$this->tables[$tableName]]]></code>
-      <code><![CDATA[$this->tables[$tableName]]]></code>
-    </PossiblyNullArrayAccess>
-    <PossiblyNullReference>
-      <code><![CDATA[getColumns]]></code>
-      <code><![CDATA[getColumns]]></code>
-      <code><![CDATA[getIndexes]]></code>
-    </PossiblyNullReference>
-  </file>
-  <file src="src/Mapping/Driver/LoadMappingFileImplementation.php">
-    <LessSpecificImplementedReturnType>
-      <code><![CDATA[array]]></code>
-    </LessSpecificImplementedReturnType>
-    <MissingParamType>
-      <code><![CDATA[$file]]></code>
-    </MissingParamType>
-  </file>
-  <file src="src/Mapping/Driver/SimplifiedXmlDriver.php">
-    <MissingParamType>
-      <code><![CDATA[$fileExtension]]></code>
-      <code><![CDATA[$prefixes]]></code>
-    </MissingParamType>
-  </file>
-  <file src="src/Mapping/Driver/XmlDriver.php">
-    <ArgumentTypeCoercion>
-      <code><![CDATA[$mapping]]></code>
-      <code><![CDATA[(string) $xmlRoot['repository-class']]]></code>
-      <code><![CDATA[isset($xmlRoot['repository-class']) ? (string) $xmlRoot['repository-class'] : null]]></code>
-    </ArgumentTypeCoercion>
-    <InvalidArgument>
-      <code><![CDATA[$columnDef]]></code>
-      <code><![CDATA[$this->cacheToArray($manyToManyElement->cache)]]></code>
-      <code><![CDATA[$this->cacheToArray($manyToOneElement->cache)]]></code>
-      <code><![CDATA[$this->cacheToArray($oneToManyElement->cache)]]></code>
-      <code><![CDATA[$this->cacheToArray($oneToOneElement->cache)]]></code>
-    </InvalidArgument>
-    <InvalidPropertyAssignmentValue>
-      <code><![CDATA[$metadata->table]]></code>
-    </InvalidPropertyAssignmentValue>
-    <InvalidReturnStatement>
-      <code><![CDATA[$mapping]]></code>
-      <code><![CDATA[[
-            'usage'  => $usage,
-            'region' => $region,
-        ]]]></code>
-    </InvalidReturnStatement>
-    <InvalidReturnType>
-      <code><![CDATA[array{
-      *                   fieldName: string,
-      *                   type?: string,
-      *                   columnName?: string,
-      *                   length?: int,
-      *                   precision?: int,
-      *                   scale?: int,
-      *                   unique?: bool,
-      *                   nullable?: bool,
-      *                   notInsertable?: bool,
-      *                   notUpdatable?: bool,
-      *                   enumType?: string,
-      *                   version?: bool,
-      *                   columnDefinition?: string,
-      *                   options?: array
-      *               }]]></code>
-      <code><![CDATA[array{usage: int|null, region?: string}]]></code>
-    </InvalidReturnType>
-    <MoreSpecificImplementedParamType>
-      <code><![CDATA[$metadata]]></code>
-    </MoreSpecificImplementedParamType>
-  </file>
-  <file src="src/Mapping/GetReflectionClassImplementation.php">
-    <ImplementedReturnTypeMismatch>
-      <code><![CDATA[ReflectionClass]]></code>
-    </ImplementedReturnTypeMismatch>
-    <InvalidNullableReturnType>
-      <code><![CDATA[ReflectionClass]]></code>
-    </InvalidNullableReturnType>
-  </file>
-  <file src="src/Mapping/ManyToManyInverseSideMapping.php">
-    <PropertyNotSetInConstructor>
-      <code><![CDATA[ManyToManyInverseSideMapping]]></code>
-    </PropertyNotSetInConstructor>
-  </file>
-  <file src="src/Mapping/ManyToManyOwningSideMapping.php">
-    <PropertyNotSetInConstructor>
-      <code><![CDATA[$joinTable]]></code>
-    </PropertyNotSetInConstructor>
-  </file>
-  <file src="src/Mapping/OneToManyAssociationMapping.php">
-    <PropertyNotSetInConstructor>
-      <code><![CDATA[OneToManyAssociationMapping]]></code>
-    </PropertyNotSetInConstructor>
-    <TypeDoesNotContainType>
-      <code><![CDATA[isset($mapping->mappedBy)]]></code>
-    </TypeDoesNotContainType>
-  </file>
-  <file src="src/Mapping/OneToOneInverseSideMapping.php">
-    <PropertyNotSetInConstructor>
-      <code><![CDATA[OneToOneInverseSideMapping]]></code>
-    </PropertyNotSetInConstructor>
-  </file>
-  <file src="src/Mapping/ReflectionEmbeddedProperty.php">
-    <MethodSignatureMismatch>
-      <code><![CDATA[$object]]></code>
-    </MethodSignatureMismatch>
-    <PropertyNotSetInConstructor>
-      <code><![CDATA[ReflectionEmbeddedProperty]]></code>
-      <code><![CDATA[ReflectionEmbeddedProperty]]></code>
-    </PropertyNotSetInConstructor>
-  </file>
-  <file src="src/Mapping/ReflectionEnumProperty.php">
-    <MethodSignatureMismatch>
-      <code><![CDATA[$object]]></code>
-    </MethodSignatureMismatch>
-    <PropertyNotSetInConstructor>
-      <code><![CDATA[ReflectionEnumProperty]]></code>
-      <code><![CDATA[ReflectionEnumProperty]]></code>
-    </PropertyNotSetInConstructor>
-  </file>
-  <file src="src/Mapping/ReflectionReadonlyProperty.php">
-    <PropertyNotSetInConstructor>
-      <code><![CDATA[ReflectionReadonlyProperty]]></code>
-      <code><![CDATA[ReflectionReadonlyProperty]]></code>
-    </PropertyNotSetInConstructor>
-  </file>
-  <file src="src/Mapping/ToOneInverseSideMapping.php">
-    <LessSpecificReturnStatement>
-      <code><![CDATA[$mapping]]></code>
-    </LessSpecificReturnStatement>
-    <MoreSpecificReturnType>
-      <code><![CDATA[static]]></code>
-    </MoreSpecificReturnType>
-  </file>
-  <file src="src/Mapping/ToOneOwningSideMapping.php">
-    <LessSpecificReturnStatement>
-      <code><![CDATA[$instance]]></code>
-      <code><![CDATA[$mapping]]></code>
-    </LessSpecificReturnStatement>
-    <MoreSpecificReturnType>
-      <code><![CDATA[static]]></code>
-      <code><![CDATA[static]]></code>
-    </MoreSpecificReturnType>
-  </file>
-  <file src="src/Mapping/UnderscoreNamingStrategy.php">
-    <PossiblyFalseOperand>
-      <code><![CDATA[strrpos($className, '\\')]]></code>
-    </PossiblyFalseOperand>
-  </file>
-  <file src="src/NativeQuery.php">
-    <PropertyNotSetInConstructor>
-      <code><![CDATA[$sql]]></code>
-    </PropertyNotSetInConstructor>
-  </file>
-  <file src="src/PersistentCollection.php">
-    <ImplementedReturnTypeMismatch>
-      <code><![CDATA[Collection<TKey, T>]]></code>
-    </ImplementedReturnTypeMismatch>
-    <InvalidReturnStatement>
-      <code><![CDATA[$association->fetch === ClassMetadata::FETCH_EXTRA_LAZY
-            ? new LazyCriteriaCollection($persister, $criteria)
-            : new ArrayCollection($persister->loadCriteria($criteria))]]></code>
-      <code><![CDATA[$this->em->find($this->typeClass->name, $key)]]></code>
-    </InvalidReturnStatement>
-    <InvalidReturnType>
-      <code><![CDATA[Collection<TKey, T>]]></code>
-    </InvalidReturnType>
-    <LessSpecificReturnStatement>
-      <code><![CDATA[$this->unwrap()->matching($criteria)]]></code>
-    </LessSpecificReturnStatement>
-    <ParamNameMismatch>
-      <code><![CDATA[$value]]></code>
-      <code><![CDATA[$value]]></code>
-    </ParamNameMismatch>
-    <PossiblyNullArgument>
-      <code><![CDATA[$this->backRefFieldName]]></code>
-    </PossiblyNullArgument>
-    <PossiblyNullReference>
-      <code><![CDATA[setValue]]></code>
-      <code><![CDATA[setValue]]></code>
-    </PossiblyNullReference>
-    <UndefinedMethod>
-      <code><![CDATA[[$this->unwrap(), 'add']]]></code>
-    </UndefinedMethod>
-  </file>
-  <file src="src/Persisters/Collection/ManyToManyPersister.php">
-    <PossiblyNullArgument>
-      <code><![CDATA[$collection->getOwner()]]></code>
-      <code><![CDATA[$collection->getOwner()]]></code>
-      <code><![CDATA[$collection->getOwner()]]></code>
-      <code><![CDATA[$collection->getOwner()]]></code>
-      <code><![CDATA[$collection->getOwner()]]></code>
-      <code><![CDATA[$collection->getOwner()]]></code>
-      <code><![CDATA[$collection->getOwner()]]></code>
-      <code><![CDATA[$owner]]></code>
-    </PossiblyNullArgument>
-    <PossiblyNullReference>
-      <code><![CDATA[getFieldForColumn]]></code>
-      <code><![CDATA[getFieldForColumn]]></code>
-    </PossiblyNullReference>
-  </file>
-  <file src="src/Persisters/Collection/OneToManyPersister.php">
-    <PossiblyNullArgument>
-      <code><![CDATA[$collection->getOwner()]]></code>
-      <code><![CDATA[$collection->getOwner()]]></code>
-      <code><![CDATA[$collection->getOwner()]]></code>
-    </PossiblyNullArgument>
-  </file>
-  <file src="src/Persisters/Entity/BasicEntityPersister.php">
-    <DocblockTypeContradiction>
-      <code><![CDATA[$value === null]]></code>
-    </DocblockTypeContradiction>
-    <InvalidArgument>
-      <code><![CDATA[$hints]]></code>
-      <code><![CDATA[$hints]]></code>
-      <code><![CDATA[[Query::HINT_REFRESH => true]]]></code>
-      <code><![CDATA[[UnitOfWork::HINT_DEFEREAGERLOAD => true]]]></code>
-      <code><![CDATA[[UnitOfWork::HINT_DEFEREAGERLOAD => true]]]></code>
-    </InvalidArgument>
-    <LessSpecificReturnStatement>
-      <code><![CDATA[$newValue]]></code>
-      <code><![CDATA[[$params, $types]]]></code>
-      <code><![CDATA[[$sqlParams, $sqlTypes]]]></code>
-    </LessSpecificReturnStatement>
-    <MoreSpecificReturnType>
-      <code><![CDATA[array]]></code>
-      <code><![CDATA[array]]></code>
-      <code><![CDATA[list<mixed>]]></code>
-    </MoreSpecificReturnType>
-    <PossiblyNullReference>
-      <code><![CDATA[getValue]]></code>
-      <code><![CDATA[getValue]]></code>
-      <code><![CDATA[getValue]]></code>
-      <code><![CDATA[getValue]]></code>
-      <code><![CDATA[getValue]]></code>
-      <code><![CDATA[getValue]]></code>
-      <code><![CDATA[setValue]]></code>
-    </PossiblyNullReference>
-    <PropertyTypeCoercion>
-      <code><![CDATA[$this->currentPersisterContext->sqlTableAliases]]></code>
-    </PropertyTypeCoercion>
-  </file>
-  <file src="src/Proxy/Autoloader.php">
-    <ArgumentTypeCoercion>
-      <code><![CDATA[$autoloader]]></code>
-    </ArgumentTypeCoercion>
-    <LessSpecificReturnStatement>
-      <code><![CDATA[$autoloader]]></code>
-    </LessSpecificReturnStatement>
-    <MoreSpecificReturnType>
-      <code><![CDATA[Closure(string): void]]></code>
-    </MoreSpecificReturnType>
-    <UnresolvableInclude>
-      <code><![CDATA[require $file]]></code>
-    </UnresolvableInclude>
-  </file>
-  <file src="src/Proxy/DefaultProxyClassNameResolver.php">
-    <LessSpecificReturnStatement>
-      <code><![CDATA[$className]]></code>
-      <code><![CDATA[substr($className, $pos + Proxy::MARKER_LENGTH + 2)]]></code>
-    </LessSpecificReturnStatement>
-    <MoreSpecificReturnType>
-      <code><![CDATA[string]]></code>
-    </MoreSpecificReturnType>
-  </file>
-  <file src="src/Proxy/ProxyFactory.php">
-    <ArgumentTypeCoercion>
-      <code><![CDATA[$classMetadata]]></code>
-    </ArgumentTypeCoercion>
-    <InvalidNullableReturnType>
-      <code><![CDATA[Closure]]></code>
-    </InvalidNullableReturnType>
-    <InvalidPropertyAssignmentValue>
-      <code><![CDATA[$this->proxyFactories]]></code>
-    </InvalidPropertyAssignmentValue>
-    <NoInterfaceProperties>
-      <code><![CDATA[$metadata->isEmbeddedClass]]></code>
-      <code><![CDATA[$metadata->isMappedSuperclass]]></code>
-    </NoInterfaceProperties>
-    <NullableReturnStatement>
-      <code><![CDATA[$this->proxyFactories[$className] = $proxyFactory]]></code>
-    </NullableReturnStatement>
-    <PossiblyFalseArgument>
-      <code><![CDATA[$i]]></code>
-    </PossiblyFalseArgument>
-    <PossiblyFalseOperand>
-      <code><![CDATA[$i]]></code>
-    </PossiblyFalseOperand>
-    <TypeDoesNotContainType>
-      <code><![CDATA[$autoGenerate < 0]]></code>
-      <code><![CDATA[$autoGenerate > 4]]></code>
-    </TypeDoesNotContainType>
-    <UndefinedMethod>
-      <code><![CDATA[self::createLazyGhost(static function (InternalProxy $object) use ($initializer, $identifier): void {
-                $initializer($object, $identifier);
-            }, $skippedProperties)]]></code>
-    </UndefinedMethod>
-    <UnresolvableInclude>
-      <code><![CDATA[require $fileName]]></code>
-    </UnresolvableInclude>
-  </file>
-  <file src="src/Query.php">
-    <InvalidArgument>
-      <code><![CDATA[$sqlParams]]></code>
-    </InvalidArgument>
-    <PossiblyNullArgument>
-      <code><![CDATA[$this->getDQL()]]></code>
-    </PossiblyNullArgument>
-    <PossiblyNullReference>
-      <code><![CDATA[evictEntityRegion]]></code>
-    </PossiblyNullReference>
-    <PropertyNotSetInConstructor>
-      <code><![CDATA[$parserResult]]></code>
-    </PropertyNotSetInConstructor>
-  </file>
-  <file src="src/Query/AST/Functions/BitAndFunction.php">
-    <PossiblyInvalidPropertyAssignmentValue>
-      <code><![CDATA[$parser->ArithmeticPrimary()]]></code>
-      <code><![CDATA[$parser->ArithmeticPrimary()]]></code>
-    </PossiblyInvalidPropertyAssignmentValue>
-  </file>
-  <file src="src/Query/AST/Functions/BitOrFunction.php">
-    <PossiblyInvalidPropertyAssignmentValue>
-      <code><![CDATA[$parser->ArithmeticPrimary()]]></code>
-      <code><![CDATA[$parser->ArithmeticPrimary()]]></code>
-    </PossiblyInvalidPropertyAssignmentValue>
-  </file>
-  <file src="src/Query/AST/Functions/DateAddFunction.php">
-    <PossiblyInvalidPropertyAssignmentValue>
-      <code><![CDATA[$parser->ArithmeticPrimary()]]></code>
-      <code><![CDATA[$parser->ArithmeticPrimary()]]></code>
-    </PossiblyInvalidPropertyAssignmentValue>
-    <UndefinedPropertyFetch>
-      <code><![CDATA[$this->unit->value]]></code>
-    </UndefinedPropertyFetch>
-  </file>
-  <file src="src/Query/AST/Functions/DateDiffFunction.php">
-    <PossiblyInvalidPropertyAssignmentValue>
-      <code><![CDATA[$parser->ArithmeticPrimary()]]></code>
-      <code><![CDATA[$parser->ArithmeticPrimary()]]></code>
-    </PossiblyInvalidPropertyAssignmentValue>
-  </file>
-  <file src="src/Query/AST/Functions/DateSubFunction.php">
-    <UndefinedPropertyFetch>
-      <code><![CDATA[$this->unit->value]]></code>
-    </UndefinedPropertyFetch>
-  </file>
-  <file src="src/Query/AST/Functions/FunctionNode.php">
-    <ParamNameMismatch>
-      <code><![CDATA[$sqlWalker]]></code>
-    </ParamNameMismatch>
-  </file>
-  <file src="src/Query/AST/Functions/LocateFunction.php">
-    <PossiblyInvalidArgument>
-      <code><![CDATA[$this->simpleArithmeticExpression]]></code>
-    </PossiblyInvalidArgument>
-  </file>
-  <file src="src/Query/AST/JoinClassPathExpression.php">
-    <UndefinedMethod>
-      <code><![CDATA[walkJoinPathExpression]]></code>
-    </UndefinedMethod>
-  </file>
-  <file src="src/Query/AST/JoinVariableDeclaration.php">
-    <UndefinedMethod>
-      <code><![CDATA[walkJoinVariableDeclaration]]></code>
-    </UndefinedMethod>
-  </file>
-  <file src="src/Query/AST/SimpleWhenClause.php">
-    <UndefinedMethod>
-      <code><![CDATA[walkWhenClauseExpression]]></code>
-    </UndefinedMethod>
-  </file>
-  <file src="src/Query/AST/WhenClause.php">
-    <UndefinedMethod>
-      <code><![CDATA[walkWhenClauseExpression]]></code>
-    </UndefinedMethod>
-  </file>
-  <file src="src/Query/Exec/MultiTableDeleteExecutor.php">
-    <InvalidReturnStatement>
-      <code><![CDATA[$numDeleted]]></code>
-    </InvalidReturnStatement>
-    <InvalidReturnType>
-      <code><![CDATA[int]]></code>
-    </InvalidReturnType>
-    <PossiblyInvalidIterator>
-      <code><![CDATA[$this->sqlStatements]]></code>
-    </PossiblyInvalidIterator>
-    <PropertyNotSetInConstructor>
-      <code><![CDATA[MultiTableDeleteExecutor]]></code>
-    </PropertyNotSetInConstructor>
-    <UninitializedProperty>
-      <code><![CDATA[$this->sqlStatements]]></code>
-    </UninitializedProperty>
-  </file>
-  <file src="src/Query/Exec/MultiTableUpdateExecutor.php">
-    <InvalidArgument>
-      <code><![CDATA[$paramTypes]]></code>
-    </InvalidArgument>
-    <InvalidReturnStatement>
-      <code><![CDATA[$numUpdated]]></code>
-    </InvalidReturnStatement>
-    <InvalidReturnType>
-      <code><![CDATA[int]]></code>
-    </InvalidReturnType>
-    <PossiblyInvalidIterator>
-      <code><![CDATA[$this->sqlStatements]]></code>
-    </PossiblyInvalidIterator>
-  </file>
-  <file src="src/Query/Exec/SingleSelectExecutor.php">
-    <PossiblyInvalidArgument>
-      <code><![CDATA[$this->sqlStatements]]></code>
-    </PossiblyInvalidArgument>
-  </file>
-  <file src="src/Query/Exec/SingleTableDeleteUpdateExecutor.php">
-    <InvalidReturnStatement>
-      <code><![CDATA[$conn->executeStatement($this->sqlStatements, $params, $types)]]></code>
-    </InvalidReturnStatement>
-    <InvalidReturnType>
-      <code><![CDATA[int]]></code>
-    </InvalidReturnType>
-    <PossiblyInvalidArgument>
-      <code><![CDATA[$this->sqlStatements]]></code>
-    </PossiblyInvalidArgument>
-    <PropertyNotSetInConstructor>
-      <code><![CDATA[SingleTableDeleteUpdateExecutor]]></code>
-    </PropertyNotSetInConstructor>
-  </file>
-  <file src="src/Query/Expr/Andx.php">
-    <NonInvariantDocblockPropertyType>
-      <code><![CDATA[$allowedClasses]]></code>
-      <code><![CDATA[$parts]]></code>
-    </NonInvariantDocblockPropertyType>
-  </file>
-  <file src="src/Query/Expr/Func.php">
-    <LessSpecificReturnStatement>
-      <code><![CDATA[$this->arguments]]></code>
-    </LessSpecificReturnStatement>
-    <MoreSpecificReturnType>
-      <code><![CDATA[list<mixed>]]></code>
-    </MoreSpecificReturnType>
-  </file>
-  <file src="src/Query/Expr/GroupBy.php">
-    <NonInvariantDocblockPropertyType>
-      <code><![CDATA[$parts]]></code>
-    </NonInvariantDocblockPropertyType>
-  </file>
-  <file src="src/Query/Expr/Join.php">
-    <PossiblyNullArgument>
-      <code><![CDATA[$this->conditionType]]></code>
-    </PossiblyNullArgument>
-  </file>
-  <file src="src/Query/Expr/Literal.php">
-    <NonInvariantDocblockPropertyType>
-      <code><![CDATA[$parts]]></code>
-    </NonInvariantDocblockPropertyType>
-  </file>
-  <file src="src/Query/Expr/Orx.php">
-    <NonInvariantDocblockPropertyType>
-      <code><![CDATA[$allowedClasses]]></code>
-      <code><![CDATA[$parts]]></code>
-    </NonInvariantDocblockPropertyType>
-  </file>
-  <file src="src/Query/Expr/Select.php">
-    <NonInvariantDocblockPropertyType>
-      <code><![CDATA[$allowedClasses]]></code>
-      <code><![CDATA[$parts]]></code>
-    </NonInvariantDocblockPropertyType>
-  </file>
-  <file src="src/Query/Filter/SQLFilter.php">
-    <PropertyTypeCoercion>
-      <code><![CDATA[$this->parameters]]></code>
-    </PropertyTypeCoercion>
-  </file>
-  <file src="src/Query/Parser.php">
-    <ArgumentTypeCoercion>
-      <code><![CDATA[$stringPattern]]></code>
-    </ArgumentTypeCoercion>
-    <DeprecatedMethod>
-      <code><![CDATA[setSqlExecutor]]></code>
-    </DeprecatedMethod>
-    <InvalidNullableReturnType>
-      <code><![CDATA[AST\SelectStatement|AST\UpdateStatement|AST\DeleteStatement]]></code>
-    </InvalidNullableReturnType>
-    <InvalidPropertyAssignmentValue>
-      <code><![CDATA[$this->queryComponents]]></code>
-    </InvalidPropertyAssignmentValue>
-    <InvalidStringClass>
-      <code><![CDATA[new $functionClass($functionName)]]></code>
-      <code><![CDATA[new $functionClass($functionName)]]></code>
-      <code><![CDATA[new $functionClass($functionName)]]></code>
-    </InvalidStringClass>
-    <LessSpecificReturnStatement>
-      <code><![CDATA[$function]]></code>
-      <code><![CDATA[$function]]></code>
-      <code><![CDATA[$function]]></code>
-    </LessSpecificReturnStatement>
-    <NullableReturnStatement>
-      <code><![CDATA[$statement]]></code>
-    </NullableReturnStatement>
-    <PossiblyFalseArgument>
-      <code><![CDATA[strrpos($fromClassName, '\\')]]></code>
-    </PossiblyFalseArgument>
-    <PossiblyInvalidArgument>
-      <code><![CDATA[$AST]]></code>
-      <code><![CDATA[$expr]]></code>
-      <code><![CDATA[$this->lexer->getLiteral($token)]]></code>
-      <code><![CDATA[$this->lexer->getLiteral($token)]]></code>
-      <code><![CDATA[$this->lexer->getLiteral($token)]]></code>
-    </PossiblyInvalidArgument>
-    <PossiblyNullArgument>
-      <code><![CDATA[$dql]]></code>
-      <code><![CDATA[$this->query->getDQL()]]></code>
-      <code><![CDATA[$token->value]]></code>
-    </PossiblyNullArgument>
-    <PossiblyNullPropertyFetch>
-      <code><![CDATA[$lookaheadType->value]]></code>
-      <code><![CDATA[$lookaheadType->value]]></code>
-      <code><![CDATA[$this->lexer->glimpse()->type]]></code>
-      <code><![CDATA[$token->value]]></code>
-      <code><![CDATA[$token->value]]></code>
-    </PossiblyNullPropertyFetch>
-    <RedundantCondition>
-      <code><![CDATA[$token->value === TokenType::T_IDENTIFIER->value]]></code>
-    </RedundantCondition>
-  </file>
-  <file src="src/Query/QueryExpressionVisitor.php">
-    <InvalidReturnStatement>
-      <code><![CDATA[new ArrayCollection($this->parameters)]]></code>
-    </InvalidReturnStatement>
-    <InvalidReturnType>
-      <code><![CDATA[ArrayCollection<int, mixed>]]></code>
-    </InvalidReturnType>
-    <RedundantConditionGivenDocblockType>
-      <code><![CDATA[Comparison::EQ]]></code>
-    </RedundantConditionGivenDocblockType>
-  </file>
-  <file src="src/Query/SqlWalker.php">
-    <DocblockTypeContradiction>
-      <code><![CDATA[throw QueryException::invalidLiteral($literal)]]></code>
-    </DocblockTypeContradiction>
-    <PossiblyInvalidArgument>
-      <code><![CDATA[$expr]]></code>
-    </PossiblyInvalidArgument>
-    <PossiblyNullArgument>
-      <code><![CDATA[$arithmeticExpr->simpleArithmeticExpression]]></code>
-      <code><![CDATA[$arithmeticExpr->subselect]]></code>
-      <code><![CDATA[$condExpr]]></code>
-      <code><![CDATA[$identificationVariableDecl->rangeVariableDeclaration]]></code>
-      <code><![CDATA[$simpleCaseExpression->caseOperand]]></code>
-    </PossiblyNullArgument>
-    <PossiblyNullArrayOffset>
-      <code><![CDATA[$this->scalarResultAliasMap]]></code>
-      <code><![CDATA[$this->scalarResultAliasMap]]></code>
-    </PossiblyNullArrayOffset>
-    <PossiblyNullReference>
-      <code><![CDATA[dispatch]]></code>
-    </PossiblyNullReference>
-  </file>
-  <file src="src/QueryBuilder.php">
-    <ArgumentTypeCoercion>
-      <code><![CDATA[[$rootAlias => $join]]]></code>
-      <code><![CDATA[[$rootAlias => $join]]]></code>
-    </ArgumentTypeCoercion>
-    <DeprecatedMethod>
-      <code><![CDATA[getRootAlias]]></code>
-      <code><![CDATA[getRootAlias]]></code>
-    </DeprecatedMethod>
-    <FalsableReturnStatement>
-      <code><![CDATA[! $filteredParameters->isEmpty() ? $filteredParameters->first() : null]]></code>
-    </FalsableReturnStatement>
-    <InvalidFalsableReturnType>
-      <code><![CDATA[Parameter|null]]></code>
-    </InvalidFalsableReturnType>
-    <InvalidPropertyAssignmentValue>
-      <code><![CDATA[new ArrayCollection($parameters)]]></code>
-    </InvalidPropertyAssignmentValue>
-    <PossiblyFalseArgument>
-      <code><![CDATA[$spacePos]]></code>
-      <code><![CDATA[$spacePos]]></code>
-    </PossiblyFalseArgument>
-    <PossiblyFalseOperand>
-      <code><![CDATA[$spacePos]]></code>
-      <code><![CDATA[$spacePos]]></code>
-    </PossiblyFalseOperand>
-    <PossiblyInvalidIterator>
-      <code><![CDATA[$dqlPart]]></code>
-    </PossiblyInvalidIterator>
-  </file>
-  <file src="src/Repository/DefaultRepositoryFactory.php">
-    <InvalidReturnStatement>
-      <code><![CDATA[$this->repositoryList[$repositoryHash] ??= $this->createRepository($entityManager, $entityName)]]></code>
-    </InvalidReturnStatement>
-    <InvalidReturnType>
-      <code><![CDATA[EntityRepository]]></code>
-    </InvalidReturnType>
-    <UnsafeInstantiation>
-      <code><![CDATA[new $repositoryClassName($entityManager, $metadata)]]></code>
-    </UnsafeInstantiation>
-  </file>
-  <file src="src/Tools/Console/Command/ClearCache/CollectionRegionCommand.php">
-    <PossiblyNullReference>
-      <code><![CDATA[evictAll]]></code>
-    </PossiblyNullReference>
-  </file>
-  <file src="src/Tools/Console/Command/ClearCache/EntityRegionCommand.php">
-    <PossiblyNullReference>
-      <code><![CDATA[evictAll]]></code>
-    </PossiblyNullReference>
-  </file>
-  <file src="src/Tools/Console/Command/GenerateProxiesCommand.php">
-    <NoInterfaceProperties>
-      <code><![CDATA[$metadata->name]]></code>
-    </NoInterfaceProperties>
-    <PossiblyNullArgument>
-      <code><![CDATA[$em->getConfiguration()->getProxyDir()]]></code>
-    </PossiblyNullArgument>
-  </file>
-  <file src="src/Tools/Console/Command/InfoCommand.php">
-    <PossiblyNullReference>
-      <code><![CDATA[getAllClassNames]]></code>
-    </PossiblyNullReference>
-  </file>
-  <file src="src/Tools/Console/Command/MappingDescribeCommand.php">
-    <ArgumentTypeCoercion>
-      <code><![CDATA[$metadata->entityListeners]]></code>
-    </ArgumentTypeCoercion>
-    <PossiblyNullReference>
-      <code><![CDATA[getAllClassNames]]></code>
-    </PossiblyNullReference>
-  </file>
-  <file src="src/Tools/Console/Command/SchemaTool/CreateCommand.php">
-    <ArgumentTypeCoercion>
-      <code><![CDATA[$metadatas]]></code>
-      <code><![CDATA[$metadatas]]></code>
-    </ArgumentTypeCoercion>
-  </file>
-  <file src="src/Tools/Console/Command/SchemaTool/DropCommand.php">
-    <ArgumentTypeCoercion>
-      <code><![CDATA[$metadatas]]></code>
-      <code><![CDATA[$metadatas]]></code>
-      <code><![CDATA[$metadatas]]></code>
-    </ArgumentTypeCoercion>
-    <PossiblyNullArgument>
-      <code><![CDATA[$this->getName()]]></code>
-      <code><![CDATA[$this->getName()]]></code>
-    </PossiblyNullArgument>
-  </file>
-  <file src="src/Tools/Console/Command/SchemaTool/UpdateCommand.php">
-    <ArgumentTypeCoercion>
-      <code><![CDATA[$metadatas]]></code>
-    </ArgumentTypeCoercion>
-    <PossiblyNullArgument>
-      <code><![CDATA[$this->getName()]]></code>
-      <code><![CDATA[$this->getName()]]></code>
-    </PossiblyNullArgument>
-  </file>
-  <file src="src/Tools/Console/MetadataFilter.php">
-    <InvalidArgument>
-      <code><![CDATA[new ArrayIterator($metadatas)]]></code>
-    </InvalidArgument>
-    <MissingTemplateParam>
-      <code><![CDATA[MetadataFilter]]></code>
-    </MissingTemplateParam>
-  </file>
-  <file src="src/Tools/DebugUnitOfWorkListener.php">
-    <RedundantConditionGivenDocblockType>
-      <code><![CDATA[$state === UnitOfWork::STATE_DETACHED]]></code>
-    </RedundantConditionGivenDocblockType>
-  </file>
-  <file src="src/Tools/Pagination/LimitSubqueryOutputWalker.php">
-    <InvalidReturnStatement>
-      <code><![CDATA[$abstractSqlExecutor->getSqlStatements()]]></code>
-    </InvalidReturnStatement>
-    <InvalidReturnType>
-      <code><![CDATA[string]]></code>
-    </InvalidReturnType>
-    <PossiblyFalseArgument>
-      <code><![CDATA[strrpos($orderByItemString, ' ')]]></code>
-    </PossiblyFalseArgument>
-    <PossiblyNullIterator>
-      <code><![CDATA[$orderByClause->orderByItems]]></code>
-    </PossiblyNullIterator>
-    <PossiblyNullPropertyAssignmentValue>
-      <code><![CDATA[$AST->orderByClause]]></code>
-    </PossiblyNullPropertyAssignmentValue>
-    <PossiblyNullPropertyFetch>
-      <code><![CDATA[$orderByClause->orderByItems]]></code>
-    </PossiblyNullPropertyFetch>
-  </file>
-  <file src="src/Tools/Pagination/Paginator.php">
-    <ArgumentTypeCoercion>
-      <code><![CDATA[$parameters]]></code>
-    </ArgumentTypeCoercion>
-  </file>
-  <file src="src/Tools/Pagination/RowNumberOverFunction.php">
-    <PropertyNotSetInConstructor>
-      <code><![CDATA[$orderByClause]]></code>
-    </PropertyNotSetInConstructor>
-  </file>
-  <file src="src/Tools/SchemaTool.php">
-    <ArgumentTypeCoercion>
-      <code><![CDATA[$classes]]></code>
-    </ArgumentTypeCoercion>
-    <MissingClosureParamType>
-      <code><![CDATA[$asset]]></code>
-    </MissingClosureParamType>
-    <PossiblyNullArgument>
-      <code><![CDATA[$referencedFieldName]]></code>
-    </PossiblyNullArgument>
-    <RedundantCondition>
-      <code><![CDATA[is_numeric($indexName)]]></code>
-    </RedundantCondition>
-    <TypeDoesNotContainType>
-      <code><![CDATA[$indexName]]></code>
-    </TypeDoesNotContainType>
-  </file>
-  <file src="src/UnitOfWork.php">
-    <InvalidArgument>
-      <code><![CDATA[$collectionToDelete]]></code>
-      <code><![CDATA[$collectionToUpdate]]></code>
-    </InvalidArgument>
-    <InvalidPropertyAssignmentValue>
-      <code><![CDATA[$this->entityChangeSets]]></code>
-      <code><![CDATA[$this->entityChangeSets]]></code>
-    </InvalidPropertyAssignmentValue>
-    <NoValue>
-      <code><![CDATA[$entityState]]></code>
-      <code><![CDATA[$entityState]]></code>
-    </NoValue>
-    <PossiblyInvalidArgument>
-      <code><![CDATA[$value]]></code>
-    </PossiblyInvalidArgument>
-    <PossiblyInvalidArrayOffset>
-      <code><![CDATA[$this->identityMap[$rootClassName]]]></code>
-    </PossiblyInvalidArrayOffset>
-    <PossiblyNullArgument>
-      <code><![CDATA[$class->getTypeOfField($class->getSingleIdentifierFieldName())]]></code>
-      <code><![CDATA[$collection->getOwner()]]></code>
-      <code><![CDATA[$collection->getOwner()]]></code>
-      <code><![CDATA[$owner]]></code>
-    </PossiblyNullArgument>
-    <PossiblyNullReference>
-      <code><![CDATA[buildCachedCollectionPersister]]></code>
-      <code><![CDATA[buildCachedEntityPersister]]></code>
-      <code><![CDATA[getCacheFactory]]></code>
-      <code><![CDATA[getCacheFactory]]></code>
-      <code><![CDATA[getValue]]></code>
-      <code><![CDATA[getValue]]></code>
-      <code><![CDATA[getValue]]></code>
-      <code><![CDATA[getValue]]></code>
-      <code><![CDATA[getValue]]></code>
-      <code><![CDATA[getValue]]></code>
-      <code><![CDATA[getValue]]></code>
-      <code><![CDATA[getValue]]></code>
-      <code><![CDATA[setValue]]></code>
-      <code><![CDATA[setValue]]></code>
-      <code><![CDATA[setValue]]></code>
-      <code><![CDATA[setValue]]></code>
-      <code><![CDATA[setValue]]></code>
-      <code><![CDATA[setValue]]></code>
-      <code><![CDATA[setValue]]></code>
-      <code><![CDATA[setValue]]></code>
-      <code><![CDATA[setValue]]></code>
-      <code><![CDATA[setValue]]></code>
-      <code><![CDATA[setValue]]></code>
-      <code><![CDATA[setValue]]></code>
-      <code><![CDATA[setValue]]></code>
-    </PossiblyNullReference>
-    <PossiblyUndefinedMethod>
-      <code><![CDATA[unwrap]]></code>
-      <code><![CDATA[unwrap]]></code>
-      <code><![CDATA[unwrap]]></code>
-    </PossiblyUndefinedMethod>
-    <ReferenceConstraintViolation>
-      <code><![CDATA[$visited]]></code>
-    </ReferenceConstraintViolation>
-  </file>
-  <file src="src/Utility/HierarchyDiscriminatorResolver.php">
-    <NoInterfaceProperties>
-      <code><![CDATA[$rootClassMetadata->name]]></code>
-      <code><![CDATA[$rootClassMetadata->subClasses]]></code>
-    </NoInterfaceProperties>
-  </file>
-</files>
diff --git a/psalm.xml b/psalm.xml
deleted file mode 100644
index b399821aa34..00000000000
--- a/psalm.xml
+++ /dev/null
@@ -1,246 +0,0 @@
-<?xml version="1.0"?>
-<psalm
-    errorLevel="2"
-    phpVersion="8.2"
-    resolveFromConfigFile="true"
-    findUnusedBaselineEntry="true"
-    findUnusedCode="false"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xmlns="https://getpsalm.org/schema/config"
-    xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
-    errorBaseline="psalm-baseline.xml"
->
-    <projectFiles>
-        <directory name="src" />
-        <directory name="tests/StaticAnalysis" />
-        <ignoreFiles>
-            <directory name="vendor" />
-            <file name="src/Mapping/Driver/AttributeReader.php" />
-        </ignoreFiles>
-    </projectFiles>
-    <enableExtensions>
-        <extension name="simplexml" />
-    </enableExtensions>
-    <issueHandlers>
-        <DeprecatedClass>
-            <errorLevel type="suppress">
-                <!-- We wire the command as long as DBAL ships it -->
-                <referencedClass name="Doctrine\DBAL\Tools\Console\Command\ReservedWordsCommand" />
-                <!-- Remove on 3.0.x -->
-                <referencedClass name="Doctrine\ORM\Event\LifecycleEventArgs"/>
-                <referencedClass name="Doctrine\ORM\Exception\UnknownEntityNamespace"/>
-                <referencedClass name="Doctrine\ORM\Mapping\Driver\AnnotationDriver"/>
-                <referencedClass name="Doctrine\ORM\Mapping\Driver\YamlDriver"/>
-                <referencedClass name="Doctrine\ORM\Mapping\NamedNativeQueries"/>
-                <referencedClass name="Doctrine\ORM\Mapping\NamedNativeQuery"/>
-                <referencedClass name="Doctrine\ORM\Mapping\NamedQueries"/>
-                <referencedClass name="Doctrine\ORM\Mapping\NamedQuery"/>
-                <referencedClass name="Doctrine\ORM\Query\AST\InExpression"/>
-                <referencedClass name="Doctrine\ORM\Tools\Console\Command\ConvertDoctrine1SchemaCommand"/>
-                <referencedClass name="Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand"/>
-                <referencedClass name="Doctrine\ORM\Tools\Console\Command\EnsureProductionSettingsCommand"/>
-                <referencedClass name="Doctrine\ORM\Tools\Console\Command\GenerateEntitiesCommand"/>
-                <referencedClass name="Doctrine\ORM\Tools\Console\Command\GenerateRepositoriesCommand"/>
-                <referencedClass name="Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper"/>
-                <referencedClass name="Doctrine\ORM\Tools\Console\EntityManagerProvider\HelperSetManagerProvider"/>
-                <referencedClass name="Doctrine\Persistence\Mapping\StaticReflectionService"/>
-            </errorLevel>
-        </DeprecatedClass>
-        <DeprecatedMethod>
-            <errorLevel type="suppress">
-                <!-- Remove on 3.0.x -->
-                <!-- Compatibility with DBAL 3 -->
-                <referencedMethod name="Doctrine\DBAL\Connection::getEventManager"/>
-                <file name="src/Query/TreeWalkerChain.php"/>
-            </errorLevel>
-        </DeprecatedMethod>
-        <DocblockTypeContradiction>
-            <errorLevel type="suppress">
-                <!-- We're catching invalid input here. -->
-                <file name="src/Internal/Hydration/AbstractHydrator.php"/>
-
-                <!-- DBAL 3.2 forward compatibility -->
-                <file name="src/Tools/Pagination/CountOutputWalker.php"/>
-                <file name="src/Tools/Pagination/LimitSubqueryOutputWalker.php"/>
-                <!-- https://github.com/vimeo/psalm/issues/8520 -->
-                <file name="src/PersistentCollection.php"/>
-                <!-- Remove on 4.0.x -->
-                <file name="src/Mapping/Driver/AttributeDriver.php"/>
-                <file name="src/Mapping/Driver/XmlDriver.php"/>
-                <file name="src/ORMSetup.php"/>
-            </errorLevel>
-        </DocblockTypeContradiction>
-        <ForbiddenCode>
-            <errorLevel type="suppress">
-                <file name="src/Tools/Debug.php"/>
-            </errorLevel>
-        </ForbiddenCode>
-        <InvalidArgument>
-            <errorLevel type="suppress">
-                <referencedFunction name="Doctrine\ORM\Mapping\ClassMetadata::addInheritedAssociationMapping"/>
-            </errorLevel>
-        </InvalidArgument>
-        <InvalidArrayAccess>
-            <errorLevel type="suppress">
-                <!-- https://github.com/vimeo/psalm/issues/9160 -->
-                <file name="src/Mapping/ClassMetadataFactory.php"/>
-            </errorLevel>
-        </InvalidArrayAccess>
-        <InvalidArrayAssignment>
-            <errorLevel type="suppress">
-                <!-- https://github.com/vimeo/psalm/issues/9160 -->
-                <file name="src/Mapping/ClassMetadataFactory.php"/>
-            </errorLevel>
-        </InvalidArrayAssignment>
-        <LessSpecificReturnStatement>
-            <errorLevel type="suppress">
-                <!-- In DBAL 4, column precision is nullable. See https://github.com/doctrine/dbal/pull/3511 -->
-                <file name="src/Mapping/Driver/DatabaseDriver.php"/>
-            </errorLevel>
-        </LessSpecificReturnStatement>
-        <MoreSpecificReturnType>
-            <errorLevel type="suppress">
-                <!-- In DBAL 4, the default column value is mixed. See https://github.com/doctrine/dbal/pull/3511 -->
-                <file name="src/Mapping/Driver/DatabaseDriver.php"/>
-            </errorLevel>
-        </MoreSpecificReturnType>
-        <InvalidReturnType>
-            <errorLevel type="suppress">
-                <!-- https://github.com/vimeo/psalm/issues/8819 -->
-                <file name="src/Internal/Hydration/AbstractHydrator.php"/>
-            </errorLevel>
-        </InvalidReturnType>
-        <InvalidParamDefault>
-            <errorLevel type="suppress">
-                <!-- Remove on 3.0.x -->
-                <file name="src/Query/AST/InstanceOfExpression.php"/>
-            </errorLevel>
-        </InvalidParamDefault>
-        <InvalidPropertyAssignmentValue>
-            <errorLevel type="suppress">
-                <!-- https://github.com/vimeo/psalm/issues/9155 -->
-                <file name="src/Mapping/ClassMetadataFactory.php"/>
-            </errorLevel>
-        </InvalidPropertyAssignmentValue>
-        <MethodSignatureMismatch>
-            <errorLevel type="suppress">
-                <!-- See https://github.com/vimeo/psalm/issues/7357 -->
-                <file name="src/Mapping/ReflectionReadonlyProperty.php"/>
-            </errorLevel>
-        </MethodSignatureMismatch>
-        <MissingParamType>
-            <errorLevel type="suppress">
-                <!-- Persistence 2 compatibility -->
-                <file name="src/EntityManager.php"/>
-                <file name="src/Mapping/ClassMetadataFactory.php"/>
-                <file name="src/Mapping/ClassMetadata.php"/>
-            </errorLevel>
-        </MissingParamType>
-        <PossiblyInvalidArgument>
-            <errorLevel type="suppress">
-                <!-- https://github.com/vimeo/psalm/issues/9155 -->
-                <file name="src/Mapping/ClassMetadataFactory.php"/>
-            </errorLevel>
-        </PossiblyInvalidArgument>
-        <PossiblyNullArrayOffset>
-            <errorLevel type="suppress">
-                <!-- https://github.com/vimeo/psalm/issues/7878 -->
-                <file name="src/Persisters/Collection/ManyToManyPersister.php"/>
-            </errorLevel>
-        </PossiblyNullArrayOffset>
-        <PropertyNotSetInConstructor>
-            <errorLevel type="suppress">
-                <directory name="src/Query/AST" />
-            </errorLevel>
-        </PropertyNotSetInConstructor>
-        <PropertyTypeCoercion>
-            <errorLevel type="suppress">
-                <file name="src/Mapping/ClassMetadata.php"/>
-            </errorLevel>
-        </PropertyTypeCoercion>
-        <RedundantCastGivenDocblockType>
-            <errorLevel type="suppress">
-                <!-- Can be removed once the "getMaxResults" methods of those classes have native parameter types -->
-                <file name="src/Query.php"/>
-                <file name="src/QueryBuilder.php"/>
-            </errorLevel>
-        </RedundantCastGivenDocblockType>
-        <ReferenceConstraintViolation>
-            <errorLevel type="suppress">
-                <!-- https://github.com/vimeo/psalm/issues/9155 -->
-                <file name="src/Mapping/ClassMetadataFactory.php"/>
-            </errorLevel>
-        </ReferenceConstraintViolation>
-        <RiskyTruthyFalsyComparison>
-            <!-- TODO: Enable this new rule on higher branches. -->
-            <errorLevel type="suppress">
-                <directory name="src" />
-            </errorLevel>
-        </RiskyTruthyFalsyComparison>
-        <TooManyArguments>
-            <errorLevel type="suppress">
-                <!-- Symfony cache supports passing a key prefix to the clear method. -->
-                <referencedFunction name="Psr\Cache\CacheItemPoolInterface::clear"/>
-
-                <!-- Persistence 2 compatibility -->
-                <referencedFunction name="Doctrine\Persistence\ObjectManager::clear"/>
-
-                <!-- See https://github.com/doctrine/orm/issues/8850 -->
-                <referencedFunction name="Doctrine\DBAL\Connection::lastInsertId"/>
-
-                <!-- FIXME -->
-                <referencedFunction name="Doctrine\DBAL\DriverManager::getConnection"/>
-            </errorLevel>
-        </TooManyArguments>
-        <TypeDoesNotContainNull>
-            <errorLevel type="suppress">
-                <!-- DBAL 3 compatibility -->
-                <file name="src/Tools/SchemaTool.php"/>
-            </errorLevel>
-        </TypeDoesNotContainNull>
-        <TypeDoesNotContainType>
-            <errorLevel type="suppress">
-                <file name="src/Internal/SQLResultCasing.php"/>
-                <file name="src/Mapping/ClassMetadataFactory.php"/>
-                <!-- DBAL 3 compatibility -->
-                <file name="src/UnitOfWork.php"/>
-                <file name="src/Utility/LockSqlHelper.php"/>
-            </errorLevel>
-        </TypeDoesNotContainType>
-        <UndefinedClass>
-            <errorLevel type="suppress">
-                <!-- Compatibility with DBAL 3 -->
-                <referencedClass name="Doctrine\DBAL\Platforms\SQLitePlatform"/>
-            </errorLevel>
-        </UndefinedClass>
-        <UndefinedMethod>
-            <errorLevel type="suppress">
-                <!-- Compatibility with DBAL 3 -->
-                <referencedMethod name="Doctrine\DBAL\Connection::getEventManager"/>
-                <!-- FIXME -->
-                <referencedMethod name="Doctrine\DBAL\Schema\SchemaDiff::toSaveSql"/>
-            </errorLevel>
-        </UndefinedMethod>
-        <UndefinedPropertyFetch>
-            <errorLevel type="suppress">
-                <!-- https://github.com/vimeo/psalm/issues/7878 -->
-                <file name="src/Persisters/Collection/ManyToManyPersister.php"/>
-                <file name="src/PersistentCollection.php"/>
-                <file name="src/Utility/PersisterHelper.php"/>
-                <file name="src/Tools/SchemaValidator.php"/>
-            </errorLevel>
-        </UndefinedPropertyFetch>
-        <UnhandledMatchCondition>
-            <errorLevel type="suppress">
-                <!-- We can be certain that those values are not matched. -->
-                <file name="src/Persisters/Entity/BasicEntityPersister.php"/>
-            </errorLevel>
-        </UnhandledMatchCondition>
-        <ArgumentTypeCoercion>
-            <errorLevel type="suppress">
-                <!-- See https://github.com/JetBrains/phpstorm-stubs/pull/1383 -->
-                <file name="src/Mapping/ClassMetadata.php"/>
-            </errorLevel>
-        </ArgumentTypeCoercion>
-    </issueHandlers>
-</psalm>
diff --git a/src/AbstractQuery.php b/src/AbstractQuery.php
index 0ff92c30089..62862e9a915 100644
--- a/src/AbstractQuery.php
+++ b/src/AbstractQuery.php
@@ -83,7 +83,7 @@ abstract class AbstractQuery
      * The parameter map of this query.
      *
      * @var ArrayCollection|Parameter[]
-     * @psalm-var ArrayCollection<int, Parameter>
+     * @phpstan-var ArrayCollection<int, Parameter>
      */
     protected ArrayCollection $parameters;
 
@@ -95,14 +95,14 @@ abstract class AbstractQuery
     /**
      * The map of query hints.
      *
-     * @psalm-var array<string, mixed>
+     * @phpstan-var array<string, mixed>
      */
     protected array $hints = [];
 
     /**
      * The hydration mode.
      *
-     * @psalm-var string|AbstractQuery::HYDRATE_*
+     * @phpstan-var string|AbstractQuery::HYDRATE_*
      */
     protected string|int $hydrationMode = self::HYDRATE_OBJECT;
 
@@ -130,7 +130,7 @@ abstract class AbstractQuery
     /**
      * Second level query cache mode.
      *
-     * @psalm-var Cache::MODE_*|null
+     * @phpstan-var Cache::MODE_*|null
      */
     protected int|null $cacheMode = null;
 
@@ -217,14 +217,14 @@ public function setLifetime(int $lifetime): static
         return $this;
     }
 
-    /** @psalm-return Cache::MODE_*|null */
+    /** @phpstan-return Cache::MODE_*|null */
     public function getCacheMode(): int|null
     {
         return $this->cacheMode;
     }
 
     /**
-     * @psalm-param Cache::MODE_* $cacheMode
+     * @phpstan-param Cache::MODE_* $cacheMode
      *
      * @return $this
      */
@@ -267,7 +267,7 @@ public function free(): void
     /**
      * Get all defined parameters.
      *
-     * @psalm-return ArrayCollection<int, Parameter>
+     * @phpstan-return ArrayCollection<int, Parameter>
      */
     public function getParameters(): ArrayCollection
     {
@@ -296,14 +296,14 @@ public function getParameter(int|string $key): Parameter|null
      * Sets a collection of query parameters.
      *
      * @param ArrayCollection|mixed[] $parameters
-     * @psalm-param ArrayCollection<int, Parameter>|mixed[] $parameters
+     * @phpstan-param ArrayCollection<int, Parameter>|mixed[] $parameters
      *
      * @return $this
      */
     public function setParameters(ArrayCollection|array $parameters): static
     {
         if (is_array($parameters)) {
-            /** @psalm-var ArrayCollection<int, Parameter> $parameterCollection */
+            /** @phpstan-var ArrayCollection<int, Parameter> $parameterCollection */
             $parameterCollection = new ArrayCollection();
 
             foreach ($parameters as $key => $value) {
@@ -642,7 +642,7 @@ public function getQueryCacheProfile(): QueryCacheProfile|null
      * Change the default fetch mode of an association for this query.
      *
      * @param class-string $class
-     * @psalm-param Mapping\ClassMetadata::FETCH_EAGER|Mapping\ClassMetadata::FETCH_LAZY $fetchMode
+     * @phpstan-param Mapping\ClassMetadata::FETCH_EAGER|Mapping\ClassMetadata::FETCH_LAZY $fetchMode
      */
     public function setFetchMode(string $class, string $assocName, int $fetchMode): static
     {
@@ -656,7 +656,7 @@ public function setFetchMode(string $class, string $assocName, int $fetchMode):
      *
      * @param string|int $hydrationMode Doctrine processing mode to be used during hydration process.
      *                                  One of the Query::HYDRATE_* constants.
-     * @psalm-param string|AbstractQuery::HYDRATE_* $hydrationMode
+     * @phpstan-param string|AbstractQuery::HYDRATE_* $hydrationMode
      *
      * @return $this
      */
@@ -670,7 +670,7 @@ public function setHydrationMode(string|int $hydrationMode): static
     /**
      * Gets the hydration mode currently used by the query.
      *
-     * @psalm-return string|AbstractQuery::HYDRATE_*
+     * @phpstan-return string|AbstractQuery::HYDRATE_*
      */
     public function getHydrationMode(): string|int
     {
@@ -682,7 +682,7 @@ public function getHydrationMode(): string|int
      *
      * Alias for execute(null, $hydrationMode = HYDRATE_OBJECT).
      *
-     * @psalm-param string|AbstractQuery::HYDRATE_* $hydrationMode
+     * @phpstan-param string|AbstractQuery::HYDRATE_* $hydrationMode
      */
     public function getResult(string|int $hydrationMode = self::HYDRATE_OBJECT): mixed
     {
@@ -728,7 +728,7 @@ public function getScalarResult(): array
     /**
      * Get exactly one result or null.
      *
-     * @psalm-param string|AbstractQuery::HYDRATE_*|null $hydrationMode
+     * @phpstan-param string|AbstractQuery::HYDRATE_*|null $hydrationMode
      *
      * @throws NonUniqueResultException
      */
@@ -763,7 +763,7 @@ public function getOneOrNullResult(string|int|null $hydrationMode = null): mixed
      * If the result is not unique, a NonUniqueResultException is thrown.
      * If there is no result, a NoResultException is thrown.
      *
-     * @psalm-param string|AbstractQuery::HYDRATE_*|null $hydrationMode
+     * @phpstan-param string|AbstractQuery::HYDRATE_*|null $hydrationMode
      *
      * @throws NonUniqueResultException If the query result is not unique.
      * @throws NoResultException        If the query returned no result.
@@ -843,8 +843,8 @@ public function getHints(): array
      * Executes the query and returns an iterable that can be used to incrementally
      * iterate over the result.
      *
-     * @psalm-param ArrayCollection<int, Parameter>|mixed[] $parameters
-     * @psalm-param string|AbstractQuery::HYDRATE_*|null    $hydrationMode
+     * @phpstan-param ArrayCollection<int, Parameter>|mixed[] $parameters
+     * @phpstan-param string|AbstractQuery::HYDRATE_*|null    $hydrationMode
      *
      * @return iterable<mixed>
      */
@@ -877,8 +877,8 @@ public function toIterable(
     /**
      * Executes the query.
      *
-     * @psalm-param ArrayCollection<int, Parameter>|mixed[]|null $parameters
-     * @psalm-param string|AbstractQuery::HYDRATE_*|null         $hydrationMode
+     * @phpstan-param ArrayCollection<int, Parameter>|mixed[]|null $parameters
+     * @phpstan-param string|AbstractQuery::HYDRATE_*|null         $hydrationMode
      */
     public function execute(
         ArrayCollection|array|null $parameters = null,
@@ -894,8 +894,8 @@ public function execute(
     /**
      * Execute query ignoring second level cache.
      *
-     * @psalm-param ArrayCollection<int, Parameter>|mixed[]|null $parameters
-     * @psalm-param string|AbstractQuery::HYDRATE_*|null         $hydrationMode
+     * @phpstan-param ArrayCollection<int, Parameter>|mixed[]|null $parameters
+     * @phpstan-param string|AbstractQuery::HYDRATE_*|null         $hydrationMode
      */
     private function executeIgnoreQueryCache(
         ArrayCollection|array|null $parameters = null,
@@ -965,8 +965,8 @@ private function getHydrationCache(): CacheItemPoolInterface
     /**
      * Load from second level cache or executes the query and put into cache.
      *
-     * @psalm-param ArrayCollection<int, Parameter>|mixed[]|null $parameters
-     * @psalm-param string|AbstractQuery::HYDRATE_*|null         $hydrationMode
+     * @phpstan-param ArrayCollection<int, Parameter>|mixed[]|null $parameters
+     * @phpstan-param string|AbstractQuery::HYDRATE_*|null         $hydrationMode
      */
     private function executeUsingQueryCache(
         ArrayCollection|array|null $parameters = null,
@@ -1029,7 +1029,7 @@ private function getTimestampKey(): TimestampCacheKey|null
      * automatically generated for you.
      *
      * @return string[] ($key, $hash)
-     * @psalm-return array{string, string} ($key, $hash)
+     * @phpstan-return array{string, string} ($key, $hash)
      */
     protected function getHydrationCacheId(): array
     {
diff --git a/src/Cache/DefaultCache.php b/src/Cache/DefaultCache.php
index 685181c906e..3f947cf773b 100644
--- a/src/Cache/DefaultCache.php
+++ b/src/Cache/DefaultCache.php
@@ -25,7 +25,7 @@ class DefaultCache implements Cache
 
     /**
      * @var QueryCache[]
-     * @psalm-var array<string, QueryCache>
+     * @phpstan-var array<string, QueryCache>
      */
     private array $queryCaches = [];
 
diff --git a/src/Cache/DefaultQueryCache.php b/src/Cache/DefaultQueryCache.php
index 08e703cd4b0..bf0cbc1b362 100644
--- a/src/Cache/DefaultQueryCache.php
+++ b/src/Cache/DefaultQueryCache.php
@@ -297,7 +297,7 @@ public function put(QueryCacheKey $key, ResultSetMapping $rsm, mixed $result, ar
 
     /**
      * @return mixed[]|null
-     * @psalm-return array{targetEntity: class-string, type: mixed, list?: array[], identifier?: array}|null
+     * @phpstan-return array{targetEntity: class-string, type: mixed, list?: array[], identifier?: array}|null
      */
     private function storeAssociationCache(QueryCacheKey $key, AssociationMapping $assoc, mixed $assocValue): array|null
     {
@@ -348,7 +348,7 @@ private function storeAssociationCache(QueryCacheKey $key, AssociationMapping $a
         ];
     }
 
-    /** @psalm-return list<mixed>|object|null */
+    /** @phpstan-return list<mixed>|object|null */
     private function getAssociationValue(
         ResultSetMapping $rsm,
         string $assocAlias,
@@ -374,9 +374,9 @@ private function getAssociationValue(
     }
 
     /**
-     * @psalm-param array<array-key, array{field: string, class: string}> $path
+     * @phpstan-param array<array-key, array{field: string, class: string}> $path
      *
-     * @psalm-return list<mixed>|object|null
+     * @phpstan-return list<mixed>|object|null
      */
     private function getAssociationPathValue(mixed $value, array $path): array|object|null
     {
diff --git a/src/Configuration.php b/src/Configuration.php
index 59ddb214d8a..361d146a50b 100644
--- a/src/Configuration.php
+++ b/src/Configuration.php
@@ -41,16 +41,16 @@ class Configuration extends \Doctrine\DBAL\Configuration
     /** @var mixed[] */
     protected array $attributes = [];
 
-    /** @psalm-var array<class-string<AbstractPlatform>, ClassMetadata::GENERATOR_TYPE_*> */
+    /** @phpstan-var array<class-string<AbstractPlatform>, ClassMetadata::GENERATOR_TYPE_*> */
     private $identityGenerationPreferences = [];
 
-    /** @psalm-param array<class-string<AbstractPlatform>, ClassMetadata::GENERATOR_TYPE_*> $value */
+    /** @phpstan-param array<class-string<AbstractPlatform>, ClassMetadata::GENERATOR_TYPE_*> $value */
     public function setIdentityGenerationPreferences(array $value): void
     {
         $this->identityGenerationPreferences = $value;
     }
 
-    /** @psalm-return array<class-string<AbstractPlatform>, ClassMetadata::GENERATOR_TYPE_*> $value */
+    /** @phpstan-return array<class-string<AbstractPlatform>, ClassMetadata::GENERATOR_TYPE_*> $value */
     public function getIdentityGenerationPreferences(): array
     {
         return $this->identityGenerationPreferences;
@@ -122,7 +122,7 @@ public function setMetadataDriverImpl(MappingDriver $driverImpl): void
     /**
      * Sets the entity alias map.
      *
-     * @psalm-param array<string, string> $entityNamespaces
+     * @phpstan-param array<string, string> $entityNamespaces
      */
     public function setEntityNamespaces(array $entityNamespaces): void
     {
@@ -132,7 +132,7 @@ public function setEntityNamespaces(array $entityNamespaces): void
     /**
      * Retrieves the list of registered entity namespace aliases.
      *
-     * @psalm-return array<string, string>
+     * @phpstan-return array<string, string>
      */
     public function getEntityNamespaces(): array
     {
@@ -191,7 +191,7 @@ public function setMetadataCache(CacheItemPoolInterface $cache): void
      * DQL function names are case-insensitive.
      *
      * @param class-string|callable $className Class name or a callable that returns the function.
-     * @psalm-param class-string<FunctionNode>|callable(string):FunctionNode $className
+     * @phpstan-param class-string<FunctionNode>|callable(string):FunctionNode $className
      */
     public function addCustomStringFunction(string $name, string|callable $className): void
     {
@@ -201,7 +201,7 @@ public function addCustomStringFunction(string $name, string|callable $className
     /**
      * Gets the implementation class name of a registered custom string DQL function.
      *
-     * @psalm-return class-string<FunctionNode>|callable(string):FunctionNode|null
+     * @phpstan-return class-string<FunctionNode>|callable(string):FunctionNode|null
      */
     public function getCustomStringFunction(string $name): string|callable|null
     {
@@ -218,7 +218,7 @@ public function getCustomStringFunction(string $name): string|callable|null
      *
      * Any previously added string functions are discarded.
      *
-     * @psalm-param array<string, class-string<FunctionNode>|callable(string):FunctionNode> $functions The map of custom
+     * @phpstan-param array<string, class-string<FunctionNode>|callable(string):FunctionNode> $functions The map of custom
      *                                                     DQL string functions.
      */
     public function setCustomStringFunctions(array $functions): void
@@ -236,7 +236,7 @@ public function setCustomStringFunctions(array $functions): void
      * DQL function names are case-insensitive.
      *
      * @param class-string|callable $className Class name or a callable that returns the function.
-     * @psalm-param class-string<FunctionNode>|callable(string):FunctionNode $className
+     * @phpstan-param class-string<FunctionNode>|callable(string):FunctionNode $className
      */
     public function addCustomNumericFunction(string $name, string|callable $className): void
     {
@@ -246,7 +246,7 @@ public function addCustomNumericFunction(string $name, string|callable $classNam
     /**
      * Gets the implementation class name of a registered custom numeric DQL function.
      *
-     * @psalm-return ?class-string<FunctionNode>|callable(string):FunctionNode
+     * @phpstan-return class-string<FunctionNode>|callable(string):FunctionNode|null
      */
     public function getCustomNumericFunction(string $name): string|callable|null
     {
@@ -281,7 +281,7 @@ public function setCustomNumericFunctions(array $functions): void
      * DQL function names are case-insensitive.
      *
      * @param string|callable $className Class name or a callable that returns the function.
-     * @psalm-param class-string<FunctionNode>|callable(string):FunctionNode $className
+     * @phpstan-param class-string<FunctionNode>|callable(string):FunctionNode $className
      */
     public function addCustomDatetimeFunction(string $name, string|callable $className): void
     {
@@ -309,7 +309,7 @@ public function getCustomDatetimeFunction(string $name): string|callable|null
      * Any previously added date/time functions are discarded.
      *
      * @param array $functions The map of custom DQL date/time functions.
-     * @psalm-param array<string, class-string<FunctionNode>|callable(string):FunctionNode> $functions
+     * @phpstan-param array<string, class-string<FunctionNode>|callable(string):FunctionNode> $functions
      */
     public function setCustomDatetimeFunctions(array $functions): void
     {
@@ -538,7 +538,7 @@ public function getSecondLevelCacheConfiguration(): CacheConfiguration|null
     /**
      * Returns query hints, which will be applied to every query in application
      *
-     * @psalm-return array<string, mixed>
+     * @phpstan-return array<string, mixed>
      */
     public function getDefaultQueryHints(): array
     {
@@ -548,7 +548,7 @@ public function getDefaultQueryHints(): array
     /**
      * Sets array of query hints, which will be applied to every query in application
      *
-     * @psalm-param array<string, mixed> $defaultQueryHints
+     * @phpstan-param array<string, mixed> $defaultQueryHints
      */
     public function setDefaultQueryHints(array $defaultQueryHints): void
     {
diff --git a/src/EntityManager.php b/src/EntityManager.php
index 5324d9cac7b..06b34689abf 100644
--- a/src/EntityManager.php
+++ b/src/EntityManager.php
@@ -586,7 +586,7 @@ public function hasFilters(): bool
     }
 
     /**
-     * @psalm-param LockMode::* $lockMode
+     * @phpstan-param LockMode::* $lockMode
      *
      * @throws OptimisticLockException
      * @throws TransactionRequiredException
diff --git a/src/EntityManagerInterface.php b/src/EntityManagerInterface.php
index d4c64ef06dc..03dbdbbea19 100644
--- a/src/EntityManagerInterface.php
+++ b/src/EntityManagerInterface.php
@@ -71,10 +71,10 @@ public function beginTransaction(): void;
      * If an exception occurs during execution of the function or flushing or transaction commit,
      * the transaction is rolled back, the EntityManager closed and the exception re-thrown.
      *
-     * @psalm-param callable(self): T $func The function to execute transactionally.
+     * @phpstan-param callable(self): T $func The function to execute transactionally.
      *
      * @return mixed The value returned from the closure.
-     * @psalm-return T
+     * @phpstan-return T
      *
      * @template T
      */
@@ -117,11 +117,11 @@ public function createQueryBuilder(): QueryBuilder;
      *                                       during the search.
      * @param int|null          $lockVersion The version of the entity to find when using
      *                                       optimistic locking.
-     * @psalm-param class-string<T> $className
-     * @psalm-param LockMode::*|null $lockMode
+     * @phpstan-param class-string<T> $className
+     * @phpstan-param LockMode::*|null $lockMode
      *
      * @return object|null The entity instance or NULL if the entity can not be found.
-     * @psalm-return T|null
+     * @phpstan-return T|null
      *
      * @throws OptimisticLockException
      * @throws ORMInvalidArgumentException
@@ -139,7 +139,7 @@ public function find(string $className, mixed $id, LockMode|int|null $lockMode =
      * @param LockMode|int|null $lockMode One of the \Doctrine\DBAL\LockMode::* constants
      *                                    or NULL if no specific lock mode should be used
      *                                    during the search.
-     * @psalm-param LockMode::*|null $lockMode
+     * @phpstan-param LockMode::*|null $lockMode
      *
      * @throws ORMInvalidArgumentException
      * @throws ORMException
@@ -172,7 +172,7 @@ public function close(): void;
     /**
      * Acquire a lock on the given entity.
      *
-     * @psalm-param LockMode::* $lockMode
+     * @phpstan-param LockMode::* $lockMode
      *
      * @throws OptimisticLockException
      * @throws PessimisticLockException
@@ -202,7 +202,7 @@ public function getUnitOfWork(): UnitOfWork;
     /**
      * Create a new instance for the given hydration mode.
      *
-     * @psalm-param string|AbstractQuery::HYDRATE_* $hydrationMode
+     * @phpstan-param string|AbstractQuery::HYDRATE_* $hydrationMode
      *
      * @throws ORMException
      */
@@ -233,9 +233,9 @@ public function hasFilters(): bool;
      *
      * @param string|class-string<T> $className
      *
-     * @psalm-return ($className is class-string<T> ? Mapping\ClassMetadata<T> : Mapping\ClassMetadata<object>)
+     * @phpstan-return ($className is class-string<T> ? Mapping\ClassMetadata<T> : Mapping\ClassMetadata<object>)
      *
-     * @psalm-template T of object
+     * @phpstan-template T of object
      */
     public function getClassMetadata(string $className): Mapping\ClassMetadata;
 }
diff --git a/src/EntityRepository.php b/src/EntityRepository.php
index 87a264344f7..fb1315b785d 100644
--- a/src/EntityRepository.php
+++ b/src/EntityRepository.php
@@ -76,10 +76,10 @@ public function createResultSetMappingBuilder(string $alias): ResultSetMappingBu
      * @param LockMode|int|null $lockMode One of the \Doctrine\DBAL\LockMode::* constants
      *                                    or NULL if no specific lock mode should be used
      *                                    during the search.
-     * @psalm-param LockMode::*|null $lockMode
+     * @phpstan-param LockMode::*|null $lockMode
      *
      * @return object|null The entity instance or NULL if the entity can not be found.
-     * @psalm-return ?T
+     * @phpstan-return ?T
      */
     public function find(mixed $id, LockMode|int|null $lockMode = null, int|null $lockVersion = null): object|null
     {
@@ -89,7 +89,7 @@ public function find(mixed $id, LockMode|int|null $lockMode = null, int|null $lo
     /**
      * Finds all entities in the repository.
      *
-     * @psalm-return list<T> The entities.
+     * @phpstan-return list<T> The entities.
      */
     public function findAll(): array
     {
@@ -101,7 +101,7 @@ public function findAll(): array
      *
      * {@inheritDoc}
      *
-     * @psalm-return list<T>
+     * @phpstan-return list<T>
      */
     public function findBy(array $criteria, array|null $orderBy = null, int|null $limit = null, int|null $offset = null): array
     {
@@ -113,10 +113,10 @@ public function findBy(array $criteria, array|null $orderBy = null, int|null $li
     /**
      * Finds a single entity by a set of criteria.
      *
-     * @psalm-param array<string, mixed> $criteria
-     * @psalm-param array<string, string>|null $orderBy
+     * @phpstan-param array<string, mixed> $criteria
+     * @phpstan-param array<string, string>|null $orderBy
      *
-     * @psalm-return T|null
+     * @phpstan-return T|null
      */
     public function findOneBy(array $criteria, array|null $orderBy = null): object|null
     {
@@ -128,10 +128,10 @@ public function findOneBy(array $criteria, array|null $orderBy = null): object|n
     /**
      * Counts entities by a set of criteria.
      *
-     * @psalm-param array<string, mixed> $criteria
+     * @phpstan-param array<string, mixed> $criteria
      *
      * @return int The cardinality of the objects that match the given criteria.
-     * @psalm-return 0|positive-int
+     * @phpstan-return 0|positive-int
      *
      * @todo Add this method to `ObjectRepository` interface in the next major release
      */
@@ -144,7 +144,7 @@ public function count(array $criteria = []): int
      * Adds support for magic method calls.
      *
      * @param mixed[] $arguments
-     * @psalm-param list<mixed> $arguments
+     * @phpstan-param list<mixed> $arguments
      *
      * @throws BadMethodCallException If the method called is invalid.
      */
@@ -185,7 +185,7 @@ protected function getEntityManager(): EntityManagerInterface
         return $this->em;
     }
 
-    /** @psalm-return ClassMetadata<T> */
+    /** @phpstan-return ClassMetadata<T> */
     protected function getClassMetadata(): ClassMetadata
     {
         return $this->class;
@@ -195,7 +195,7 @@ protected function getClassMetadata(): ClassMetadata
      * Select all elements from a selectable that match the expression and
      * return a new collection containing these elements.
      *
-     * @psalm-return AbstractLazyCollection<int, T>&Selectable<int, T>
+     * @phpstan-return AbstractLazyCollection<int, T>&Selectable<int, T>
      */
     public function matching(Criteria $criteria): AbstractLazyCollection&Selectable
     {
@@ -209,7 +209,7 @@ public function matching(Criteria $criteria): AbstractLazyCollection&Selectable
      *
      * @param string $method The method to call
      * @param string $by     The property name used as condition
-     * @psalm-param list<mixed> $arguments The arguments to pass at method call
+     * @phpstan-param list<mixed> $arguments The arguments to pass at method call
      *
      * @throws InvalidMagicMethodCall If the method called is invalid or the
      *                                requested field/association does not exist.
diff --git a/src/Event/ListenersInvoker.php b/src/Event/ListenersInvoker.php
index c0c327e5aad..b7e06912fbb 100644
--- a/src/Event/ListenersInvoker.php
+++ b/src/Event/ListenersInvoker.php
@@ -38,7 +38,7 @@ public function __construct(EntityManagerInterface $em)
      * @param ClassMetadata $metadata  The entity metadata.
      * @param string        $eventName The entity lifecycle event.
      *
-     * @psalm-return int-mask-of<self::INVOKE_*> Bitmask of subscribed event systems.
+     * @phpstan-return int-mask-of<self::INVOKE_*> Bitmask of subscribed event systems.
      */
     public function getSubscribedSystems(ClassMetadata $metadata, string $eventName): int
     {
@@ -66,7 +66,7 @@ public function getSubscribedSystems(ClassMetadata $metadata, string $eventName)
      * @param string        $eventName The entity lifecycle event.
      * @param object        $entity    The Entity on which the event occurred.
      * @param EventArgs     $event     The Event args.
-     * @psalm-param int-mask-of<self::INVOKE_*> $invoke Bitmask to invoke listeners.
+     * @phpstan-param int-mask-of<self::INVOKE_*> $invoke Bitmask to invoke listeners.
      */
     public function invoke(
         ClassMetadata $metadata,
diff --git a/src/Event/PreUpdateEventArgs.php b/src/Event/PreUpdateEventArgs.php
index 090487b8605..d50033414cf 100644
--- a/src/Event/PreUpdateEventArgs.php
+++ b/src/Event/PreUpdateEventArgs.php
@@ -24,7 +24,7 @@ class PreUpdateEventArgs extends LifecycleEventArgs
 
     /**
      * @param mixed[][] $changeSet
-     * @psalm-param array<string, array{mixed, mixed}|PersistentCollection> $changeSet
+     * @phpstan-param array<string, array{mixed, mixed}|PersistentCollection> $changeSet
      */
     public function __construct(object $entity, EntityManagerInterface $em, array &$changeSet)
     {
@@ -37,7 +37,7 @@ public function __construct(object $entity, EntityManagerInterface $em, array &$
      * Retrieves entity changeset.
      *
      * @return mixed[][]
-     * @psalm-return array<string, array{mixed, mixed}|PersistentCollection>
+     * @phpstan-return array<string, array{mixed, mixed}|PersistentCollection>
      */
     public function getEntityChangeSet(): array
     {
diff --git a/src/Internal/Hydration/AbstractHydrator.php b/src/Internal/Hydration/AbstractHydrator.php
index 2ccba498e63..0a44d3a02b5 100644
--- a/src/Internal/Hydration/AbstractHydrator.php
+++ b/src/Internal/Hydration/AbstractHydrator.php
@@ -29,7 +29,7 @@
  * Base class for all hydrators. A hydrator is a class that provides some form
  * of transformation of an SQL result set into another structure.
  *
- * @psalm-consistent-constructor
+ * @phpstan-consistent-constructor
  */
 abstract class AbstractHydrator
 {
@@ -86,7 +86,7 @@ public function __construct(protected EntityManagerInterface $em)
     /**
      * Initiates a row-by-row hydration.
      *
-     * @psalm-param array<string, mixed> $hints
+     * @phpstan-param array<string, mixed> $hints
      *
      * @return Generator<array-key, mixed>
      *
@@ -153,7 +153,7 @@ final protected function resultSetMapping(): ResultSetMapping
     /**
      * Hydrates all rows returned by the passed statement instance at once.
      *
-     * @psalm-param array<string, string> $hints
+     * @phpstan-param array<string, string> $hints
      */
     public function hydrateAll(Result $stmt, ResultSetMapping $resultSetMapping, array $hints = []): mixed
     {
@@ -242,14 +242,14 @@ abstract protected function hydrateAllData(): mixed;
      * the values applied. Scalar values are kept in a specific key 'scalars'.
      *
      * @param mixed[] $data SQL Result Row.
-     * @psalm-param array<string, string> $id                 Dql-Alias => ID-Hash.
-     * @psalm-param array<string, bool>   $nonemptyComponents Does this DQL-Alias has at least one non NULL value?
+     * @phpstan-param array<string, string> $id                 Dql-Alias => ID-Hash.
+     * @phpstan-param array<string, bool>   $nonemptyComponents Does this DQL-Alias has at least one non NULL value?
      *
      * @return array<string, array<string, mixed>> An array with all the fields
      *                                             (name => value) of the data
      *                                             row, grouped by their
      *                                             component alias.
-     * @psalm-return array{
+     * @phpstan-return array{
      *                   data: array<array-key, array>,
      *                   newObjects?: array<array-key, array{
      *                       class: ReflectionClass,
@@ -367,10 +367,10 @@ protected function gatherRowData(array $data, array &$id, array &$nonemptyCompon
      * of elements as before.
      *
      * @param mixed[] $data
-     * @psalm-param array<string, mixed> $data
+     * @phpstan-param array<string, mixed> $data
      *
      * @return mixed[] The processed row.
-     * @psalm-return array<string, mixed>
+     * @phpstan-return array<string, mixed>
      */
     protected function gatherScalarRowData(array &$data): array
     {
@@ -405,7 +405,7 @@ protected function gatherScalarRowData(array &$data): array
      * @param string $key Column name
      *
      * @return mixed[]|null
-     * @psalm-return array<string, mixed>|null
+     * @phpstan-return array<string, mixed>|null
      */
     protected function hydrateColumnInfo(string $key): array|null
     {
@@ -502,7 +502,7 @@ protected function hydrateColumnInfo(string $key): array|null
 
     /**
      * @return string[]
-     * @psalm-return non-empty-list<string>
+     * @phpstan-return non-empty-list<string>
      */
     private function getDiscriminatorValues(ClassMetadata $classMetadata): array
     {
diff --git a/src/Internal/Hydration/ObjectHydrator.php b/src/Internal/Hydration/ObjectHydrator.php
index fe780e8b892..21383e8c16e 100644
--- a/src/Internal/Hydration/ObjectHydrator.php
+++ b/src/Internal/Hydration/ObjectHydrator.php
@@ -213,7 +213,7 @@ private function initRelatedCollection(
      * Gets an entity instance.
      *
      * @param string $dqlAlias The DQL alias of the entity's class.
-     * @psalm-param array<string, mixed> $data     The instance data.
+     * @phpstan-param array<string, mixed> $data     The instance data.
      *
      * @throws HydrationException
      */
@@ -266,7 +266,7 @@ private function getEntity(array $data, string $dqlAlias): object
 
     /**
      * @param class-string $className
-     * @psalm-param array<string, mixed> $data
+     * @phpstan-param array<string, mixed> $data
      */
     private function getEntityFromIdentityMap(string $className, array $data): object|bool
     {
diff --git a/src/Internal/NoUnknownNamedArguments.php b/src/Internal/NoUnknownNamedArguments.php
index 7584744c162..a3843307f27 100644
--- a/src/Internal/NoUnknownNamedArguments.php
+++ b/src/Internal/NoUnknownNamedArguments.php
@@ -29,7 +29,7 @@ trait NoUnknownNamedArguments
      * @param TItem[] $parameter
      *
      * @template TItem
-     * @psalm-assert list<TItem> $parameter
+     * @phpstan-assert list<TItem> $parameter
      */
     private static function validateVariadicParameter(array $parameter): void
     {
diff --git a/src/Mapping/AssociationMapping.php b/src/Mapping/AssociationMapping.php
index ce7bdb40ab4..74bef09f9de 100644
--- a/src/Mapping/AssociationMapping.php
+++ b/src/Mapping/AssociationMapping.php
@@ -97,7 +97,7 @@ final public function __construct(
 
     /**
      * @param mixed[] $mappingArray
-     * @psalm-param array{
+     * @phpstan-param array{
      *     fieldName: string,
      *     sourceEntity: class-string,
      *     targetEntity: class-string,
@@ -153,75 +153,75 @@ public static function fromMappingArray(array $mappingArray): static
     }
 
     /**
-     * @psalm-assert-if-true OwningSideMapping $this
-     * @psalm-assert-if-false InverseSideMapping $this
+     * @phpstan-assert-if-true OwningSideMapping $this
+     * @phpstan-assert-if-false InverseSideMapping $this
      */
     final public function isOwningSide(): bool
     {
         return $this instanceof OwningSideMapping;
     }
 
-    /** @psalm-assert-if-true ToOneAssociationMapping $this */
+    /** @phpstan-assert-if-true ToOneAssociationMapping $this */
     final public function isToOne(): bool
     {
         return $this instanceof ToOneAssociationMapping;
     }
 
-    /** @psalm-assert-if-true ToManyAssociationMapping $this */
+    /** @phpstan-assert-if-true ToManyAssociationMapping $this */
     final public function isToMany(): bool
     {
         return $this instanceof ToManyAssociationMapping;
     }
 
-    /** @psalm-assert-if-true OneToOneOwningSideMapping $this */
+    /** @phpstan-assert-if-true OneToOneOwningSideMapping $this */
     final public function isOneToOneOwningSide(): bool
     {
         return $this->isOneToOne() && $this->isOwningSide();
     }
 
-    /** @psalm-assert-if-true OneToOneOwningSideMapping|ManyToOneAssociationMapping $this */
+    /** @phpstan-assert-if-true OneToOneOwningSideMapping|ManyToOneAssociationMapping $this */
     final public function isToOneOwningSide(): bool
     {
         return $this->isToOne() && $this->isOwningSide();
     }
 
-    /** @psalm-assert-if-true ManyToManyOwningSideMapping $this */
+    /** @phpstan-assert-if-true ManyToManyOwningSideMapping $this */
     final public function isManyToManyOwningSide(): bool
     {
         return $this instanceof ManyToManyOwningSideMapping;
     }
 
-    /** @psalm-assert-if-true OneToOneAssociationMapping $this */
+    /** @phpstan-assert-if-true OneToOneAssociationMapping $this */
     final public function isOneToOne(): bool
     {
         return $this instanceof OneToOneAssociationMapping;
     }
 
-    /** @psalm-assert-if-true OneToManyAssociationMapping $this */
+    /** @phpstan-assert-if-true OneToManyAssociationMapping $this */
     final public function isOneToMany(): bool
     {
         return $this instanceof OneToManyAssociationMapping;
     }
 
-    /** @psalm-assert-if-true ManyToOneAssociationMapping $this */
+    /** @phpstan-assert-if-true ManyToOneAssociationMapping $this */
     final public function isManyToOne(): bool
     {
         return $this instanceof ManyToOneAssociationMapping;
     }
 
-    /** @psalm-assert-if-true ManyToManyAssociationMapping $this */
+    /** @phpstan-assert-if-true ManyToManyAssociationMapping $this */
     final public function isManyToMany(): bool
     {
         return $this instanceof ManyToManyAssociationMapping;
     }
 
-    /** @psalm-assert-if-true ToManyAssociationMapping $this */
+    /** @phpstan-assert-if-true ToManyAssociationMapping $this */
     final public function isOrdered(): bool
     {
         return $this->isToMany() && $this->orderBy() !== [];
     }
 
-    /** @psalm-assert-if-true ToManyAssociationMapping $this */
+    /** @phpstan-assert-if-true ToManyAssociationMapping $this */
     public function isIndexed(): bool
     {
         return false;
diff --git a/src/Mapping/AssociationOverride.php b/src/Mapping/AssociationOverride.php
index e0ebc073fd3..a10372dbd2b 100644
--- a/src/Mapping/AssociationOverride.php
+++ b/src/Mapping/AssociationOverride.php
@@ -27,7 +27,7 @@ final class AssociationOverride implements MappingAttribute
      * @param JoinColumn|array<JoinColumn> $inverseJoinColumns
      * @param JoinTable|null               $joinTable          The join table that maps the relationship.
      * @param string|null                  $inversedBy         The name of the association-field on the inverse-side.
-     * @psalm-param 'LAZY'|'EAGER'|'EXTRA_LAZY'|null $fetch
+     * @phpstan-param 'LAZY'|'EAGER'|'EXTRA_LAZY'|null $fetch
      */
     public function __construct(
         public readonly string $name,
diff --git a/src/Mapping/Builder/ClassMetadataBuilder.php b/src/Mapping/Builder/ClassMetadataBuilder.php
index 48f052c86d5..2e9fca1a9d2 100644
--- a/src/Mapping/Builder/ClassMetadataBuilder.php
+++ b/src/Mapping/Builder/ClassMetadataBuilder.php
@@ -109,7 +109,7 @@ public function setTable(string $name): static
     /**
      * Adds Index.
      *
-     * @psalm-param list<string> $columns
+     * @phpstan-param list<string> $columns
      *
      * @return $this
      */
@@ -127,7 +127,7 @@ public function addIndex(array $columns, string $name): static
     /**
      * Adds Unique Constraint.
      *
-     * @psalm-param list<string> $columns
+     * @phpstan-param list<string> $columns
      *
      * @return $this
      */
@@ -235,7 +235,7 @@ public function addLifecycleEvent(string $methodName, string $event): static
     /**
      * Adds Field.
      *
-     * @psalm-param array<string, mixed> $mapping
+     * @phpstan-param array<string, mixed> $mapping
      *
      * @return $this
      */
diff --git a/src/Mapping/Builder/OneToManyAssociationBuilder.php b/src/Mapping/Builder/OneToManyAssociationBuilder.php
index 077c558cdd9..0b0e1aac9e1 100644
--- a/src/Mapping/Builder/OneToManyAssociationBuilder.php
+++ b/src/Mapping/Builder/OneToManyAssociationBuilder.php
@@ -12,7 +12,7 @@
 class OneToManyAssociationBuilder extends AssociationBuilder
 {
     /**
-     * @psalm-param array<string, string> $fieldNames
+     * @phpstan-param array<string, string> $fieldNames
      *
      * @return $this
      */
diff --git a/src/Mapping/Cache.php b/src/Mapping/Cache.php
index 3161ab3a545..5eda277c90a 100644
--- a/src/Mapping/Cache.php
+++ b/src/Mapping/Cache.php
@@ -10,7 +10,7 @@
 #[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_PROPERTY)]
 final class Cache implements MappingAttribute
 {
-    /** @psalm-param 'READ_ONLY'|'NONSTRICT_READ_WRITE'|'READ_WRITE' $usage */
+    /** @phpstan-param 'READ_ONLY'|'NONSTRICT_READ_WRITE'|'READ_WRITE' $usage */
     public function __construct(
         public readonly string $usage = 'READ_ONLY',
         public readonly string|null $region = null,
diff --git a/src/Mapping/ChangeTrackingPolicy.php b/src/Mapping/ChangeTrackingPolicy.php
index 7181d9f6f1c..f72fa5c550e 100644
--- a/src/Mapping/ChangeTrackingPolicy.php
+++ b/src/Mapping/ChangeTrackingPolicy.php
@@ -9,7 +9,7 @@
 #[Attribute(Attribute::TARGET_CLASS)]
 final class ChangeTrackingPolicy implements MappingAttribute
 {
-    /** @psalm-param 'DEFERRED_IMPLICIT'|'DEFERRED_EXPLICIT' $value */
+    /** @phpstan-param 'DEFERRED_IMPLICIT'|'DEFERRED_EXPLICIT' $value */
     public function __construct(
         public readonly string $value,
     ) {
diff --git a/src/Mapping/ClassMetadata.php b/src/Mapping/ClassMetadata.php
index f7745144fa6..7351d09bce0 100644
--- a/src/Mapping/ClassMetadata.php
+++ b/src/Mapping/ClassMetadata.php
@@ -71,7 +71,7 @@
  *    get the whole class name, namespace inclusive, prepended to every property in
  *    the serialized representation).
  *
- * @psalm-type ConcreteAssociationMapping = OneToOneOwningSideMapping|OneToOneInverseSideMapping|ManyToOneAssociationMapping|OneToManyAssociationMapping|ManyToManyOwningSideMapping|ManyToManyInverseSideMapping
+ * @phpstan-type ConcreteAssociationMapping = OneToOneOwningSideMapping|OneToOneInverseSideMapping|ManyToOneAssociationMapping|OneToManyAssociationMapping|ManyToManyOwningSideMapping|ManyToManyInverseSideMapping
  * @template-covariant T of object
  * @template-implements PersistenceClassMetadata<T>
  */
@@ -237,7 +237,7 @@ class ClassMetadata implements PersistenceClassMetadata, Stringable
      * hierarchy. If the entity is not part of a mapped inheritance hierarchy this is the same
      * as {@link $name}.
      *
-     * @psalm-var class-string
+     * @phpstan-var class-string
      */
     public string $rootEntityName;
 
@@ -261,7 +261,7 @@ class ClassMetadata implements PersistenceClassMetadata, Stringable
      * The name of the custom repository class used for the entity class.
      * (Optional).
      *
-     * @psalm-var ?class-string<EntityRepository>
+     * @phpstan-var ?class-string<EntityRepository>
      */
     public string|null $customRepositoryClassName = null;
 
@@ -279,7 +279,7 @@ class ClassMetadata implements PersistenceClassMetadata, Stringable
      * READ-ONLY: The names of the parent <em>entity</em> classes (ancestors), starting with the
      * nearest one and ending with the root entity class.
      *
-     * @psalm-var list<class-string>
+     * @phpstan-var list<class-string>
      */
     public array $parentClasses = [];
 
@@ -306,14 +306,14 @@ class ClassMetadata implements PersistenceClassMetadata, Stringable
      * For subclasses of such root entities, the list can be reused/passed downwards, it only needs to
      * be filtered accordingly (only keep remaining subclasses)
      *
-     * @psalm-var list<class-string>
+     * @phpstan-var list<class-string>
      */
     public array $subClasses = [];
 
     /**
      * READ-ONLY: The names of all embedded classes based on properties.
      *
-     * @psalm-var array<string, EmbeddedClassMapping>
+     * @phpstan-var array<string, EmbeddedClassMapping>
      */
     public array $embeddedClasses = [];
 
@@ -321,21 +321,21 @@ class ClassMetadata implements PersistenceClassMetadata, Stringable
      * READ-ONLY: The field names of all fields that are part of the identifier/primary key
      * of the mapped entity class.
      *
-     * @psalm-var list<string>
+     * @phpstan-var list<string>
      */
     public array $identifier = [];
 
     /**
      * READ-ONLY: The inheritance mapping type used by the class.
      *
-     * @psalm-var self::INHERITANCE_TYPE_*
+     * @phpstan-var self::INHERITANCE_TYPE_*
      */
     public int $inheritanceType = self::INHERITANCE_TYPE_NONE;
 
     /**
      * READ-ONLY: The Id generator type used by the class.
      *
-     * @psalm-var self::GENERATOR_TYPE_*
+     * @phpstan-var self::GENERATOR_TYPE_*
      */
     public int $generatorType = self::GENERATOR_TYPE_NONE;
 
@@ -351,7 +351,7 @@ class ClassMetadata implements PersistenceClassMetadata, Stringable
      * READ-ONLY: An array of field names. Used to look up field names from column names.
      * Keys are column names and values are field names.
      *
-     * @psalm-var array<string, string>
+     * @phpstan-var array<string, string>
      */
     public array $fieldNames = [];
 
@@ -386,7 +386,7 @@ class ClassMetadata implements PersistenceClassMetadata, Stringable
      *
      * @var array<int|string, string>
      *
-     * @psalm-var array<int|string, class-string>
+     * @phpstan-var array<int|string, class-string>
      */
     public array $discriminatorMap = [];
 
@@ -406,7 +406,7 @@ class ClassMetadata implements PersistenceClassMetadata, Stringable
      * uniqueConstraints => array
      *
      * @var mixed[]
-     * @psalm-var array{
+     * @phpstan-var array{
      *               name: string,
      *               schema?: string,
      *               indexes?: array,
@@ -420,14 +420,14 @@ class ClassMetadata implements PersistenceClassMetadata, Stringable
     /**
      * READ-ONLY: The registered lifecycle callbacks for entities of this class.
      *
-     * @psalm-var array<string, list<string>>
+     * @phpstan-var array<string, list<string>>
      */
     public array $lifecycleCallbacks = [];
 
     /**
      * READ-ONLY: The registered entity listeners.
      *
-     * @psalm-var array<string, list<array{class: class-string, method: string}>>
+     * @phpstan-var array<string, list<array{class: class-string, method: string}>>
      */
     public array $entityListeners = [];
 
@@ -443,7 +443,7 @@ class ClassMetadata implements PersistenceClassMetadata, Stringable
      * )
      * </pre>
      *
-     * @psalm-var array<string, ConcreteAssociationMapping>
+     * @phpstan-var array<string, ConcreteAssociationMapping>
      */
     public array $associationMappings = [];
 
@@ -487,7 +487,7 @@ class ClassMetadata implements PersistenceClassMetadata, Stringable
      * </code>
      *
      * @var array<string, mixed>|null
-     * @psalm-var array{sequenceName: string, allocationSize: string, initialValue: string, quoted?: mixed}|null
+     * @phpstan-var array{sequenceName: string, allocationSize: string, initialValue: string, quoted?: mixed}|null
      * @todo Merge with tableGeneratorDefinition into generic generatorDefinition
      */
     public array|null $sequenceGeneratorDefinition = null;
@@ -554,7 +554,7 @@ class ClassMetadata implements PersistenceClassMetadata, Stringable
      * metadata of the class with the given name.
      *
      * @param string $name The name of the entity class the new instance is used for.
-     * @psalm-param class-string<T> $name
+     * @phpstan-param class-string<T> $name
      */
     public function __construct(public string $name, NamingStrategy|null $namingStrategy = null, TypedFieldMapper|null $typedFieldMapper = null)
     {
@@ -568,7 +568,7 @@ public function __construct(public string $name, NamingStrategy|null $namingStra
      * Gets the ReflectionProperties of the mapped class.
      *
      * @return ReflectionProperty[]|null[] An array of ReflectionProperty instances.
-     * @psalm-return array<ReflectionProperty|null>
+     * @phpstan-return array<ReflectionProperty|null>
      */
     public function getReflectionProperties(): array
     {
@@ -634,7 +634,7 @@ public function getIdentifierValues(object $entity): array
     /**
      * Populates the entity identifier of an entity.
      *
-     * @psalm-param array<string, mixed> $id
+     * @phpstan-param array<string, mixed> $id
      *
      * @todo Rename to assignIdentifier()
      */
@@ -938,7 +938,7 @@ public function validateLifecycleCallbacks(ReflectionService $reflService): void
         }
     }
 
-    /** @psalm-param array{usage?: mixed, region?: mixed} $cache */
+    /** @phpstan-param array{usage?: mixed, region?: mixed} $cache */
     public function enableCache(array $cache): void
     {
         if (! isset($cache['usage'])) {
@@ -952,17 +952,17 @@ public function enableCache(array $cache): void
         $this->cache = $cache;
     }
 
-    /** @psalm-param array{usage?: int, region?: string} $cache */
+    /** @phpstan-param array{usage?: int, region?: string} $cache */
     public function enableAssociationCache(string $fieldName, array $cache): void
     {
         $this->associationMappings[$fieldName]->cache = $this->getAssociationCacheDefaults($fieldName, $cache);
     }
 
     /**
-     * @psalm-param array{usage?: int, region?: string|null} $cache
+     * @phpstan-param array{usage?: int, region?: string|null} $cache
      *
      * @return int[]|string[]
-     * @psalm-return array{usage: int, region: string|null}
+     * @phpstan-return array{usage: int, region: string|null}
      */
     public function getAssociationCacheDefaults(string $fieldName, array $cache): array
     {
@@ -1079,7 +1079,7 @@ public function getAssociationMapping(string $fieldName): AssociationMapping
     /**
      * Gets all association mappings of the class.
      *
-     * @psalm-return array<string, AssociationMapping>
+     * @phpstan-return array<string, AssociationMapping>
      */
     public function getAssociationMappings(): array
     {
@@ -1146,7 +1146,7 @@ private function validateAndCompleteTypedAssociationMapping(array $mapping): arr
     /**
      * Validates & completes the given field mapping.
      *
-     * @psalm-param array{
+     * @phpstan-param array{
      *     fieldName?: string,
      *     columnName?: string,
      *     id?: bool,
@@ -1246,7 +1246,7 @@ protected function validateAndCompleteFieldMapping(array $mapping): FieldMapping
      * Validates & completes the basic mapping information that is common to all
      * association mappings (one-to-one, many-ot-one, one-to-many, many-to-many).
      *
-     * @psalm-param array<string, mixed> $mapping The mapping.
+     * @phpstan-param array<string, mixed> $mapping The mapping.
      *
      * @return ConcreteAssociationMapping
      *
@@ -1461,7 +1461,7 @@ public function getSingleIdentifierColumnName(): string
      * Sets the mapped identifier/primary key fields of this class.
      * Mainly used by the ClassMetadataFactory to assign inherited identifiers.
      *
-     * @psalm-param list<mixed> $identifier
+     * @phpstan-param list<mixed> $identifier
      */
     public function setIdentifier(array $identifier): void
     {
@@ -1485,10 +1485,10 @@ public function hasField(string $fieldName): bool
     /**
      * Gets an array containing all the column names.
      *
-     * @psalm-param list<string>|null $fieldNames
+     * @phpstan-param list<string>|null $fieldNames
      *
      * @return mixed[]
-     * @psalm-return list<string>
+     * @phpstan-return list<string>
      */
     public function getColumnNames(array|null $fieldNames = null): array
     {
@@ -1502,7 +1502,7 @@ public function getColumnNames(array|null $fieldNames = null): array
     /**
      * Returns an array with all the identifier column names.
      *
-     * @psalm-return list<string>
+     * @phpstan-return list<string>
      */
     public function getIdentifierColumnNames(): array
     {
@@ -1529,7 +1529,7 @@ public function getIdentifierColumnNames(): array
     /**
      * Sets the type of Id generator to use for the mapped class.
      *
-     * @psalm-param self::GENERATOR_TYPE_* $generatorType
+     * @phpstan-param self::GENERATOR_TYPE_* $generatorType
      */
     public function setIdGeneratorType(int $generatorType): void
     {
@@ -1582,7 +1582,7 @@ public function isIdGeneratorIdentity(): bool
     /**
      * Checks whether the class uses a sequence for id generation.
      *
-     * @psalm-assert-if-true !null $this->sequenceGeneratorDefinition
+     * @phpstan-assert-if-true !null $this->sequenceGeneratorDefinition
      */
     public function isIdGeneratorSequence(): bool
     {
@@ -1638,7 +1638,7 @@ public function getTemporaryIdTableName(): string
     /**
      * Sets the mapped subclasses of this class.
      *
-     * @psalm-param list<string> $subclasses The names of all mapped subclasses.
+     * @phpstan-param list<string> $subclasses The names of all mapped subclasses.
      */
     public function setSubclasses(array $subclasses): void
     {
@@ -1653,7 +1653,7 @@ public function setSubclasses(array $subclasses): void
      * Assumes that the class names in the passed array are in the order:
      * directParent -> directParentParent -> directParentParentParent ... -> root.
      *
-     * @psalm-param list<class-string> $classNames
+     * @phpstan-param list<class-string> $classNames
      */
     public function setParentClasses(array $classNames): void
     {
@@ -1667,7 +1667,7 @@ public function setParentClasses(array $classNames): void
     /**
      * Sets the inheritance type used by the class and its subclasses.
      *
-     * @psalm-param self::INHERITANCE_TYPE_* $type
+     * @phpstan-param self::INHERITANCE_TYPE_* $type
      *
      * @throws MappingException
      */
@@ -1683,7 +1683,7 @@ public function setInheritanceType(int $type): void
     /**
      * Sets the association to override association mapping of property for an entity relationship.
      *
-     * @psalm-param array{joinColumns?: array, inversedBy?: ?string, joinTable?: array, fetch?: ?string, cascade?: string[]} $overrideMapping
+     * @phpstan-param array{joinColumns?: array, inversedBy?: ?string, joinTable?: array, fetch?: ?string, cascade?: string[]} $overrideMapping
      *
      * @throws MappingException
      */
@@ -1741,7 +1741,7 @@ public function setAssociationOverride(string $fieldName, array $overrideMapping
     /**
      * Sets the override for a mapped field.
      *
-     * @psalm-param array<string, mixed> $overrideMapping
+     * @phpstan-param array<string, mixed> $overrideMapping
      *
      * @throws MappingException
      */
@@ -1836,7 +1836,7 @@ public function setTableName(string $tableName): void
      *
      * If a key is omitted, the current value is kept.
      *
-     * @psalm-param array<string, mixed> $table The table description.
+     * @phpstan-param array<string, mixed> $table The table description.
      */
     public function setPrimaryTable(array $table): void
     {
@@ -1888,7 +1888,7 @@ private function isInheritanceType(int $type): bool
     /**
      * Adds a mapped field to the class.
      *
-     * @psalm-param array<string, mixed> $mapping The field mapping.
+     * @phpstan-param array<string, mixed> $mapping The field mapping.
      *
      * @throws MappingException
      */
@@ -1956,7 +1956,7 @@ public function mapOneToOne(array $mapping): void
     /**
      * Adds a one-to-many mapping.
      *
-     * @psalm-param array<string, mixed> $mapping The mapping.
+     * @phpstan-param array<string, mixed> $mapping The mapping.
      */
     public function mapOneToMany(array $mapping): void
     {
@@ -1970,7 +1970,7 @@ public function mapOneToMany(array $mapping): void
     /**
      * Adds a many-to-one mapping.
      *
-     * @psalm-param array<string, mixed> $mapping The mapping.
+     * @phpstan-param array<string, mixed> $mapping The mapping.
      */
     public function mapManyToOne(array $mapping): void
     {
@@ -1984,7 +1984,7 @@ public function mapManyToOne(array $mapping): void
     /**
      * Adds a many-to-many mapping.
      *
-     * @psalm-param array<string, mixed> $mapping The mapping.
+     * @phpstan-param array<string, mixed> $mapping The mapping.
      */
     public function mapManyToMany(array $mapping): void
     {
@@ -2015,7 +2015,7 @@ protected function _storeAssociationMapping(AssociationMapping $assocMapping): v
      * Registers a custom repository class for the entity class.
      *
      * @param string|null $repositoryClassName The class name of the custom mapper.
-     * @psalm-param class-string<EntityRepository>|null $repositoryClassName
+     * @phpstan-param class-string<EntityRepository>|null $repositoryClassName
      */
     public function setCustomRepositoryClass(string|null $repositoryClassName): void
     {
@@ -2055,7 +2055,7 @@ public function hasLifecycleCallbacks(string $lifecycleEvent): bool
      * Gets the registered lifecycle callbacks for an event.
      *
      * @return string[]
-     * @psalm-return list<string>
+     * @phpstan-return list<string>
      */
     public function getLifecycleCallbacks(string $event): array
     {
@@ -2082,7 +2082,7 @@ public function addLifecycleCallback(string $callback, string $event): void
      * Sets the lifecycle callbacks for entities of this class.
      * Any previously registered callbacks are overwritten.
      *
-     * @psalm-param array<string, list<string>> $callbacks
+     * @phpstan-param array<string, list<string>> $callbacks
      */
     public function setLifecycleCallbacks(array $callbacks): void
     {
@@ -2128,7 +2128,7 @@ public function addEntityListener(string $eventName, string $class, string $meth
      * @see getDiscriminatorColumn()
      *
      * @param DiscriminatorColumnMapping|mixed[]|null $columnDef
-     * @psalm-param DiscriminatorColumnMapping|array{
+     * @phpstan-param DiscriminatorColumnMapping|array{
      *     name: string|null,
      *     fieldName?: string|null,
      *     type?: string|null,
@@ -2350,7 +2350,7 @@ public function setIdGenerator(AbstractIdGenerator $generator): void
     /**
      * Sets definition.
      *
-     * @psalm-param array<string, string|null> $definition
+     * @phpstan-param array<string, string|null> $definition
      */
     public function setCustomGeneratorDefinition(array $definition): void
     {
@@ -2370,7 +2370,7 @@ public function setCustomGeneratorDefinition(array $definition): void
      * )
      * </code>
      *
-     * @psalm-param array{sequenceName?: string, allocationSize?: int|string, initialValue?: int|string, quoted?: mixed} $definition
+     * @phpstan-param array{sequenceName?: string, allocationSize?: int|string, initialValue?: int|string, quoted?: mixed} $definition
      *
      * @throws MappingException
      */
@@ -2403,7 +2403,7 @@ public function setSequenceGeneratorDefinition(array $definition): void
      * Sets the version field mapping used for versioning. Sets the default
      * value to use depending on the column type.
      *
-     * @psalm-param array<string, mixed> $mapping The version field mapping array.
+     * @phpstan-param array<string, mixed> $mapping The version field mapping array.
      *
      * @throws MappingException
      */
@@ -2472,7 +2472,7 @@ public function getAssociationNames(): array
     /**
      * {@inheritDoc}
      *
-     * @psalm-return class-string
+     * @phpstan-return class-string
      *
      * @throws InvalidArgumentException
      */
@@ -2517,7 +2517,7 @@ public function getAssociationMappedByTargetField(string $assocName): string
      * @param C $className
      *
      * @return string|null null if and only if the input value is null
-     * @psalm-return (C is class-string ? class-string : (C is string ? string : null))
+     * @phpstan-return (C is class-string ? class-string : (C is string ? string : null))
      *
      * @template C of string|null
      */
@@ -2549,7 +2549,7 @@ public function getMetadataValue(string $name): mixed
     /**
      * Map Embedded Class
      *
-     * @psalm-param array{
+     * @phpstan-param array{
      *     fieldName: string,
      *     class?: class-string,
      *     declaredField?: string,
@@ -2658,7 +2658,7 @@ public function getSequencePrefix(AbstractPlatform $platform): string
         return $sequencePrefix;
     }
 
-    /** @psalm-param class-string $class */
+    /** @phpstan-param class-string $class */
     private function getAccessibleProperty(ReflectionService $reflService, string $class, string $field): ReflectionProperty|null
     {
         $reflectionProperty = $reflService->getAccessibleProperty($class, $field);
diff --git a/src/Mapping/ClassMetadataFactory.php b/src/Mapping/ClassMetadataFactory.php
index db0a8cf5500..b29f20c67b1 100644
--- a/src/Mapping/ClassMetadataFactory.php
+++ b/src/Mapping/ClassMetadataFactory.php
@@ -612,7 +612,7 @@ private function completeIdGeneratorMapping(ClassMetadata $class): void
         }
     }
 
-    /** @psalm-return ClassMetadata::GENERATOR_TYPE_* */
+    /** @phpstan-return ClassMetadata::GENERATOR_TYPE_* */
     private function determineIdGeneratorStrategy(AbstractPlatform $platform): int
     {
         assert($this->em !== null);
diff --git a/src/Mapping/Column.php b/src/Mapping/Column.php
index 68121e67ece..e044f5e3144 100644
--- a/src/Mapping/Column.php
+++ b/src/Mapping/Column.php
@@ -15,7 +15,7 @@ final class Column implements MappingAttribute
      * @param int|null                      $scale     The scale for a decimal (exact numeric) column (Applies only for decimal column).
      * @param class-string<BackedEnum>|null $enumType
      * @param array<string,mixed>           $options
-     * @psalm-param 'NEVER'|'INSERT'|'ALWAYS'|null $generated
+     * @phpstan-param 'NEVER'|'INSERT'|'ALWAYS'|null $generated
      */
     public function __construct(
         public readonly string|null $name = null,
diff --git a/src/Mapping/DefaultTypedFieldMapper.php b/src/Mapping/DefaultTypedFieldMapper.php
index 40b37b8c426..5f77e8f910d 100644
--- a/src/Mapping/DefaultTypedFieldMapper.php
+++ b/src/Mapping/DefaultTypedFieldMapper.php
@@ -20,7 +20,7 @@
 use function enum_exists;
 use function is_a;
 
-/** @psalm-type ScalarName = 'array'|'bool'|'float'|'int'|'string' */
+/** @phpstan-type ScalarName = 'array'|'bool'|'float'|'int'|'string' */
 final class DefaultTypedFieldMapper implements TypedFieldMapper
 {
     /** @var array<class-string|ScalarName, class-string<Type>|string> $typedFieldMappings */
diff --git a/src/Mapping/DiscriminatorColumnMapping.php b/src/Mapping/DiscriminatorColumnMapping.php
index 4ccb71c4b36..a96d22dbcbb 100644
--- a/src/Mapping/DiscriminatorColumnMapping.php
+++ b/src/Mapping/DiscriminatorColumnMapping.php
@@ -35,7 +35,7 @@ public function __construct(
     }
 
     /**
-     * @psalm-param array{
+     * @phpstan-param array{
      *     type: string,
      *     fieldName: string,
      *     name: string,
diff --git a/src/Mapping/Driver/AttributeDriver.php b/src/Mapping/Driver/AttributeDriver.php
index da125fc394d..63ed6d89fa3 100644
--- a/src/Mapping/Driver/AttributeDriver.php
+++ b/src/Mapping/Driver/AttributeDriver.php
@@ -629,7 +629,7 @@ private function getGeneratedMode(string $generatedMode): int
      * Parses the given method.
      *
      * @return list<array{string, string}>
-     * @psalm-return list<array{string, (Events::*)}>
+     * @phpstan-return list<array{string, (Events::*)}>
      */
     private function getMethodCallbacks(ReflectionMethod $method): array
     {
@@ -677,7 +677,7 @@ private function getMethodCallbacks(ReflectionMethod $method): array
      * Parse the given JoinColumn as array
      *
      * @return mixed[]
-     * @psalm-return array{
+     * @phpstan-return array{
      *                   name: string|null,
      *                   unique: bool,
      *                   nullable: bool,
@@ -709,7 +709,7 @@ private function joinColumnToArray(Mapping\JoinColumn|Mapping\InverseJoinColumn
      * Parse the given Column as array
      *
      * @return mixed[]
-     * @psalm-return array{
+     * @phpstan-return array{
      *                   fieldName: string,
      *                   type: mixed,
      *                   scale: int,
diff --git a/src/Mapping/Driver/AttributeReader.php b/src/Mapping/Driver/AttributeReader.php
index 2de622a07d9..fb8a4002b19 100644
--- a/src/Mapping/Driver/AttributeReader.php
+++ b/src/Mapping/Driver/AttributeReader.php
@@ -24,7 +24,7 @@ final class AttributeReader
     private array $isRepeatableAttribute = [];
 
     /**
-     * @psalm-return class-string-map<T, T|RepeatableAttributeCollection<T>>
+     * @phpstan-return class-string-map<T, T|RepeatableAttributeCollection<T>>
      *
      * @template T of MappingAttribute
      */
diff --git a/src/Mapping/Driver/DatabaseDriver.php b/src/Mapping/Driver/DatabaseDriver.php
index d012c0a85bd..fd5ff5fc8e8 100644
--- a/src/Mapping/Driver/DatabaseDriver.php
+++ b/src/Mapping/Driver/DatabaseDriver.php
@@ -61,7 +61,7 @@ class DatabaseDriver implements MappingDriver
     /** @var array<class-string, string> */
     private array $classToTableNames = [];
 
-    /** @psalm-var array<string, Table> */
+    /** @phpstan-var array<string, Table> */
     private array $manyToManyTables = [];
 
     /** @var mixed[] */
@@ -126,8 +126,8 @@ public function setFieldNameForColumn(string $tableName, string $columnName, str
      *
      * @param Table[] $entityTables
      * @param Table[] $manyToManyTables
-     * @psalm-param list<Table> $entityTables
-     * @psalm-param list<Table> $manyToManyTables
+     * @phpstan-param list<Table> $entityTables
+     * @phpstan-param list<Table> $manyToManyTables
      */
     public function setTables(array $entityTables, array $manyToManyTables): void
     {
@@ -366,7 +366,7 @@ private function buildFieldMappings(ClassMetadata $metadata): void
      * Build field mapping from a schema column definition
      *
      * @return mixed[]
-     * @psalm-return array{
+     * @phpstan-return array{
      *     fieldName: string,
      *     columnName: string,
      *     type: string,
diff --git a/src/Mapping/Driver/XmlDriver.php b/src/Mapping/Driver/XmlDriver.php
index e11b6b61d6f..28b0f92f397 100644
--- a/src/Mapping/Driver/XmlDriver.php
+++ b/src/Mapping/Driver/XmlDriver.php
@@ -410,7 +410,6 @@ public function loadMetadataForClass($className, PersistenceClassMetadata $metad
                 if (isset($oneToManyElement->{'order-by'})) {
                     $orderBy = [];
                     foreach ($oneToManyElement->{'order-by'}->{'order-by-field'} ?? [] as $orderByField) {
-                        /** @psalm-suppress DeprecatedConstant */
                         $orderBy[(string) $orderByField['name']] = isset($orderByField['direction'])
                             ? (string) $orderByField['direction']
                             // @phpstan-ignore classConstant.deprecated
@@ -540,7 +539,6 @@ public function loadMetadataForClass($className, PersistenceClassMetadata $metad
                 if (isset($manyToManyElement->{'order-by'})) {
                     $orderBy = [];
                     foreach ($manyToManyElement->{'order-by'}->{'order-by-field'} ?? [] as $orderByField) {
-                        /** @psalm-suppress DeprecatedConstant */
                         $orderBy[(string) $orderByField['name']] = isset($orderByField['direction'])
                             ? (string) $orderByField['direction']
                             // @phpstan-ignore classConstant.deprecated
@@ -668,7 +666,7 @@ public function loadMetadataForClass($className, PersistenceClassMetadata $metad
      * Parses (nested) option elements.
      *
      * @return mixed[] The options array.
-     * @psalm-return array<int|string, array<int|string, mixed|string>|bool|string>
+     * @phpstan-return array<int|string, array<int|string, mixed|string>|bool|string>
      */
     private function parseOptions(SimpleXMLElement|null $options): array
     {
@@ -703,7 +701,7 @@ private function parseOptions(SimpleXMLElement|null $options): array
      * @param SimpleXMLElement $joinColumnElement The XML element.
      *
      * @return mixed[] The mapping array.
-     * @psalm-return array{
+     * @phpstan-return array{
      *                   name: string,
      *                   referencedColumnName: string,
      *                   unique?: bool,
@@ -747,7 +745,7 @@ private function joinColumnToArray(SimpleXMLElement $joinColumnElement): array
       * Parses the given field as array.
       *
       * @return mixed[]
-      * @psalm-return array{
+      * @phpstan-return array{
       *                   fieldName: string,
       *                   type?: string,
       *                   columnName?: string,
@@ -833,7 +831,7 @@ private function columnToArray(SimpleXMLElement $fieldMapping): array
      * Parse / Normalize the cache configuration
      *
      * @return mixed[]
-     * @psalm-return array{usage: int|null, region?: string}
+     * @phpstan-return array{usage: int|null, region?: string}
      */
     private function cacheToArray(SimpleXMLElement $cacheMapping): array
     {
@@ -860,7 +858,7 @@ private function cacheToArray(SimpleXMLElement $cacheMapping): array
      * @param SimpleXMLElement $cascadeElement The cascade element.
      *
      * @return string[] The list of cascade options.
-     * @psalm-return list<string>
+     * @phpstan-return list<string>
      */
     private function getCascadeMappings(SimpleXMLElement $cascadeElement): array
     {
diff --git a/src/Mapping/EmbeddedClassMapping.php b/src/Mapping/EmbeddedClassMapping.php
index 8fd02c9232c..85e2e6e94a0 100644
--- a/src/Mapping/EmbeddedClassMapping.php
+++ b/src/Mapping/EmbeddedClassMapping.php
@@ -48,7 +48,7 @@ public function __construct(public string $class)
     }
 
     /**
-     * @psalm-param array{
+     * @phpstan-param array{
      *     class: class-string,
      *     columnPrefix?: false|string|null,
      *     declaredField?: string|null,
diff --git a/src/Mapping/Entity.php b/src/Mapping/Entity.php
index 0e27913fc58..6466aa065d0 100644
--- a/src/Mapping/Entity.php
+++ b/src/Mapping/Entity.php
@@ -11,7 +11,7 @@
 #[Attribute(Attribute::TARGET_CLASS)]
 final class Entity implements MappingAttribute
 {
-    /** @psalm-param class-string<EntityRepository<T>>|null $repositoryClass */
+    /** @phpstan-param class-string<EntityRepository<T>>|null $repositoryClass */
     public function __construct(
         public readonly string|null $repositoryClass = null,
         public readonly bool $readOnly = false,
diff --git a/src/Mapping/FieldMapping.php b/src/Mapping/FieldMapping.php
index 4c09196fd8b..928497f776c 100644
--- a/src/Mapping/FieldMapping.php
+++ b/src/Mapping/FieldMapping.php
@@ -26,7 +26,7 @@ final class FieldMapping implements ArrayAccess
     public bool|null $notInsertable      = null;
     public bool|null $notUpdatable       = null;
     public string|null $columnDefinition = null;
-    /** @psalm-var ClassMetadata::GENERATED_*|null */
+    /** @phpstan-var ClassMetadata::GENERATED_*|null */
     public int|null $generated = null;
     /** @var class-string<BackedEnum>|null */
     public string|null $enumType = null;
@@ -85,7 +85,7 @@ public function __construct(
 
     /**
      * @param array<string, mixed> $mappingArray
-     * @psalm-param array{
+     * @phpstan-param array{
      *     type: string,
      *     fieldName: string,
      *     columnName: string,
diff --git a/src/Mapping/GeneratedValue.php b/src/Mapping/GeneratedValue.php
index aca5f4b14cb..385b2c0eb0a 100644
--- a/src/Mapping/GeneratedValue.php
+++ b/src/Mapping/GeneratedValue.php
@@ -9,7 +9,7 @@
 #[Attribute(Attribute::TARGET_PROPERTY)]
 final class GeneratedValue implements MappingAttribute
 {
-    /** @psalm-param 'AUTO'|'SEQUENCE'|'IDENTITY'|'NONE'|'CUSTOM' $strategy */
+    /** @phpstan-param 'AUTO'|'SEQUENCE'|'IDENTITY'|'NONE'|'CUSTOM' $strategy */
     public function __construct(
         public readonly string $strategy = 'AUTO',
     ) {
diff --git a/src/Mapping/InheritanceType.php b/src/Mapping/InheritanceType.php
index c042ee79b6f..b33afd8608e 100644
--- a/src/Mapping/InheritanceType.php
+++ b/src/Mapping/InheritanceType.php
@@ -9,7 +9,7 @@
 #[Attribute(Attribute::TARGET_CLASS)]
 final class InheritanceType implements MappingAttribute
 {
-    /** @psalm-param 'NONE'|'JOINED'|'SINGLE_TABLE' $value */
+    /** @phpstan-param 'NONE'|'JOINED'|'SINGLE_TABLE' $value */
     public function __construct(
         public readonly string $value,
     ) {
diff --git a/src/Mapping/JoinColumnMapping.php b/src/Mapping/JoinColumnMapping.php
index 172c25699c9..cb54b196a99 100644
--- a/src/Mapping/JoinColumnMapping.php
+++ b/src/Mapping/JoinColumnMapping.php
@@ -31,7 +31,7 @@ public function __construct(
 
     /**
      * @param array<string, mixed> $mappingArray
-     * @psalm-param array{
+     * @phpstan-param array{
      *     name: string,
      *     referencedColumnName: string,
      *     unique?: bool|null,
diff --git a/src/Mapping/JoinTableMapping.php b/src/Mapping/JoinTableMapping.php
index c8b49681e51..29d3a698b98 100644
--- a/src/Mapping/JoinTableMapping.php
+++ b/src/Mapping/JoinTableMapping.php
@@ -33,7 +33,7 @@ public function __construct(public string $name)
 
     /**
      * @param mixed[] $mappingArray
-     * @psalm-param array{
+     * @phpstan-param array{
      *    name: string,
      *    quoted?: bool|null,
      *    joinColumns?: mixed[],
diff --git a/src/Mapping/ManyToMany.php b/src/Mapping/ManyToMany.php
index d90a762fa6d..60d2e761a7e 100644
--- a/src/Mapping/ManyToMany.php
+++ b/src/Mapping/ManyToMany.php
@@ -12,7 +12,7 @@ final class ManyToMany implements MappingAttribute
     /**
      * @param class-string  $targetEntity
      * @param string[]|null $cascade
-     * @psalm-param 'LAZY'|'EAGER'|'EXTRA_LAZY' $fetch
+     * @phpstan-param 'LAZY'|'EAGER'|'EXTRA_LAZY' $fetch
      */
     public function __construct(
         public readonly string $targetEntity,
diff --git a/src/Mapping/ManyToManyOwningSideMapping.php b/src/Mapping/ManyToManyOwningSideMapping.php
index b09d56c7e30..d8abaedaeef 100644
--- a/src/Mapping/ManyToManyOwningSideMapping.php
+++ b/src/Mapping/ManyToManyOwningSideMapping.php
@@ -37,7 +37,7 @@ public function toArray(): array
 
     /**
      * @param mixed[] $mappingArray
-     * @psalm-param array{
+     * @phpstan-param array{
      *     fieldName: string,
      *     sourceEntity: class-string,
      *     targetEntity: class-string,
diff --git a/src/Mapping/ManyToOne.php b/src/Mapping/ManyToOne.php
index 8fccff3e45d..b02d9333ff3 100644
--- a/src/Mapping/ManyToOne.php
+++ b/src/Mapping/ManyToOne.php
@@ -12,7 +12,7 @@ final class ManyToOne implements MappingAttribute
     /**
      * @param class-string|null $targetEntity
      * @param string[]|null     $cascade
-     * @psalm-param 'LAZY'|'EAGER'|'EXTRA_LAZY' $fetch
+     * @phpstan-param 'LAZY'|'EAGER'|'EXTRA_LAZY' $fetch
      */
     public function __construct(
         public readonly string|null $targetEntity = null,
diff --git a/src/Mapping/OneToMany.php b/src/Mapping/OneToMany.php
index d71c4f93416..ac73e6e0947 100644
--- a/src/Mapping/OneToMany.php
+++ b/src/Mapping/OneToMany.php
@@ -12,7 +12,7 @@ final class OneToMany implements MappingAttribute
     /**
      * @param class-string|null $targetEntity
      * @param string[]|null     $cascade
-     * @psalm-param 'LAZY'|'EAGER'|'EXTRA_LAZY' $fetch
+     * @phpstan-param 'LAZY'|'EAGER'|'EXTRA_LAZY' $fetch
      */
     public function __construct(
         public readonly string|null $targetEntity = null,
diff --git a/src/Mapping/OneToManyAssociationMapping.php b/src/Mapping/OneToManyAssociationMapping.php
index 786e9812774..139c1d9ef05 100644
--- a/src/Mapping/OneToManyAssociationMapping.php
+++ b/src/Mapping/OneToManyAssociationMapping.php
@@ -8,7 +8,7 @@ final class OneToManyAssociationMapping extends ToManyInverseSideMapping
 {
     /**
      * @param mixed[] $mappingArray
-     * @psalm-param array{
+     * @phpstan-param array{
      *     fieldName: string,
      *     sourceEntity: class-string,
      *     targetEntity: class-string,
@@ -41,7 +41,7 @@ public static function fromMappingArray(array $mappingArray): static
 
     /**
      * @param mixed[] $mappingArray
-     * @psalm-param array{
+     * @phpstan-param array{
      *     fieldName: string,
      *     sourceEntity: class-string,
      *     targetEntity: class-string,
diff --git a/src/Mapping/OneToOne.php b/src/Mapping/OneToOne.php
index 1ddf21c8fe6..80c2392acae 100644
--- a/src/Mapping/OneToOne.php
+++ b/src/Mapping/OneToOne.php
@@ -12,7 +12,7 @@ final class OneToOne implements MappingAttribute
     /**
      * @param class-string|null  $targetEntity
      * @param array<string>|null $cascade
-     * @psalm-param 'LAZY'|'EAGER'|'EXTRA_LAZY' $fetch
+     * @phpstan-param 'LAZY'|'EAGER'|'EXTRA_LAZY' $fetch
      */
     public function __construct(
         public readonly string|null $targetEntity = null,
diff --git a/src/Mapping/QuoteStrategy.php b/src/Mapping/QuoteStrategy.php
index 9eb3e536355..7b78d12a81b 100644
--- a/src/Mapping/QuoteStrategy.php
+++ b/src/Mapping/QuoteStrategy.php
@@ -52,7 +52,7 @@ public function getReferencedJoinColumnName(
     /**
      * Gets the (possibly quoted) identifier column names for safe use in an SQL statement.
      *
-     * @psalm-return list<string>
+     * @phpstan-return list<string>
      */
     public function getIdentifierColumnNames(ClassMetadata $class, AbstractPlatform $platform): array;
 
diff --git a/src/Mapping/ReflectionEmbeddedProperty.php b/src/Mapping/ReflectionEmbeddedProperty.php
index da3d09749b4..27aabadec25 100644
--- a/src/Mapping/ReflectionEmbeddedProperty.php
+++ b/src/Mapping/ReflectionEmbeddedProperty.php
@@ -23,7 +23,7 @@ final class ReflectionEmbeddedProperty extends ReflectionProperty
     /**
      * @param ReflectionProperty $parentProperty reflection property of the class where the embedded object has to be put
      * @param ReflectionProperty $childProperty  reflection property of the embedded object
-     * @psalm-param class-string $embeddedClass
+     * @phpstan-param class-string $embeddedClass
      */
     public function __construct(
         private readonly ReflectionProperty $parentProperty,
diff --git a/src/Mapping/ToManyAssociationMapping.php b/src/Mapping/ToManyAssociationMapping.php
index 2e4969c47c6..fb1fdf3fe86 100644
--- a/src/Mapping/ToManyAssociationMapping.php
+++ b/src/Mapping/ToManyAssociationMapping.php
@@ -6,7 +6,7 @@
 
 interface ToManyAssociationMapping
 {
-    /** @psalm-assert-if-true string $this->indexBy() */
+    /** @phpstan-assert-if-true string $this->indexBy() */
     public function isIndexed(): bool;
 
     public function indexBy(): string;
diff --git a/src/Mapping/ToManyAssociationMappingImplementation.php b/src/Mapping/ToManyAssociationMappingImplementation.php
index 306880dd511..d2ad7595372 100644
--- a/src/Mapping/ToManyAssociationMappingImplementation.php
+++ b/src/Mapping/ToManyAssociationMappingImplementation.php
@@ -32,7 +32,7 @@ final public function orderBy(): array
         return $this->orderBy;
     }
 
-    /** @psalm-assert-if-true !null $this->indexBy */
+    /** @phpstan-assert-if-true !null $this->indexBy */
     final public function isIndexed(): bool
     {
         return $this->indexBy !== null;
diff --git a/src/Mapping/ToOneInverseSideMapping.php b/src/Mapping/ToOneInverseSideMapping.php
index 5be89e6db53..64a23019432 100644
--- a/src/Mapping/ToOneInverseSideMapping.php
+++ b/src/Mapping/ToOneInverseSideMapping.php
@@ -9,7 +9,7 @@ abstract class ToOneInverseSideMapping extends InverseSideMapping
     /**
      * @param mixed[]      $mappingArray
      * @param class-string $name
-     * @psalm-param array{
+     * @phpstan-param array{
      *     fieldName: string,
      *     sourceEntity: class-string,
      *     targetEntity: class-string,
diff --git a/src/Mapping/ToOneOwningSideMapping.php b/src/Mapping/ToOneOwningSideMapping.php
index cb85afbde10..ed3d596f801 100644
--- a/src/Mapping/ToOneOwningSideMapping.php
+++ b/src/Mapping/ToOneOwningSideMapping.php
@@ -27,7 +27,7 @@ abstract class ToOneOwningSideMapping extends OwningSideMapping implements ToOne
 
     /**
      * @param array<string, mixed> $mappingArray
-     * @psalm-param array{
+     * @phpstan-param array{
      *     fieldName: string,
      *     sourceEntity: class-string,
      *     targetEntity: class-string,
@@ -74,7 +74,7 @@ public static function fromMappingArray(array $mappingArray): static
     /**
      * @param mixed[]      $mappingArray
      * @param class-string $name
-     * @psalm-param array{
+     * @phpstan-param array{
      *     fieldName: string,
      *     sourceEntity: class-string,
      *     targetEntity: class-string,
diff --git a/src/PersistentCollection.php b/src/PersistentCollection.php
index 876a92a261a..e83e246d7de 100644
--- a/src/PersistentCollection.php
+++ b/src/PersistentCollection.php
@@ -35,8 +35,8 @@
  * Similarly, if you remove entities from a collection that is part of a one-many
  * mapping this will only result in the nulling out of the foreign keys on flush.
  *
- * @psalm-template TKey of array-key
- * @psalm-template T
+ * @phpstan-template TKey of array-key
+ * @phpstan-template T
  * @template-extends AbstractLazyCollection<TKey,T>
  * @template-implements Selectable<TKey,T>
  */
@@ -46,7 +46,7 @@ final class PersistentCollection extends AbstractLazyCollection implements Selec
      * A snapshot of the collection at the moment it was fetched from the database.
      * This is used to create a diff of the collection at commit time.
      *
-     * @psalm-var array<string|int, mixed>
+     * @phpstan-var array<string|int, mixed>
      */
     private array $snapshot = [];
 
@@ -80,7 +80,7 @@ final class PersistentCollection extends AbstractLazyCollection implements Selec
      *
      * @param EntityManagerInterface $em        The EntityManager the collection will be associated with.
      * @param ClassMetadata          $typeClass The class descriptor of the entity type of this collection.
-     * @psalm-param Collection<TKey, T>&Selectable<TKey, T> $collection The collection elements.
+     * @phpstan-param Collection<TKey, T>&Selectable<TKey, T> $collection The collection elements.
      */
     public function __construct(
         private EntityManagerInterface|null $em,
@@ -202,7 +202,7 @@ public function takeSnapshot(): void
      * INTERNAL:
      * Returns the last snapshot of the elements in the collection.
      *
-     * @psalm-return array<string|int, mixed> The last snapshot of the elements.
+     * @phpstan-return array<string|int, mixed> The last snapshot of the elements.
      */
     public function getSnapshot(): array
     {
@@ -492,7 +492,7 @@ public function clear(): void
      *                with circular references. This solution seems simpler and works well.
      *
      * @return string[]
-     * @psalm-return array{0: string, 1: string}
+     * @phpstan-return array{0: string, 1: string}
      */
     public function __sleep(): array
     {
@@ -526,7 +526,7 @@ public function first()
      * selected slice and NOT change the elements contained in the collection slice is called on.
      *
      * @return mixed[]
-     * @psalm-return array<TKey,T>
+     * @phpstan-return array<TKey,T>
      */
     public function slice(int $offset, int|null $length = null): array
     {
@@ -568,7 +568,7 @@ public function __clone()
      * Selects all elements from a selectable that match the expression and
      * return a new collection containing these elements.
      *
-     * @psalm-return Collection<TKey, T>
+     * @phpstan-return Collection<TKey, T>
      *
      * @throws RuntimeException
      */
diff --git a/src/Persisters/Collection/ManyToManyPersister.php b/src/Persisters/Collection/ManyToManyPersister.php
index 7cf993d5997..893e0644e61 100644
--- a/src/Persisters/Collection/ManyToManyPersister.php
+++ b/src/Persisters/Collection/ManyToManyPersister.php
@@ -292,7 +292,7 @@ public function loadCriteria(PersistentCollection $collection, Criteria $criteri
      * @return string[] ordered tuple:
      *                   - JOIN condition to add to the SQL
      *                   - WHERE condition to add to the SQL
-     * @psalm-return array{0: string, 1: string}
+     * @phpstan-return array{0: string, 1: string}
      */
     public function getFilterSql(AssociationMapping $mapping): array
     {
@@ -340,7 +340,7 @@ protected function generateFilterConditionSQL(ClassMetadata $targetEntity, strin
      * Generate ON condition
      *
      * @return string[]
-     * @psalm-return list<string>
+     * @phpstan-return list<string>
      */
     protected function getOnConditionSQL(AssociationMapping $mapping): array
     {
@@ -412,7 +412,7 @@ protected function getDeleteSQLParameters(PersistentCollection $collection): arr
      *
      * @return string[]|string[][] ordered tuple containing the SQL to be executed and an array
      *                             of types for bound parameters
-     * @psalm-return array{0: string, 1: list<string>}
+     * @phpstan-return array{0: string, 1: list<string>}
      */
     protected function getDeleteRowSQL(PersistentCollection $collection): array
     {
@@ -447,7 +447,7 @@ protected function getDeleteRowSQL(PersistentCollection $collection): array
      * Internal note: Order of the parameters must be the same as the order of the columns in getDeleteRowSql.
      *
      * @return mixed[]
-     * @psalm-return list<mixed>
+     * @phpstan-return list<mixed>
      */
     protected function getDeleteRowSQLParameters(PersistentCollection $collection, object $element): array
     {
@@ -459,7 +459,7 @@ protected function getDeleteRowSQLParameters(PersistentCollection $collection, o
      *
      * @return string[]|string[][] ordered tuple containing the SQL to be executed and an array
      *                             of types for bound parameters
-     * @psalm-return array{0: string, 1: list<string>}
+     * @phpstan-return array{0: string, 1: list<string>}
      */
     protected function getInsertRowSQL(PersistentCollection $collection): array
     {
@@ -496,7 +496,7 @@ protected function getInsertRowSQL(PersistentCollection $collection): array
      * Internal note: Order of the parameters must be the same as the order of the columns in getInsertRowSql.
      *
      * @return mixed[]
-     * @psalm-return list<mixed>
+     * @phpstan-return list<mixed>
      */
     protected function getInsertRowSQLParameters(PersistentCollection $collection, object $element): array
     {
@@ -508,7 +508,7 @@ protected function getInsertRowSQLParameters(PersistentCollection $collection, o
      * of the join table columns as specified in ManyToManyMapping#joinTableColumns.
      *
      * @return mixed[]
-     * @psalm-return list<mixed>
+     * @phpstan-return list<mixed>
      */
     private function collectJoinTableColumnParameters(
         PersistentCollection $collection,
@@ -557,7 +557,7 @@ private function collectJoinTableColumnParameters(
      *                - where clauses to be added for filtering
      *                - parameters to be bound for filtering
      *                - types of the parameters to be bound for filtering
-     * @psalm-return array{0: string, 1: list<string>, 2: list<mixed>, 3: list<string>}
+     * @phpstan-return array{0: string, 1: list<string>, 2: list<mixed>, 3: list<string>}
      */
     private function getJoinTableRestrictionsWithKey(
         PersistentCollection $collection,
@@ -647,7 +647,7 @@ private function getJoinTableRestrictionsWithKey(
      *                - where clauses to be added for filtering
      *                - parameters to be bound for filtering
      *                - types of the parameters to be bound for filtering
-     * @psalm-return array{0: string, 1: list<string>, 2: list<mixed>, 3: list<string>}
+     * @phpstan-return array{0: string, 1: list<string>, 2: list<mixed>, 3: list<string>}
      */
     private function getJoinTableRestrictions(
         PersistentCollection $collection,
diff --git a/src/Persisters/Entity/BasicEntityPersister.php b/src/Persisters/Entity/BasicEntityPersister.php
index 843cc0b21f3..91b2eaa8832 100644
--- a/src/Persisters/Entity/BasicEntityPersister.php
+++ b/src/Persisters/Entity/BasicEntityPersister.php
@@ -128,7 +128,7 @@ class BasicEntityPersister implements EntityPersister
     /**
      * Queued inserts.
      *
-     * @psalm-var array<int, object>
+     * @phpstan-var array<int, object>
      */
     protected array $queuedInserts = [];
 
@@ -342,7 +342,7 @@ protected function fetchVersionAndNotUpsertableValues(ClassMetadata $versionedCl
      * @param mixed[] $id
      *
      * @return list<ParameterType|int|string>
-     * @psalm-return list<ParameterType::*|ArrayParameterType::*|string>
+     * @phpstan-return list<ParameterType::*|ArrayParameterType::*|string>
      */
     final protected function extractIdentifierTypes(array $id, ClassMetadata $versionedClass): array
     {
@@ -586,7 +586,7 @@ public function delete(object $entity): bool
      * @param bool   $isInsert Whether the data to be prepared refers to an insert statement.
      *
      * @return mixed[][] The prepared data.
-     * @psalm-return array<string, array<array-key, mixed|null>>
+     * @phpstan-return array<string, array<array-key, mixed|null>>
      */
     protected function prepareUpdateData(object $entity, bool $isInsert = false): array
     {
@@ -705,7 +705,7 @@ protected function prepareUpdateData(object $entity, bool $isInsert = false): ar
      * @param object $entity The entity for which to prepare the data.
      *
      * @return mixed[][] The prepared data for the tables to update.
-     * @psalm-return array<string, mixed[]>
+     * @phpstan-return array<string, mixed[]>
      */
     protected function prepareInsertData(object $entity): array
     {
@@ -1166,7 +1166,7 @@ public function getCountSQL(array|Criteria $criteria = []): string
     /**
      * Gets the ORDER BY SQL snippet for ordered collections.
      *
-     * @psalm-param array<string, string> $orderBy
+     * @phpstan-param array<string, string> $orderBy
      *
      * @throws InvalidOrientation
      * @throws InvalidFindByCall
@@ -1448,7 +1448,7 @@ public function getInsertSQL(): string
      * Subclasses should override this method to alter or change the list of
      * columns placed in the INSERT statements used by the persister.
      *
-     * @psalm-return list<string>
+     * @phpstan-return list<string>
      */
     protected function getInsertColumnList(): array
     {
@@ -1563,7 +1563,7 @@ public function lock(array $criteria, LockMode|int $lockMode): void
     /**
      * Gets the FROM and optionally JOIN conditions to lock the entity managed by this persister.
      *
-     * @psalm-param LockMode::* $lockMode
+     * @phpstan-param LockMode::* $lockMode
      */
     protected function getLockTablesSql(LockMode|int $lockMode): string
     {
@@ -1665,7 +1665,7 @@ public function getSelectConditionStatementSQL(
      * Builds the left-hand-side of a where condition statement.
      *
      * @return string[]
-     * @psalm-return list<string>
+     * @phpstan-return list<string>
      *
      * @throws InvalidFindByCall
      * @throws UnrecognizedField
@@ -1740,7 +1740,7 @@ private function getSelectConditionStatementColumnSQL(
      * Subclasses are supposed to override this method if they intend to change
      * or alter the criteria by which entities are selected.
      *
-     * @psalm-param array<string, mixed> $criteria
+     * @phpstan-param array<string, mixed> $criteria
      */
     protected function getSelectConditionSQL(array $criteria, AssociationMapping|null $assoc = null): string
     {
@@ -1864,7 +1864,7 @@ public function expandParameters(array $criteria): array
      *                             - class to which the field belongs to
      *
      * @return mixed[][]
-     * @psalm-return array{0: array, 1: list<ParameterType::*|ArrayParameterType::*|string>}
+     * @phpstan-return array{0: array, 1: list<ParameterType::*|ArrayParameterType::*|string>}
      */
     private function expandToManyParameters(array $criteria): array
     {
@@ -1887,7 +1887,7 @@ private function expandToManyParameters(array $criteria): array
      * Infers field types to be used by parameter type casting.
      *
      * @return list<ParameterType|ArrayParameterType|int|string>
-     * @psalm-return list<ParameterType::*|ArrayParameterType::*|string>
+     * @phpstan-return list<ParameterType::*|ArrayParameterType::*|string>
      *
      * @throws QueryException
      */
@@ -1929,7 +1929,7 @@ private function getTypes(string $field, mixed $value, ClassMetadata $class): ar
         return $types;
     }
 
-    /** @psalm-return ArrayParameterType::* */
+    /** @phpstan-return ArrayParameterType::* */
     private function getArrayBindingType(ParameterType|int|string $type): ArrayParameterType|int
     {
         if (! $type instanceof ParameterType) {
@@ -1966,7 +1966,7 @@ private function getValues(mixed $value): array
     /**
      * Retrieves an individual parameter value.
      *
-     * @psalm-return list<mixed>
+     * @phpstan-return list<mixed>
      */
     private function getIndividualValue(mixed $value): array
     {
@@ -2097,7 +2097,7 @@ protected function switchPersisterContext(int|null $offset, int|null $limit): vo
 
     /**
      * @return string[]
-     * @psalm-return list<string>
+     * @phpstan-return list<string>
      */
     protected function getClassIdentifiersTypes(ClassMetadata $class): array
     {
diff --git a/src/Persisters/Entity/EntityPersister.php b/src/Persisters/Entity/EntityPersister.php
index ad1c81147ce..1c4da2f4c04 100644
--- a/src/Persisters/Entity/EntityPersister.php
+++ b/src/Persisters/Entity/EntityPersister.php
@@ -47,8 +47,8 @@ public function getInsertSQL(): string;
      *
      * @param mixed[]|Criteria $criteria
      * @param mixed[]|null     $orderBy
-     * @psalm-param AssociationMapping|null $assoc
-     * @psalm-param LockMode::*|null $lockMode
+     * @phpstan-param AssociationMapping|null $assoc
+     * @phpstan-param LockMode::*|null $lockMode
      */
     public function getSelectSQL(
         array|Criteria $criteria,
@@ -71,14 +71,14 @@ public function getCountSQL(array|Criteria $criteria = []): string;
      *
      * @param string[] $criteria
      *
-     * @psalm-return array{list<mixed>, list<ParameterType::*|ArrayParameterType::*|string>}
+     * @phpstan-return array{list<mixed>, list<ParameterType::*|ArrayParameterType::*|string>}
      */
     public function expandParameters(array $criteria): array;
 
     /**
      * Expands Criteria Parameters by walking the expressions and grabbing all parameters and types from it.
      *
-     * @psalm-return array{list<mixed>, list<ParameterType::*|ArrayParameterType::*|string>}
+     * @phpstan-return array{list<mixed>, list<ParameterType::*|ArrayParameterType::*|string>}
      */
     public function expandCriteriaParameters(Criteria $criteria): array;
 
@@ -126,7 +126,7 @@ public function delete(object $entity): bool;
      *
      * @param mixed[]|Criteria $criteria
      *
-     * @psalm-return 0|positive-int
+     * @phpstan-return 0|positive-int
      */
     public function count(array|Criteria $criteria = []): int;
 
@@ -153,10 +153,10 @@ public function getOwningTable(string $fieldName): string;
      *                                          for loading the entity.
      * @param int|null                $limit    Limit number of results.
      * @param string[]|null           $orderBy  Criteria to order by.
-     * @psalm-param array<string, mixed>       $criteria
-     * @psalm-param array<string, mixed>       $hints
-     * @psalm-param LockMode::*|null           $lockMode
-     * @psalm-param array<string, string>|null $orderBy
+     * @phpstan-param array<string, mixed>       $criteria
+     * @phpstan-param array<string, mixed>       $hints
+     * @phpstan-param LockMode::*|null           $lockMode
+     * @phpstan-param array<string, string>|null $orderBy
      *
      * @return object|null The loaded and managed entity instance or NULL if the entity can not be found.
      *
@@ -176,7 +176,7 @@ public function load(
      * Loads an entity by identifier.
      *
      * @param object|null $entity The entity to load the data into. If not specified, a new entity is created.
-     * @psalm-param array<string, mixed> $identifier The entity identifier.
+     * @phpstan-param array<string, mixed> $identifier The entity identifier.
      *
      * @return object|null The loaded and managed entity instance or NULL if the entity can not be found.
      *
@@ -190,7 +190,7 @@ public function loadById(array $identifier, object|null $entity = null): object|
      *
      * @param AssociationMapping $assoc        The association to load.
      * @param object             $sourceEntity The entity that owns the association (not necessarily the "owning side").
-     * @psalm-param array<string, mixed> $identifier The identifier of the entity to load. Must be provided if
+     * @phpstan-param array<string, mixed> $identifier The identifier of the entity to load. Must be provided if
      *                                               the association to load represents the owning side, otherwise
      *                                               the identifier is derived from the $sourceEntity.
      *
@@ -206,10 +206,10 @@ public function loadOneToOneEntity(AssociationMapping $assoc, object $sourceEnti
      * @param LockMode|int|null $lockMode One of the \Doctrine\DBAL\LockMode::* constants
      *                                    or NULL if no specific lock mode should be used
      *                                    for refreshing the managed entity.
-     * @psalm-param array<string, mixed> $id The identifier of the entity as an
+     * @phpstan-param array<string, mixed> $id The identifier of the entity as an
      *                                       associative array from column or
      *                                       field names to values.
-     * @psalm-param LockMode::*|null $lockMode
+     * @phpstan-param LockMode::*|null $lockMode
      */
     public function refresh(array $id, object $entity, LockMode|int|null $lockMode = null): void;
 
@@ -223,8 +223,8 @@ public function loadCriteria(Criteria $criteria): array;
     /**
      * Loads a list of entities by a list of field criteria.
      *
-     * @psalm-param array<string, string>|null $orderBy
-     * @psalm-param array<string, mixed>       $criteria
+     * @phpstan-param array<string, string>|null $orderBy
+     * @phpstan-param array<string, mixed>       $criteria
      *
      * @return mixed[]
      */
@@ -276,8 +276,8 @@ public function loadOneToManyCollection(
     /**
      * Locks all rows of this entity matching the given criteria with the specified pessimistic lock mode.
      *
-     * @psalm-param array<string, mixed> $criteria
-     * @psalm-param LockMode::* $lockMode
+     * @phpstan-param array<string, mixed> $criteria
+     * @phpstan-param LockMode::* $lockMode
      */
     public function lock(array $criteria, LockMode|int $lockMode): void;
 
diff --git a/src/Persisters/Entity/JoinedSubclassPersister.php b/src/Persisters/Entity/JoinedSubclassPersister.php
index 76719a2c275..67c277be811 100644
--- a/src/Persisters/Entity/JoinedSubclassPersister.php
+++ b/src/Persisters/Entity/JoinedSubclassPersister.php
@@ -35,14 +35,14 @@ class JoinedSubclassPersister extends AbstractEntityInheritancePersister
      * Map that maps column names to the table names that own them.
      * This is mainly a temporary cache, used during a single request.
      *
-     * @psalm-var array<string, string>
+     * @phpstan-var array<string, string>
      */
     private array $owningTableMap = [];
 
     /**
      * Map of table to quoted table names.
      *
-     * @psalm-var array<string, string>
+     * @phpstan-var array<string, string>
      */
     private array $quotedTableMap = [];
 
diff --git a/src/Persisters/SqlValueVisitor.php b/src/Persisters/SqlValueVisitor.php
index 7f987ad9815..b346ec94472 100644
--- a/src/Persisters/SqlValueVisitor.php
+++ b/src/Persisters/SqlValueVisitor.php
@@ -63,7 +63,7 @@ public function walkValue(Value $value)
      * Returns the Parameters and Types necessary for matching the last visited expression.
      *
      * @return mixed[][]
-     * @psalm-return array{0: array, 1: array<array<mixed>>}
+     * @phpstan-return array{0: array, 1: array<array<mixed>>}
      */
     public function getParamsAndTypes(): array
     {
diff --git a/src/Proxy/Autoloader.php b/src/Proxy/Autoloader.php
index 1013e735d32..a16d6fb3600 100644
--- a/src/Proxy/Autoloader.php
+++ b/src/Proxy/Autoloader.php
@@ -28,7 +28,7 @@ final class Autoloader
      * 2. Remove namespace separators from remaining class name.
      * 3. Return PHP filename from proxy-dir with the result from 2.
      *
-     * @psalm-param class-string $className
+     * @phpstan-param class-string $className
      *
      * @throws NotAProxyClass
      */
diff --git a/src/Query.php b/src/Query.php
index b97d4d93667..9365770159d 100644
--- a/src/Query.php
+++ b/src/Query.php
@@ -117,7 +117,7 @@ class Query extends AbstractQuery
     /**
      * The current state of this query.
      *
-     * @psalm-var self::STATE_*
+     * @phpstan-var self::STATE_*
      */
     private int $state = self::STATE_DIRTY;
 
@@ -347,7 +347,7 @@ private function evictEntityCacheRegion(): void
      * @param array<list<int>> $paramMappings
      *
      * @return mixed[][]
-     * @psalm-return array{0: list<mixed>, 1: array}
+     * @phpstan-return array{0: list<mixed>, 1: array}
      *
      * @throws Query\QueryException
      */
@@ -398,7 +398,7 @@ private function processParameterMappings(array $paramMappings): array
 
     /**
      * @return mixed[] tuple of (value, type)
-     * @psalm-return array{0: mixed, 1: mixed}
+     * @phpstan-return array{0: mixed, 1: mixed}
      */
     private function resolveParameterValue(Parameter $parameter): array
     {
@@ -531,7 +531,7 @@ public function getDQL(): string|null
      * @see AbstractQuery::STATE_DIRTY
      *
      * @return int The query state.
-     * @psalm-return self::STATE_* The query state.
+     * @phpstan-return self::STATE_* The query state.
      */
     public function getState(): int
     {
@@ -625,7 +625,7 @@ public function setHydrationMode(string|int $hydrationMode): static
      *
      * @see \Doctrine\DBAL\LockMode
      *
-     * @psalm-param LockMode::* $lockMode
+     * @phpstan-param LockMode::* $lockMode
      *
      * @return $this
      *
@@ -648,7 +648,7 @@ public function setLockMode(LockMode|int $lockMode): self
      * Get the current lock mode for this query.
      *
      * @return LockMode|int|null The current lock mode of this query or NULL if no specific lock mode is set.
-     * @psalm-return LockMode::*|null
+     * @phpstan-return LockMode::*|null
      */
     public function getLockMode(): LockMode|int|null
     {
diff --git a/src/Query/AST/Functions/ConcatFunction.php b/src/Query/AST/Functions/ConcatFunction.php
index 5b8d69605d4..7a7d04cd846 100644
--- a/src/Query/AST/Functions/ConcatFunction.php
+++ b/src/Query/AST/Functions/ConcatFunction.php
@@ -19,7 +19,7 @@ class ConcatFunction extends FunctionNode
     public Node $firstStringPrimary;
     public Node $secondStringPrimary;
 
-    /** @psalm-var list<Node> */
+    /** @phpstan-var list<Node> */
     public array $concatExpressions = [];
 
     public function getSql(SqlWalker $sqlWalker): string
diff --git a/src/Query/AST/Functions/FunctionNode.php b/src/Query/AST/Functions/FunctionNode.php
index 4cc549e7cd4..e49ddba6b3b 100644
--- a/src/Query/AST/Functions/FunctionNode.php
+++ b/src/Query/AST/Functions/FunctionNode.php
@@ -13,7 +13,7 @@
  *
  * @link    www.doctrine-project.org
  *
- * @psalm-consistent-constructor
+ * @phpstan-consistent-constructor
  */
 abstract class FunctionNode extends Node
 {
diff --git a/src/Query/AST/Functions/TrimFunction.php b/src/Query/AST/Functions/TrimFunction.php
index e0a3e99c356..cae620075de 100644
--- a/src/Query/AST/Functions/TrimFunction.php
+++ b/src/Query/AST/Functions/TrimFunction.php
@@ -68,7 +68,7 @@ public function parse(Parser $parser): void
         $parser->match(TokenType::T_CLOSE_PARENTHESIS);
     }
 
-    /** @psalm-return TrimMode::* */
+    /** @phpstan-return TrimMode::* */
     private function getTrimMode(): TrimMode|int
     {
         if ($this->leading) {
diff --git a/src/Query/AST/Join.php b/src/Query/AST/Join.php
index 34ce83088de..67833096f86 100644
--- a/src/Query/AST/Join.php
+++ b/src/Query/AST/Join.php
@@ -20,7 +20,7 @@ class Join extends Node
 
     public ConditionalExpression|Phase2OptimizableConditional|null $conditionalExpression = null;
 
-    /** @psalm-param self::JOIN_TYPE_* $joinType */
+    /** @phpstan-param self::JOIN_TYPE_* $joinType */
     public function __construct(
         public int $joinType,
         public Node|null $joinAssociationDeclaration = null,
diff --git a/src/Query/AST/Literal.php b/src/Query/AST/Literal.php
index 9ec20366c0d..a7b4aae0655 100644
--- a/src/Query/AST/Literal.php
+++ b/src/Query/AST/Literal.php
@@ -12,7 +12,7 @@ class Literal extends Node
     final public const BOOLEAN = 2;
     final public const NUMERIC = 3;
 
-    /** @psalm-param self::* $type */
+    /** @phpstan-param self::* $type */
     public function __construct(
         public int $type,
         public mixed $value,
diff --git a/src/Query/AST/PathExpression.php b/src/Query/AST/PathExpression.php
index 4a56fcdf367..15a3abfd023 100644
--- a/src/Query/AST/PathExpression.php
+++ b/src/Query/AST/PathExpression.php
@@ -21,10 +21,10 @@ class PathExpression extends Node
     final public const TYPE_SINGLE_VALUED_ASSOCIATION     = 4;
     final public const TYPE_STATE_FIELD                   = 8;
 
-    /** @psalm-var self::TYPE_*|null */
+    /** @phpstan-var self::TYPE_*|null */
     public int|null $type = null;
 
-    /** @psalm-param int-mask-of<self::TYPE_*> $expectedType */
+    /** @phpstan-param int-mask-of<self::TYPE_*> $expectedType */
     public function __construct(
         public int $expectedType,
         public string $identificationVariable,
diff --git a/src/Query/AST/Phase2OptimizableConditional.php b/src/Query/AST/Phase2OptimizableConditional.php
index 276f8f8d945..d838f123784 100644
--- a/src/Query/AST/Phase2OptimizableConditional.php
+++ b/src/Query/AST/Phase2OptimizableConditional.php
@@ -9,8 +9,6 @@
  * 2 optimization.
  *
  * @internal
- *
- * @psalm-inheritors ConditionalPrimary|ConditionalFactor|ConditionalTerm
  */
 interface Phase2OptimizableConditional
 {
diff --git a/src/Query/Exec/AbstractSqlExecutor.php b/src/Query/Exec/AbstractSqlExecutor.php
index 101bf266cf8..65c7592ad06 100644
--- a/src/Query/Exec/AbstractSqlExecutor.php
+++ b/src/Query/Exec/AbstractSqlExecutor.php
@@ -17,8 +17,8 @@
  * @link        http://www.doctrine-project.org
  *
  * @todo Rename: AbstractSQLExecutor
- * @psalm-type WrapperParameterType = string|Type|ParameterType::*|ArrayParameterType::*
- * @psalm-type WrapperParameterTypeArray = array<int<0, max>, WrapperParameterType>|array<string, WrapperParameterType>
+ * @phpstan-type WrapperParameterType = string|Type|ParameterType::*|ArrayParameterType::*
+ * @phpstan-type WrapperParameterTypeArray = array<int<0, max>, WrapperParameterType>|array<string, WrapperParameterType>
  */
 abstract class AbstractSqlExecutor
 {
@@ -55,7 +55,7 @@ public function removeQueryCacheProfile(): void
      *
      * @param Connection                       $conn   The database connection that is used to execute the queries.
      * @param list<mixed>|array<string, mixed> $params The parameters.
-     * @psalm-param WrapperParameterTypeArray  $types  The parameter types.
+     * @phpstan-param WrapperParameterTypeArray  $types  The parameter types.
      */
     abstract public function execute(Connection $conn, array $params, array $types): Result|int;
 }
diff --git a/src/Query/Exec/SingleSelectSqlFinalizer.php b/src/Query/Exec/SingleSelectSqlFinalizer.php
index ac31c0cde36..bbaab2b6360 100644
--- a/src/Query/Exec/SingleSelectSqlFinalizer.php
+++ b/src/Query/Exec/SingleSelectSqlFinalizer.php
@@ -28,8 +28,6 @@ public function __construct(private string $sql)
      * This method exists temporarily to support old SqlWalker interfaces.
      *
      * @internal
-     *
-     * @psalm-internal Doctrine\ORM
      */
     public function finalizeSql(Query $query): string
     {
diff --git a/src/Query/Expr/Andx.php b/src/Query/Expr/Andx.php
index a20bcef098f..a5dd03fef34 100644
--- a/src/Query/Expr/Andx.php
+++ b/src/Query/Expr/Andx.php
@@ -21,10 +21,10 @@ class Andx extends Composite
         self::class,
     ];
 
-    /** @psalm-var list<string|Comparison|Func|Orx|self> */
+    /** @phpstan-var list<string|Comparison|Func|Orx|self> */
     protected array $parts = [];
 
-    /** @psalm-return list<string|Comparison|Func|Orx|self> */
+    /** @phpstan-return list<string|Comparison|Func|Orx|self> */
     public function getParts(): array
     {
         return $this->parts;
diff --git a/src/Query/Expr/Base.php b/src/Query/Expr/Base.php
index e0f257277df..62a89737d48 100644
--- a/src/Query/Expr/Base.php
+++ b/src/Query/Expr/Base.php
@@ -44,7 +44,7 @@ public function __construct(mixed $args = [])
 
     /**
      * @param string[]|object[]|string|object $args
-     * @psalm-param list<string|object>|string|object $args
+     * @phpstan-param list<string|object>|string|object $args
      *
      * @return $this
      */
@@ -79,7 +79,7 @@ public function add(mixed $arg): static
         return $this;
     }
 
-    /** @psalm-return 0|positive-int */
+    /** @phpstan-return 0|positive-int */
     public function count(): int
     {
         return count($this->parts);
diff --git a/src/Query/Expr/Func.php b/src/Query/Expr/Func.php
index cd9e8e012a9..41bc79bfee0 100644
--- a/src/Query/Expr/Func.php
+++ b/src/Query/Expr/Func.php
@@ -21,7 +21,7 @@ class Func implements Stringable
     /**
      * Creates a function, with the given argument.
      *
-     * @psalm-param list<mixed>|mixed $arguments
+     * @phpstan-param list<mixed>|mixed $arguments
      */
     public function __construct(
         protected string $name,
@@ -35,7 +35,7 @@ public function getName(): string
         return $this->name;
     }
 
-    /** @psalm-return list<mixed> */
+    /** @phpstan-return list<mixed> */
     public function getArguments(): array
     {
         return $this->arguments;
diff --git a/src/Query/Expr/GroupBy.php b/src/Query/Expr/GroupBy.php
index fa4625a6355..2585196f482 100644
--- a/src/Query/Expr/GroupBy.php
+++ b/src/Query/Expr/GroupBy.php
@@ -14,10 +14,10 @@ class GroupBy extends Base
     protected string $preSeparator  = '';
     protected string $postSeparator = '';
 
-    /** @psalm-var list<string> */
+    /** @phpstan-var list<string> */
     protected array $parts = [];
 
-    /** @psalm-return list<string> */
+    /** @phpstan-return list<string> */
     public function getParts(): array
     {
         return $this->parts;
diff --git a/src/Query/Expr/Join.php b/src/Query/Expr/Join.php
index c3b6dc9dd00..80a1acaa4d0 100644
--- a/src/Query/Expr/Join.php
+++ b/src/Query/Expr/Join.php
@@ -22,8 +22,8 @@ class Join implements Stringable
     final public const WITH = 'WITH';
 
     /**
-     * @psalm-param self::INNER_JOIN|self::LEFT_JOIN $joinType
-     * @psalm-param self::ON|self::WITH|null $conditionType
+     * @phpstan-param self::INNER_JOIN|self::LEFT_JOIN $joinType
+     * @phpstan-param self::ON|self::WITH|null $conditionType
      */
     public function __construct(
         protected string $joinType,
@@ -35,7 +35,7 @@ public function __construct(
     ) {
     }
 
-    /** @psalm-return self::INNER_JOIN|self::LEFT_JOIN */
+    /** @phpstan-return self::INNER_JOIN|self::LEFT_JOIN */
     public function getJoinType(): string
     {
         return $this->joinType;
@@ -51,7 +51,7 @@ public function getAlias(): string|null
         return $this->alias;
     }
 
-    /** @psalm-return self::ON|self::WITH|null */
+    /** @phpstan-return self::ON|self::WITH|null */
     public function getConditionType(): string|null
     {
         return $this->conditionType;
diff --git a/src/Query/Expr/Literal.php b/src/Query/Expr/Literal.php
index 0c130309c45..4e2618b1a78 100644
--- a/src/Query/Expr/Literal.php
+++ b/src/Query/Expr/Literal.php
@@ -14,10 +14,10 @@ class Literal extends Base
     protected string $preSeparator  = '';
     protected string $postSeparator = '';
 
-    /** @psalm-var list<string> */
+    /** @phpstan-var list<string> */
     protected array $parts = [];
 
-    /** @psalm-return list<string> */
+    /** @phpstan-return list<string> */
     public function getParts(): array
     {
         return $this->parts;
diff --git a/src/Query/Expr/OrderBy.php b/src/Query/Expr/OrderBy.php
index ac9e1601563..bbaa7f9ec3d 100644
--- a/src/Query/Expr/OrderBy.php
+++ b/src/Query/Expr/OrderBy.php
@@ -23,7 +23,7 @@ class OrderBy implements Stringable
     /** @var string[] */
     protected array $allowedClasses = [];
 
-    /** @psalm-var list<string> */
+    /** @phpstan-var list<string> */
     protected array $parts = [];
 
     public function __construct(
@@ -41,13 +41,13 @@ public function add(string $sort, string|null $order = null): void
         $this->parts[] = $sort . ' ' . $order;
     }
 
-    /** @psalm-return 0|positive-int */
+    /** @phpstan-return 0|positive-int */
     public function count(): int
     {
         return count($this->parts);
     }
 
-    /** @psalm-return list<string> */
+    /** @phpstan-return list<string> */
     public function getParts(): array
     {
         return $this->parts;
diff --git a/src/Query/Expr/Orx.php b/src/Query/Expr/Orx.php
index 2ae23320168..0945e265226 100644
--- a/src/Query/Expr/Orx.php
+++ b/src/Query/Expr/Orx.php
@@ -21,10 +21,10 @@ class Orx extends Composite
         self::class,
     ];
 
-    /** @psalm-var list<string|Comparison|Func|Andx|self> */
+    /** @phpstan-var list<string|Comparison|Func|Andx|self> */
     protected array $parts = [];
 
-    /** @psalm-return list<string|Comparison|Func|Andx|self> */
+    /** @phpstan-return list<string|Comparison|Func|Andx|self> */
     public function getParts(): array
     {
         return $this->parts;
diff --git a/src/Query/Expr/Select.php b/src/Query/Expr/Select.php
index 91b0b600949..beedcd3ac80 100644
--- a/src/Query/Expr/Select.php
+++ b/src/Query/Expr/Select.php
@@ -17,10 +17,10 @@ class Select extends Base
     /** @var string[] */
     protected array $allowedClasses = [Func::class];
 
-    /** @psalm-var list<string|Func> */
+    /** @phpstan-var list<string|Func> */
     protected array $parts = [];
 
-    /** @psalm-return list<string|Func> */
+    /** @phpstan-return list<string|Func> */
     public function getParts(): array
     {
         return $this->parts;
diff --git a/src/Query/Filter/SQLFilter.php b/src/Query/Filter/SQLFilter.php
index 29f37756eb3..4be63539cab 100644
--- a/src/Query/Filter/SQLFilter.php
+++ b/src/Query/Filter/SQLFilter.php
@@ -29,7 +29,7 @@ abstract class SQLFilter implements Stringable
     /**
      * Parameters for the filter.
      *
-     * @psalm-var array<string,array{type: string, value: mixed, is_list: bool}>
+     * @phpstan-var array<string,array{type: string, value: mixed, is_list: bool}>
      */
     private array $parameters = [];
 
@@ -166,7 +166,7 @@ final protected function getConnection(): Connection
     /**
      * Gets the SQL query part to add to a query.
      *
-     * @psalm-param ClassMetadata<object> $targetEntity
+     * @phpstan-param ClassMetadata<object> $targetEntity
      *
      * @return string The constraint SQL if there is available, empty string otherwise.
      */
diff --git a/src/Query/FilterCollection.php b/src/Query/FilterCollection.php
index 3d3c576d7c5..818f76d94b4 100644
--- a/src/Query/FilterCollection.php
+++ b/src/Query/FilterCollection.php
@@ -45,14 +45,14 @@ class FilterCollection
      * Instances of suspended filters.
      *
      * @var SQLFilter[]
-     * @psalm-var array<string, SQLFilter>
+     * @phpstan-var array<string, SQLFilter>
      */
     private array $suspendedFilters = [];
 
     /**
      * The current state of this filter.
      *
-     * @psalm-var self::FILTERS_STATE_*
+     * @phpstan-var self::FILTERS_STATE_*
      */
     private int $filtersState = self::FILTERS_STATE_CLEAN;
 
@@ -76,7 +76,7 @@ public function getEnabledFilters(): array
      * Gets all the suspended filters.
      *
      * @return SQLFilter[] The suspended filters.
-     * @psalm-return array<string, SQLFilter>
+     * @phpstan-return array<string, SQLFilter>
      */
     public function getSuspendedFilters(): array
     {
diff --git a/src/Query/Parser.php b/src/Query/Parser.php
index bcfad85c422..86fb8243b49 100644
--- a/src/Query/Parser.php
+++ b/src/Query/Parser.php
@@ -40,8 +40,8 @@
  * An LL(*) recursive-descent parser for the context-free grammar of the Doctrine Query Language.
  * Parses a DQL query, reports any errors in it, and generates an AST.
  *
- * @psalm-type DqlToken = Token<TokenType, string>
- * @psalm-type QueryComponent = array{
+ * @phpstan-type DqlToken = Token<TokenType, string>
+ * @phpstan-type QueryComponent = array{
  *                 metadata?: ClassMetadata<object>,
  *                 parent?: string|null,
  *                 relation?: AssociationMapping|null,
@@ -106,19 +106,19 @@ final class Parser
      * and still need to be validated.
      */
 
-    /** @psalm-var list<array{token: DqlToken|null, expression: mixed, nestingLevel: int}> */
+    /** @phpstan-var list<array{token: DqlToken|null, expression: mixed, nestingLevel: int}> */
     private array $deferredIdentificationVariables = [];
 
-    /** @psalm-var list<array{token: DqlToken|null, expression: AST\PartialObjectExpression, nestingLevel: int}> */
+    /** @phpstan-var list<array{token: DqlToken|null, expression: AST\PartialObjectExpression, nestingLevel: int}> */
     private array $deferredPartialObjectExpressions = [];
 
-    /** @psalm-var list<array{token: DqlToken|null, expression: AST\PathExpression, nestingLevel: int}> */
+    /** @phpstan-var list<array{token: DqlToken|null, expression: AST\PathExpression, nestingLevel: int}> */
     private array $deferredPathExpressions = [];
 
-    /** @psalm-var list<array{token: DqlToken|null, expression: mixed, nestingLevel: int}> */
+    /** @phpstan-var list<array{token: DqlToken|null, expression: mixed, nestingLevel: int}> */
     private array $deferredResultVariables = [];
 
-    /** @psalm-var list<array{token: DqlToken|null, expression: AST\NewObjectExpression, nestingLevel: int}> */
+    /** @phpstan-var list<array{token: DqlToken|null, expression: AST\NewObjectExpression, nestingLevel: int}> */
     private array $deferredNewObjectExpressions = [];
 
     /**
@@ -139,7 +139,7 @@ final class Parser
     /**
      * Map of declared query components in the parsed query.
      *
-     * @psalm-var array<string, QueryComponent>
+     * @phpstan-var array<string, QueryComponent>
      */
     private array $queryComponents = [];
 
@@ -162,7 +162,7 @@ final class Parser
      */
     private $customOutputWalker;
 
-    /** @psalm-var array<string, AST\SelectExpression> */
+    /** @phpstan-var array<string, AST\SelectExpression> */
     private array $identVariableExpressions = [];
 
     /**
@@ -436,7 +436,7 @@ public function syntaxError(string $expected = '', Token|null $token = null): ne
      * Generates a new semantical error.
      *
      * @param string $message Optional message.
-     * @psalm-param DqlToken|null $token
+     * @phpstan-param DqlToken|null $token
      *
      * @throws QueryException
      */
@@ -470,7 +470,7 @@ public function semanticalError(string $message = '', Token|null $token = null):
      *
      * @param bool $resetPeek Reset peek after finding the closing parenthesis.
      *
-     * @psalm-return DqlToken|null
+     * @phpstan-return DqlToken|null
      */
     private function peekBeyondClosingParenthesis(bool $resetPeek = true): Token|null
     {
@@ -504,7 +504,7 @@ private function peekBeyondClosingParenthesis(bool $resetPeek = true): Token|nul
     /**
      * Checks if the given token indicates a mathematical operator.
      *
-     * @psalm-param DqlToken|null $token
+     * @phpstan-param DqlToken|null $token
      */
     private function isMathOperator(Token|null $token): bool
     {
@@ -1026,7 +1026,7 @@ public function JoinAssociationPathExpression(): AST\JoinAssociationPathExpressi
      *
      * PathExpression ::= IdentificationVariable {"." identifier}*
      *
-     * @psalm-param int-mask-of<AST\PathExpression::TYPE_*> $expectedTypes
+     * @phpstan-param int-mask-of<AST\PathExpression::TYPE_*> $expectedTypes
      */
     public function PathExpression(int $expectedTypes): AST\PathExpression
     {
@@ -3361,9 +3361,12 @@ public function CustomFunctionsReturningNumerics(): AST\Functions\FunctionNode
 
         assert($functionClass !== null);
 
-        $function = is_string($functionClass)
-            ? new $functionClass($functionName)
-            : $functionClass($functionName);
+        if (is_string($functionClass)) {
+            $function = new $functionClass($functionName);
+            assert($function instanceof AST\Functions\FunctionNode);
+        } else {
+            $function = $functionClass($functionName);
+        }
 
         $function->parse($this);
 
diff --git a/src/Query/ParserResult.php b/src/Query/ParserResult.php
index 7539e999ac3..34225e046e4 100644
--- a/src/Query/ParserResult.php
+++ b/src/Query/ParserResult.php
@@ -37,7 +37,7 @@ class ParserResult
     /**
      * The mappings of DQL parameter names/positions to SQL parameter positions.
      *
-     * @psalm-var array<string|int, list<int>>
+     * @phpstan-var array<string|int, list<int>>
      */
     private array $parameterMappings = [];
 
@@ -125,7 +125,7 @@ public function addParameterMapping(string|int $dqlPosition, int $sqlPosition):
     /**
      * Gets all DQL to SQL parameter mappings.
      *
-     * @psalm-return array<int|string, list<int>> The parameter mappings.
+     * @phpstan-return array<int|string, list<int>> The parameter mappings.
      */
     public function getParameterMappings(): array
     {
@@ -138,7 +138,7 @@ public function getParameterMappings(): array
      * @param string|int $dqlPosition The name or position of the DQL parameter.
      *
      * @return int[] The positions of the corresponding SQL parameters.
-     * @psalm-return list<int>
+     * @phpstan-return list<int>
      */
     public function getSqlParameterPositions(string|int $dqlPosition): array
     {
diff --git a/src/Query/QueryException.php b/src/Query/QueryException.php
index 5c82b20a7a4..4b8efaeff7e 100644
--- a/src/Query/QueryException.php
+++ b/src/Query/QueryException.php
@@ -99,7 +99,7 @@ public static function partialObjectsAreDangerous(): self
 
     /**
      * @param string[] $assoc
-     * @psalm-param array<string, string> $assoc
+     * @phpstan-param array<string, string> $assoc
      */
     public static function overwritingJoinConditionsNotYetSupported(array $assoc): self
     {
diff --git a/src/Query/ResultSetMapping.php b/src/Query/ResultSetMapping.php
index 920461b53d4..430db10fec8 100644
--- a/src/Query/ResultSetMapping.php
+++ b/src/Query/ResultSetMapping.php
@@ -46,7 +46,7 @@ class ResultSetMapping
      * Maps alias names to related association field names.
      *
      * @ignore
-     * @psalm-var array<string, string>
+     * @phpstan-var array<string, string>
      */
     public array $relationMap = [];
 
@@ -54,7 +54,7 @@ class ResultSetMapping
      * Maps alias names to parent alias names.
      *
      * @ignore
-     * @psalm-var array<string, string>
+     * @phpstan-var array<string, string>
      */
     public array $parentAliasMap = [];
 
@@ -62,7 +62,7 @@ class ResultSetMapping
      * Maps column names in the result set to field names for each class.
      *
      * @ignore
-     * @psalm-var array<string, string>
+     * @phpstan-var array<string, string>
      */
     public array $fieldMappings = [];
 
@@ -70,7 +70,7 @@ class ResultSetMapping
      * Maps column names in the result set to the alias/field name to use in the mapped result.
      *
      * @ignore
-     * @psalm-var array<string, string|int>
+     * @phpstan-var array<string, string|int>
      */
     public array $scalarMappings = [];
 
@@ -78,7 +78,7 @@ class ResultSetMapping
      * Maps scalar columns to enums
      *
      * @ignore
-     * @psalm-var array<string, string>
+     * @phpstan-var array<string, string>
      */
     public $enumMappings = [];
 
@@ -86,7 +86,7 @@ class ResultSetMapping
      * Maps column names in the result set to the alias/field type to use in the mapped result.
      *
      * @ignore
-     * @psalm-var array<string, string>
+     * @phpstan-var array<string, string>
      */
     public array $typeMappings = [];
 
@@ -94,7 +94,7 @@ class ResultSetMapping
      * Maps entities in the result set to the alias name to use in the mapped result.
      *
      * @ignore
-     * @psalm-var array<string, string|null>
+     * @phpstan-var array<string, string|null>
      */
     public array $entityMappings = [];
 
@@ -102,7 +102,7 @@ class ResultSetMapping
      * Maps column names of meta columns (foreign keys, discriminator columns, ...) to field names.
      *
      * @ignore
-     * @psalm-var array<string, string>
+     * @phpstan-var array<string, string>
      */
     public array $metaMappings = [];
 
@@ -110,7 +110,7 @@ class ResultSetMapping
      * Maps column names in the result set to the alias they belong to.
      *
      * @ignore
-     * @psalm-var array<string, string>
+     * @phpstan-var array<string, string>
      */
     public array $columnOwnerMap = [];
 
@@ -118,7 +118,7 @@ class ResultSetMapping
      * List of columns in the result set that are used as discriminator columns.
      *
      * @ignore
-     * @psalm-var array<string, string>
+     * @phpstan-var array<string, string>
      */
     public array $discriminatorColumns = [];
 
@@ -126,7 +126,7 @@ class ResultSetMapping
      * Maps alias names to field names that should be used for indexing.
      *
      * @ignore
-     * @psalm-var array<string, string>
+     * @phpstan-var array<string, string>
      */
     public array $indexByMap = [];
 
@@ -141,35 +141,35 @@ class ResultSetMapping
     /**
      * This is necessary to hydrate derivate foreign keys correctly.
      *
-     * @psalm-var array<string, array<string, bool>>
+     * @phpstan-var array<string, array<string, bool>>
      */
     public array $isIdentifierColumn = [];
 
     /**
      * Maps column names in the result set to field names for each new object expression.
      *
-     * @psalm-var array<string, array<string, mixed>>
+     * @phpstan-var array<string, array<string, mixed>>
      */
     public array $newObjectMappings = [];
 
     /**
      * Maps last argument for new objects in order to initiate object construction
      *
-     * @psalm-var array<int|string, array{ownerIndex: string|int, argIndex: int|string}>
+     * @phpstan-var array<int|string, array{ownerIndex: string|int, argIndex: int|string}>
      */
     public array $nestedNewObjectArguments = [];
 
     /**
      * Maps metadata parameter names to the metadata attribute.
      *
-     * @psalm-var array<int|string, string>
+     * @phpstan-var array<int|string, string>
      */
     public array $metadataParameterMapping = [];
 
     /**
      * Contains query parameter names to be resolved as discriminator values
      *
-     * @psalm-var array<string, string>
+     * @phpstan-var array<string, string>
      */
     public array $discriminatorParameters = [];
 
@@ -419,7 +419,7 @@ public function isScalarResult(string $columnName): bool
      * Gets the name of the class of an entity result or joined entity result,
      * identified by the given unique alias.
      *
-     * @psalm-return class-string
+     * @phpstan-return class-string
      */
     public function getClassName(string $alias): string
     {
@@ -439,7 +439,7 @@ public function getScalarAlias(string $columnName): string|int
     /**
      * Gets the name of the class that owns a field mapping for the specified column.
      *
-     * @psalm-return class-string
+     * @phpstan-return class-string
      */
     public function getDeclaringClass(string $columnName): string
     {
@@ -497,7 +497,7 @@ public function getAliasMap(): array
     /**
      * Gets the number of different entities that appear in the mapped result.
      *
-     * @psalm-return 0|positive-int
+     * @phpstan-return 0|positive-int
      */
     public function getEntityResultCount(): int
     {
diff --git a/src/Query/ResultSetMappingBuilder.php b/src/Query/ResultSetMappingBuilder.php
index f74763c138a..726564a3f1b 100644
--- a/src/Query/ResultSetMappingBuilder.php
+++ b/src/Query/ResultSetMappingBuilder.php
@@ -46,7 +46,7 @@ class ResultSetMappingBuilder extends ResultSetMapping implements Stringable
 
     private int $sqlCounter = 0;
 
-    /** @psalm-param self::COLUMN_RENAMING_* $defaultRenameMode */
+    /** @phpstan-param self::COLUMN_RENAMING_* $defaultRenameMode */
     public function __construct(
         private readonly EntityManagerInterface $em,
         private readonly int $defaultRenameMode = self::COLUMN_RENAMING_NONE,
@@ -59,7 +59,7 @@ public function __construct(
      * @param class-string          $class          The class name of the root entity.
      * @param string                $alias          The unique alias to use for the root entity.
      * @param array<string, string> $renamedColumns Columns that have been renamed (tableColumnName => queryColumnName).
-     * @psalm-param self::COLUMN_RENAMING_*|null $renameMode
+     * @phpstan-param self::COLUMN_RENAMING_*|null $renameMode
      */
     public function addRootEntityFromClassMetadata(
         string $class,
@@ -83,7 +83,7 @@ public function addRootEntityFromClassMetadata(
      * @param string                $relation       The association field that connects the parent entity result
      *                                              with the joined entity result.
      * @param array<string, string> $renamedColumns Columns that have been renamed (tableColumnName => queryColumnName).
-     * @psalm-param self::COLUMN_RENAMING_*|null $renameMode
+     * @phpstan-param self::COLUMN_RENAMING_*|null $renameMode
      */
     public function addJoinedEntityFromClassMetadata(
         string $class,
@@ -104,7 +104,7 @@ public function addJoinedEntityFromClassMetadata(
      * Adds all fields of the given class to the result set mapping (columns and meta fields).
      *
      * @param string[] $columnAliasMap
-     * @psalm-param array<string, string> $columnAliasMap
+     * @phpstan-param array<string, string> $columnAliasMap
      *
      * @throws InvalidArgumentException
      */
@@ -174,9 +174,9 @@ private function isInheritanceSupported(ClassMetadata $classMetadata): bool
     /**
      * Gets column alias for a given column.
      *
-     * @psalm-param array<string, string>  $customRenameColumns
+     * @phpstan-param array<string, string>  $customRenameColumns
      *
-     * @psalm-assert self::COLUMN_RENAMING_* $mode
+     * @phpstan-assert self::COLUMN_RENAMING_* $mode
      */
     private function getColumnAlias(string $columnName, int $mode, array $customRenameColumns): string
     {
@@ -194,8 +194,8 @@ private function getColumnAlias(string $columnName, int $mode, array $customRena
      * This depends on the renaming mode selected by the user.
      *
      * @param class-string $className
-     * @psalm-param self::COLUMN_RENAMING_* $mode
-     * @psalm-param array<string, string> $customRenameColumns
+     * @phpstan-param self::COLUMN_RENAMING_* $mode
+     * @phpstan-param array<string, string> $customRenameColumns
      *
      * @return string[]
      */
@@ -234,7 +234,7 @@ private function getColumnAliasMap(
      * expressions have to be written manually.
      *
      * @param string[] $tableAliases
-     * @psalm-param array<string, string> $tableAliases
+     * @phpstan-param array<string, string> $tableAliases
      */
     public function generateSelectClause(array $tableAliases = []): string
     {
diff --git a/src/Query/SqlWalker.php b/src/Query/SqlWalker.php
index 8164ae13bb8..9089995e432 100644
--- a/src/Query/SqlWalker.php
+++ b/src/Query/SqlWalker.php
@@ -45,8 +45,8 @@
 /**
  * The SqlWalker walks over a DQL AST and constructs the corresponding SQL.
  *
- * @psalm-import-type QueryComponent from Parser
- * @psalm-consistent-constructor
+ * @phpstan-import-type QueryComponent from Parser
+ * @phpstan-consistent-constructor
  */
 class SqlWalker
 {
@@ -87,7 +87,7 @@ class SqlWalker
     /**
      * Contains nesting levels of new objects arguments
      *
-     * @psalm-var array<int, array{0: string|int, 1: int}>
+     * @phpstan-var array<int, array{0: string|int, 1: int}>
      */
     private array $newObjectStack = [];
 
@@ -100,7 +100,7 @@ class SqlWalker
     /**
      * Map from result variable names to their SQL column alias names.
      *
-     * @psalm-var array<string|int, string|list<string>>
+     * @phpstan-var array<string|int, string|list<string>>
      */
     private array $scalarResultAliasMap = [];
 
@@ -121,14 +121,14 @@ class SqlWalker
     /**
      * A list of classes that appear in non-scalar SelectExpressions.
      *
-     * @psalm-var array<string, array{class: ClassMetadata, dqlAlias: string, resultAlias: string|null}>
+     * @phpstan-var array<string, array{class: ClassMetadata, dqlAlias: string, resultAlias: string|null}>
      */
     private array $selectedClasses = [];
 
     /**
      * The DQL alias of the root class of the currently traversed query.
      *
-     * @psalm-var list<string>
+     * @phpstan-var list<string>
      */
     private array $rootAliases = [];
 
@@ -148,7 +148,7 @@ class SqlWalker
      */
     private readonly QuoteStrategy $quoteStrategy;
 
-    /** @psalm-param array<string, QueryComponent> $queryComponents The query components (symbol table). */
+    /** @phpstan-param array<string, QueryComponent> $queryComponents The query components (symbol table). */
     public function __construct(
         private readonly Query $query,
         private readonly ParserResult $parserResult,
@@ -191,7 +191,7 @@ public function getEntityManager(): EntityManagerInterface
      * @param string $dqlAlias The DQL alias.
      *
      * @return mixed[]
-     * @psalm-return QueryComponent
+     * @phpstan-return QueryComponent
      */
     public function getQueryComponent(string $dqlAlias): array
     {
@@ -217,7 +217,7 @@ public function getQueryComponents(): array
     /**
      * Sets or overrides a query component for a given dql alias.
      *
-     * @psalm-param QueryComponent $queryComponent
+     * @phpstan-param QueryComponent $queryComponent
      */
     public function setQueryComponent(string $dqlAlias, array $queryComponent): void
     {
@@ -246,7 +246,6 @@ public function getExecutor(AST\SelectStatement|AST\UpdateStatement|AST\DeleteSt
         };
     }
 
-    /** @psalm-internal Doctrine\ORM */
     protected function createUpdateStatementExecutor(AST\UpdateStatement $AST): Exec\AbstractSqlExecutor
     {
         $primaryClass = $this->em->getClassMetadata($AST->updateClause->abstractSchemaName);
@@ -256,7 +255,6 @@ protected function createUpdateStatementExecutor(AST\UpdateStatement $AST): Exec
             : new Exec\SingleTableDeleteUpdateExecutor($AST, $this);
     }
 
-    /** @psalm-internal Doctrine\ORM */
     protected function createDeleteStatementExecutor(AST\DeleteStatement $AST): Exec\AbstractSqlExecutor
     {
         $primaryClass = $this->em->getClassMetadata($AST->deleteClause->abstractSchemaName);
@@ -398,7 +396,7 @@ private function generateOrderedCollectionOrderByItems(): string
     /**
      * Generates a discriminator column SQL condition for the class with the given DQL alias.
      *
-     * @psalm-param list<string> $dqlAliases List of root DQL aliases to inspect for discriminator restrictions.
+     * @phpstan-param list<string> $dqlAliases List of root DQL aliases to inspect for discriminator restrictions.
      */
     private function generateDiscriminatorColumnConditionSQL(array $dqlAliases): string
     {
@@ -909,7 +907,7 @@ private function generateRangeVariableDeclarationSQL(
     /**
      * Walks down a JoinAssociationDeclaration AST node, thereby generating the appropriate SQL.
      *
-     * @psalm-param AST\Join::JOIN_TYPE_* $joinType
+     * @phpstan-param AST\Join::JOIN_TYPE_* $joinType
      *
      * @throws QueryException
      */
diff --git a/src/Query/TreeWalker.php b/src/Query/TreeWalker.php
index 6c215773d4f..964762d8256 100644
--- a/src/Query/TreeWalker.php
+++ b/src/Query/TreeWalker.php
@@ -9,21 +9,21 @@
 /**
  * Interface for walkers of DQL ASTs (abstract syntax trees).
  *
- * @psalm-import-type QueryComponent from Parser
+ * @phpstan-import-type QueryComponent from Parser
  */
 interface TreeWalker
 {
     /**
      * Initializes TreeWalker with important information about the ASTs to be walked.
      *
-     * @psalm-param array<string, QueryComponent> $queryComponents The query components (symbol table).
+     * @phpstan-param array<string, QueryComponent> $queryComponents The query components (symbol table).
      */
     public function __construct(AbstractQuery $query, ParserResult $parserResult, array $queryComponents);
 
     /**
      * Returns internal queryComponents array.
      *
-     * @psalm-return array<string, QueryComponent>
+     * @phpstan-return array<string, QueryComponent>
      */
     public function getQueryComponents(): array;
 
diff --git a/src/Query/TreeWalkerAdapter.php b/src/Query/TreeWalkerAdapter.php
index a7948db5c69..dc838a95900 100644
--- a/src/Query/TreeWalkerAdapter.php
+++ b/src/Query/TreeWalkerAdapter.php
@@ -16,7 +16,7 @@
  * An adapter implementation of the TreeWalker interface. The methods in this class
  * are empty. This class exists as convenience for creating tree walkers.
  *
- * @psalm-import-type QueryComponent from Parser
+ * @phpstan-import-type QueryComponent from Parser
  */
 abstract class TreeWalkerAdapter implements TreeWalker
 {
@@ -53,7 +53,7 @@ public function walkDeleteStatement(AST\DeleteStatement $deleteStatement): void
     /**
      * Sets or overrides a query component for a given dql alias.
      *
-     * @psalm-param QueryComponent $queryComponent
+     * @phpstan-param QueryComponent $queryComponent
      */
     protected function setQueryComponent(string $dqlAlias, array $queryComponent): void
     {
diff --git a/src/Query/TreeWalkerChain.php b/src/Query/TreeWalkerChain.php
index 7b40ea17788..ac21aaa7c8f 100644
--- a/src/Query/TreeWalkerChain.php
+++ b/src/Query/TreeWalkerChain.php
@@ -12,7 +12,7 @@
  * Only the last walker in the chain can emit output. Any previous walkers can modify
  * the AST to influence the final output produced by the last walker.
  *
- * @psalm-import-type QueryComponent from Parser
+ * @phpstan-import-type QueryComponent from Parser
  */
 class TreeWalkerChain implements TreeWalker
 {
@@ -76,7 +76,7 @@ public function walkDeleteStatement(AST\DeleteStatement $deleteStatement): void
         }
     }
 
-    /** @psalm-return Generator<int, TreeWalker> */
+    /** @phpstan-return Generator<int, TreeWalker> */
     private function getWalkers(): Generator
     {
         foreach ($this->walkers as $walkerClass) {
diff --git a/src/QueryBuilder.php b/src/QueryBuilder.php
index 3bb60a2bcca..d695501ba6c 100644
--- a/src/QueryBuilder.php
+++ b/src/QueryBuilder.php
@@ -46,7 +46,7 @@ class QueryBuilder implements Stringable
     /**
      * The array of DQL parts collected.
      *
-     * @psalm-var array<string, mixed>
+     * @phpstan-var array<string, mixed>
      */
     private array $dqlParts = [
         'distinct' => false,
@@ -70,7 +70,7 @@ class QueryBuilder implements Stringable
     /**
      * The query parameters.
      *
-     * @psalm-var ArrayCollection<int, Parameter>
+     * @phpstan-var ArrayCollection<int, Parameter>
      */
     private ArrayCollection $parameters;
 
@@ -87,7 +87,7 @@ class QueryBuilder implements Stringable
     /**
      * Keeps root entity alias names for join entities.
      *
-     * @psalm-var array<string, string>
+     * @phpstan-var array<string, string>
      */
     private array $joinRootAliases = [];
 
@@ -104,7 +104,7 @@ class QueryBuilder implements Stringable
     /**
      * Second level query cache mode.
      *
-     * @psalm-var Cache::MODE_*|null
+     * @phpstan-var Cache::MODE_*|null
      */
     protected int|null $cacheMode = null;
 
@@ -203,14 +203,14 @@ public function setLifetime(int $lifetime): static
         return $this;
     }
 
-    /** @psalm-return Cache::MODE_*|null */
+    /** @phpstan-return Cache::MODE_*|null */
     public function getCacheMode(): int|null
     {
         return $this->cacheMode;
     }
 
     /**
-     * @psalm-param Cache::MODE_* $cacheMode
+     * @phpstan-param Cache::MODE_* $cacheMode
      *
      * @return $this
      */
@@ -350,7 +350,7 @@ public function getRootAlias(): string
      * </code>
      *
      * @return string[]
-     * @psalm-return list<string>
+     * @phpstan-return list<string>
      */
     public function getRootAliases(): array
     {
@@ -360,7 +360,7 @@ public function getRootAliases(): array
             if (is_string($fromClause)) {
                 $spacePos = strrpos($fromClause, ' ');
 
-                /** @psalm-var class-string $from */
+                /** @phpstan-var class-string $from */
                 $from  = substr($fromClause, 0, $spacePos);
                 $alias = substr($fromClause, $spacePos + 1);
 
@@ -387,7 +387,7 @@ public function getRootAliases(): array
      * </code>
      *
      * @return string[]
-     * @psalm-return list<string>
+     * @phpstan-return list<string>
      */
     public function getAllAliases(): array
     {
@@ -407,7 +407,7 @@ public function getAllAliases(): array
      * </code>
      *
      * @return string[]
-     * @psalm-return list<class-string>
+     * @phpstan-return list<class-string>
      */
     public function getRootEntities(): array
     {
@@ -417,7 +417,7 @@ public function getRootEntities(): array
             if (is_string($fromClause)) {
                 $spacePos = strrpos($fromClause, ' ');
 
-                /** @psalm-var class-string $from */
+                /** @phpstan-var class-string $from */
                 $from  = substr($fromClause, 0, $spacePos);
                 $alias = substr($fromClause, $spacePos + 1);
 
@@ -475,7 +475,7 @@ public function setParameter(string|int $key, mixed $value, ParameterType|ArrayP
      *        )));
      * </code>
      *
-     * @psalm-param ArrayCollection<int, Parameter> $parameters
+     * @phpstan-param ArrayCollection<int, Parameter> $parameters
      *
      * @return $this
      */
@@ -489,7 +489,7 @@ public function setParameters(ArrayCollection $parameters): static
     /**
      * Gets all defined query parameters for the query being constructed.
      *
-     * @psalm-return ArrayCollection<int, Parameter>
+     * @phpstan-return ArrayCollection<int, Parameter>
      */
     public function getParameters(): ArrayCollection
     {
@@ -557,7 +557,7 @@ public function getMaxResults(): int|null
      * The available parts are: 'select', 'from', 'join', 'set', 'where',
      * 'groupBy', 'having' and 'orderBy'.
      *
-     * @psalm-param string|object|list<string>|array{join: array<int|string, object>} $dqlPart
+     * @phpstan-param string|object|list<string>|array{join: array<int|string, object>} $dqlPart
      *
      * @return $this
      */
@@ -831,7 +831,7 @@ public function indexBy(string $alias, string $indexBy): static
      *         ->join('u.Phonenumbers', 'p', Expr\Join::WITH, 'p.is_primary = 1');
      * </code>
      *
-     * @psalm-param Expr\Join::ON|Expr\Join::WITH|null $conditionType
+     * @phpstan-param Expr\Join::ON|Expr\Join::WITH|null $conditionType
      *
      * @return $this
      */
@@ -858,7 +858,7 @@ public function join(
      *         ->from('User', 'u')
      *         ->innerJoin('u.Phonenumbers', 'p', Expr\Join::WITH, 'p.is_primary = 1');
      *
-     * @psalm-param Expr\Join::ON|Expr\Join::WITH|null $conditionType
+     * @phpstan-param Expr\Join::ON|Expr\Join::WITH|null $conditionType
      *
      * @return $this
      */
@@ -899,7 +899,7 @@ public function innerJoin(
      *         ->leftJoin('u.Phonenumbers', 'p', Expr\Join::WITH, 'p.is_primary = 1');
      * </code>
      *
-     * @psalm-param Expr\Join::ON|Expr\Join::WITH|null $conditionType
+     * @phpstan-param Expr\Join::ON|Expr\Join::WITH|null $conditionType
      *
      * @return $this
      */
@@ -1237,7 +1237,7 @@ public function getDQLPart(string $queryPartName): mixed
     /**
      * Gets all query parts.
      *
-     * @psalm-return array<string, mixed> $dqlParts
+     * @phpstan-return array<string, mixed> $dqlParts
      */
     public function getDQLParts(): array
     {
@@ -1297,7 +1297,7 @@ private function getDQLForSelect(): string
         return $dql;
     }
 
-    /** @psalm-param array<string, mixed> $options */
+    /** @phpstan-param array<string, mixed> $options */
     private function getReducedDQLQueryPart(string $queryPartName, array $options = []): string
     {
         $queryPart = $this->getDQLPart($queryPartName);
@@ -1315,7 +1315,7 @@ private function getReducedDQLQueryPart(string $queryPartName, array $options =
      * Resets DQL parts.
      *
      * @param string[]|null $parts
-     * @psalm-param list<string>|null $parts
+     * @phpstan-param list<string>|null $parts
      *
      * @return $this
      */
diff --git a/src/Repository/DefaultRepositoryFactory.php b/src/Repository/DefaultRepositoryFactory.php
index 5c408fb17f5..59a5afdf48a 100644
--- a/src/Repository/DefaultRepositoryFactory.php
+++ b/src/Repository/DefaultRepositoryFactory.php
@@ -19,7 +19,7 @@ final class DefaultRepositoryFactory implements RepositoryFactory
      * The list of EntityRepository instances.
      *
      * @var ObjectRepository[]
-     * @psalm-var array<string, EntityRepository>
+     * @phpstan-var array<string, EntityRepository>
      */
     private array $repositoryList = [];
 
diff --git a/src/Tools/Console/Command/MappingDescribeCommand.php b/src/Tools/Console/Command/MappingDescribeCommand.php
index 26b9b4f382b..a0c69535346 100644
--- a/src/Tools/Console/Command/MappingDescribeCommand.php
+++ b/src/Tools/Console/Command/MappingDescribeCommand.php
@@ -229,7 +229,7 @@ private function formatValue(mixed $value): string
      * @param mixed  $value A Value to show
      *
      * @return string[]
-     * @psalm-return array{0: string, 1: string}
+     * @phpstan-return array{0: string, 1: string}
      */
     private function formatField(string $label, mixed $value): array
     {
@@ -243,10 +243,10 @@ private function formatField(string $label, mixed $value): array
     /**
      * Format the association mappings
      *
-     * @psalm-param array<string, FieldMapping|AssociationMapping> $propertyMappings
+     * @phpstan-param array<string, FieldMapping|AssociationMapping> $propertyMappings
      *
      * @return string[][]
-     * @psalm-return list<array{0: string, 1: string}>
+     * @phpstan-return list<array{0: string, 1: string}>
      */
     private function formatMappings(array $propertyMappings): array
     {
@@ -266,10 +266,10 @@ private function formatMappings(array $propertyMappings): array
     /**
      * Format the entity listeners
      *
-     * @psalm-param list<object> $entityListeners
+     * @phpstan-param list<object> $entityListeners
      *
      * @return string[]
-     * @psalm-return array{0: string, 1: string}
+     * @phpstan-return array{0: string, 1: string}
      */
     private function formatEntityListeners(array $entityListeners): array
     {
diff --git a/src/Tools/Console/EntityManagerProvider/UnknownManagerException.php b/src/Tools/Console/EntityManagerProvider/UnknownManagerException.php
index 583d90908a9..46e842ce976 100644
--- a/src/Tools/Console/EntityManagerProvider/UnknownManagerException.php
+++ b/src/Tools/Console/EntityManagerProvider/UnknownManagerException.php
@@ -11,7 +11,7 @@
 
 final class UnknownManagerException extends OutOfBoundsException
 {
-    /** @psalm-param list<string> $knownManagers */
+    /** @phpstan-param list<string> $knownManagers */
     public static function unknownManager(string $unknownManager, array $knownManagers = []): self
     {
         return new self(sprintf(
diff --git a/src/Tools/Pagination/CountOutputWalker.php b/src/Tools/Pagination/CountOutputWalker.php
index 35f7d051ecf..b42123907f4 100644
--- a/src/Tools/Pagination/CountOutputWalker.php
+++ b/src/Tools/Pagination/CountOutputWalker.php
@@ -35,7 +35,7 @@
  * are able to cache subqueries. By keeping the ORDER BY clause intact, the limitSubQuery
  * that will most likely be executed next can be read from the native SQL cache.
  *
- * @psalm-import-type QueryComponent from Parser
+ * @phpstan-import-type QueryComponent from Parser
  */
 class CountOutputWalker extends SqlOutputWalker
 {
diff --git a/src/Tools/Pagination/LimitSubqueryOutputWalker.php b/src/Tools/Pagination/LimitSubqueryOutputWalker.php
index 5cb65e7a993..b57b2e29408 100644
--- a/src/Tools/Pagination/LimitSubqueryOutputWalker.php
+++ b/src/Tools/Pagination/LimitSubqueryOutputWalker.php
@@ -52,7 +52,7 @@
  * Works with composite keys but cannot deal with queries that have multiple
  * root entities (e.g. `SELECT f, b from Foo, Bar`)
  *
- * @psalm-import-type QueryComponent from Parser
+ * @phpstan-import-type QueryComponent from Parser
  */
 class LimitSubqueryOutputWalker extends SqlOutputWalker
 {
@@ -406,7 +406,7 @@ private function recreateInnerSql(
 
     /**
      * @return string[][]
-     * @psalm-return array{0: list<non-empty-string>, 1: list<string>}
+     * @phpstan-return array{0: list<non-empty-string>, 1: list<string>}
      */
     private function generateSqlAliasReplacements(): array
     {
diff --git a/src/Tools/Pagination/Paginator.php b/src/Tools/Pagination/Paginator.php
index 1bbb72972d4..d74ab6c63f8 100644
--- a/src/Tools/Pagination/Paginator.php
+++ b/src/Tools/Pagination/Paginator.php
@@ -105,7 +105,7 @@ public function count(): int
     /**
      * {@inheritDoc}
      *
-     * @psalm-return Traversable<array-key, T>
+     * @phpstan-return Traversable<array-key, T>
      */
     public function getIterator(): Traversable
     {
diff --git a/src/Tools/ResolveTargetEntityListener.php b/src/Tools/ResolveTargetEntityListener.php
index 9e485214ea5..9760abf00cf 100644
--- a/src/Tools/ResolveTargetEntityListener.php
+++ b/src/Tools/ResolveTargetEntityListener.php
@@ -40,7 +40,7 @@ public function getSubscribedEvents(): array
     /**
      * Adds a target-entity class name to resolve to a new class name.
      *
-     * @psalm-param array<string, mixed> $mapping
+     * @phpstan-param array<string, mixed> $mapping
      */
     public function addResolveTargetEntity(string $originalEntity, string $newEntity, array $mapping): void
     {
diff --git a/src/Tools/SchemaTool.php b/src/Tools/SchemaTool.php
index e0a24d9459d..5057d1866a8 100644
--- a/src/Tools/SchemaTool.php
+++ b/src/Tools/SchemaTool.php
@@ -67,7 +67,7 @@ public function __construct(private readonly EntityManagerInterface $em)
     /**
      * Creates the database schema for the given array of ClassMetadata instances.
      *
-     * @psalm-param list<ClassMetadata> $classes
+     * @phpstan-param list<ClassMetadata> $classes
      *
      * @throws ToolsException
      */
@@ -89,7 +89,7 @@ public function createSchema(array $classes): void
      * Gets the list of DDL statements that are required to create the database schema for
      * the given list of ClassMetadata instances.
      *
-     * @psalm-param list<ClassMetadata> $classes
+     * @phpstan-param list<ClassMetadata> $classes
      *
      * @return list<string> The SQL statements needed to create the schema for the classes.
      */
@@ -103,7 +103,7 @@ public function getCreateSchemaSql(array $classes): array
     /**
      * Detects instances of ClassMetadata that don't need to be processed in the SchemaTool context.
      *
-     * @psalm-param array<string, bool> $processedClasses
+     * @phpstan-param array<string, bool> $processedClasses
      */
     private function processingNotRequired(
         ClassMetadata $class,
@@ -164,7 +164,7 @@ private function getIndexColumns(ClassMetadata $class, array $indexData): array
     /**
      * Creates a Schema instance from a given set of metadata classes.
      *
-     * @psalm-param list<ClassMetadata> $classes
+     * @phpstan-param list<ClassMetadata> $classes
      *
      * @throws NotSupported
      */
@@ -434,7 +434,7 @@ private function gatherColumns(ClassMetadata $class, Table $table): void
      * Creates a column definition as required by the DBAL from an ORM field mapping definition.
      *
      * @param ClassMetadata $class The class that owns the field mapping.
-     * @psalm-param FieldMapping $mapping The field mapping.
+     * @phpstan-param FieldMapping $mapping The field mapping.
      */
     private function gatherColumn(
         ClassMetadata $class,
@@ -502,11 +502,11 @@ private function gatherColumn(
      * Gathers the SQL for properly setting up the relations of the given class.
      * This includes the SQL for foreign key constraints and join tables.
      *
-     * @psalm-param array<string, array{
+     * @phpstan-param array<string, array{
      *                  foreignTableName: string,
      *                  foreignColumns: list<string>
      *              }>                               $addedFks
-     * @psalm-param array<string, bool>              $blacklistedFks
+     * @phpstan-param array<string, bool>              $blacklistedFks
      *
      * @throws NotSupported
      */
@@ -586,7 +586,7 @@ private function gatherRelationsSql(
      *
      * TODO: Is there any way to make this code more pleasing?
      *
-     * @psalm-return array{ClassMetadata, string}|null
+     * @phpstan-return array{ClassMetadata, string}|null
      */
     private function getDefiningClass(ClassMetadata $class, string $referencedColumnName): array|null
     {
@@ -617,13 +617,13 @@ private function getDefiningClass(ClassMetadata $class, string $referencedColumn
     /**
      * Gathers columns and fk constraints that are required for one part of relationship.
      *
-     * @psalm-param list<JoinColumnMapping>          $joinColumns
-     * @psalm-param list<string>                     $primaryKeyColumns
-     * @psalm-param array<string, array{
+     * @phpstan-param list<JoinColumnMapping>          $joinColumns
+     * @phpstan-param list<string>                     $primaryKeyColumns
+     * @phpstan-param array<string, array{
      *                  foreignTableName: string,
      *                  foreignColumns: list<string>
      *              }>                               $addedFks
-     * @psalm-param array<string,bool>               $blacklistedFks
+     * @phpstan-param array<string,bool>               $blacklistedFks
      *
      * @throws MissingColumnException
      */
@@ -775,7 +775,7 @@ private function gatherColumnOptions(JoinColumnMapping|FieldMapping|Discriminato
      * In any way when an exception is thrown it is suppressed since drop was
      * issued for all classes of the schema and some probably just don't exist.
      *
-     * @psalm-param list<ClassMetadata> $classes
+     * @phpstan-param list<ClassMetadata> $classes
      */
     public function dropSchema(array $classes): void
     {
@@ -819,7 +819,7 @@ public function getDropDatabaseSQL(): array
     /**
      * Gets SQL to drop the tables defined by the passed classes.
      *
-     * @psalm-param list<ClassMetadata> $classes
+     * @phpstan-param list<ClassMetadata> $classes
      *
      * @return list<string>
      */
diff --git a/src/Tools/SchemaValidator.php b/src/Tools/SchemaValidator.php
index fdfc00390c8..f602f69b4d4 100644
--- a/src/Tools/SchemaValidator.php
+++ b/src/Tools/SchemaValidator.php
@@ -82,7 +82,7 @@ public function __construct(
      * 2. Check if "mappedBy" and "inversedBy" are consistent to each other.
      * 3. Check if "referencedColumnName" attributes are really pointing to primary key columns.
      *
-     * @psalm-return array<string, list<string>>
+     * @phpstan-return array<string, list<string>>
      */
     public function validateMapping(): array
     {
@@ -104,7 +104,7 @@ public function validateMapping(): array
      * Validates a single class of the current.
      *
      * @return string[]
-     * @psalm-return list<string>
+     * @phpstan-return list<string>
      */
     public function validateClass(ClassMetadata $class): array
     {
diff --git a/src/UnitOfWork.php b/src/UnitOfWork.php
index 81a4c05c9f0..87b434994c6 100644
--- a/src/UnitOfWork.php
+++ b/src/UnitOfWork.php
@@ -126,7 +126,7 @@ class UnitOfWork implements PropertyChangedListener
      * Map of all identifiers of managed entities.
      * Keys are object ids (spl_object_id).
      *
-     * @psalm-var array<int, array<string, mixed>>
+     * @phpstan-var array<int, array<string, mixed>>
      */
     private array $entityIdentifiers = [];
 
@@ -139,7 +139,7 @@ class UnitOfWork implements PropertyChangedListener
      *                A value will only really be copied if the value in the entity is modified
      *                by the user.
      *
-     * @psalm-var array<int, array<string, mixed>>
+     * @phpstan-var array<int, array<string, mixed>>
      */
     private array $originalEntityData = [];
 
@@ -147,7 +147,7 @@ class UnitOfWork implements PropertyChangedListener
      * Map of entity changes. Keys are object ids (spl_object_id).
      * Filled at the beginning of a commit of the UnitOfWork and cleaned at the end.
      *
-     * @psalm-var array<int, array<string, array{mixed, mixed}>>
+     * @phpstan-var array<int, array<string, array{mixed, mixed}>>
      */
     private array $entityChangeSets = [];
 
@@ -155,7 +155,7 @@ class UnitOfWork implements PropertyChangedListener
      * The (cached) states of any known entities.
      * Keys are object ids (spl_object_id).
      *
-     * @psalm-var array<int, self::STATE_*>
+     * @phpstan-var array<int, self::STATE_*>
      */
     private array $entityStates = [];
 
@@ -171,28 +171,28 @@ class UnitOfWork implements PropertyChangedListener
     /**
      * A list of all pending entity insertions.
      *
-     * @psalm-var array<int, object>
+     * @phpstan-var array<int, object>
      */
     private array $entityInsertions = [];
 
     /**
      * A list of all pending entity updates.
      *
-     * @psalm-var array<int, object>
+     * @phpstan-var array<int, object>
      */
     private array $entityUpdates = [];
 
     /**
      * Any pending extra updates that have been scheduled by persisters.
      *
-     * @psalm-var array<int, array{object, array<string, array{mixed, mixed}>}>
+     * @phpstan-var array<int, array{object, array<string, array{mixed, mixed}>}>
      */
     private array $extraUpdates = [];
 
     /**
      * A list of all pending entity deletions.
      *
-     * @psalm-var array<int, object>
+     * @phpstan-var array<int, object>
      */
     private array $entityDeletions = [];
 
@@ -212,14 +212,14 @@ class UnitOfWork implements PropertyChangedListener
     /**
      * All pending collection deletions.
      *
-     * @psalm-var array<int, PersistentCollection<array-key, object>>
+     * @phpstan-var array<int, PersistentCollection<array-key, object>>
      */
     private array $collectionDeletions = [];
 
     /**
      * All pending collection updates.
      *
-     * @psalm-var array<int, PersistentCollection<array-key, object>>
+     * @phpstan-var array<int, PersistentCollection<array-key, object>>
      */
     private array $collectionUpdates = [];
 
@@ -228,7 +228,7 @@ class UnitOfWork implements PropertyChangedListener
      * At the end of the UnitOfWork all these collections will make new snapshots
      * of their data.
      *
-     * @psalm-var array<int, PersistentCollection<array-key, object>>
+     * @phpstan-var array<int, PersistentCollection<array-key, object>>
      */
     private array $visitedCollections = [];
 
@@ -239,21 +239,21 @@ class UnitOfWork implements PropertyChangedListener
      * Indexed by Collection object ID, which also serves as the key in self::$visitedCollections;
      * values are the key names that need to be removed.
      *
-     * @psalm-var array<int, array<array-key, true>>
+     * @phpstan-var array<int, array<array-key, true>>
      */
     private array $pendingCollectionElementRemovals = [];
 
     /**
      * The entity persister instances used to persist entity instances.
      *
-     * @psalm-var array<string, EntityPersister>
+     * @phpstan-var array<string, EntityPersister>
      */
     private array $persisters = [];
 
     /**
      * The collection persister instances used to persist collections.
      *
-     * @psalm-var array<array-key, CollectionPersister>
+     * @phpstan-var array<array-key, CollectionPersister>
      */
     private array $collectionPersisters = [];
 
@@ -275,7 +275,7 @@ class UnitOfWork implements PropertyChangedListener
     /**
      * Orphaned entities that are scheduled for removal.
      *
-     * @psalm-var array<int, object>
+     * @phpstan-var array<int, object>
      */
     private array $orphanRemovals = [];
 
@@ -517,7 +517,7 @@ private function executeExtraUpdates(): void
      * Gets the changeset for an entity.
      *
      * @return mixed[][]
-     * @psalm-return array<string, array{mixed, mixed}|PersistentCollection>
+     * @phpstan-return array<string, array{mixed, mixed}|PersistentCollection>
      */
     public function & getEntityChangeSet(object $entity): array
     {
@@ -558,8 +558,8 @@ public function & getEntityChangeSet(object $entity): array
      *
      * @param ClassMetadata $class  The class descriptor of the entity.
      * @param object        $entity The entity for which to compute the changes.
-     * @psalm-param ClassMetadata<T> $class
-     * @psalm-param T $entity
+     * @phpstan-param ClassMetadata<T> $class
+     * @phpstan-param T $entity
      *
      * @template T of object
      *
@@ -898,8 +898,8 @@ private function computeAssociationChanges(AssociationMapping $assoc, mixed $val
     }
 
     /**
-     * @psalm-param ClassMetadata<T> $class
-     * @psalm-param T $entity
+     * @phpstan-param ClassMetadata<T> $class
+     * @phpstan-param T $entity
      *
      * @template T of object
      */
@@ -958,8 +958,8 @@ private function hasMissingIdsWhichAreForeignKeys(ClassMetadata $class, array $i
      *
      * @param ClassMetadata $class  The class descriptor of the entity.
      * @param object        $entity The entity for which to (re)calculate the change set.
-     * @psalm-param ClassMetadata<T> $class
-     * @psalm-param T $entity
+     * @phpstan-param ClassMetadata<T> $class
+     * @phpstan-param T $entity
      *
      * @throws ORMInvalidArgumentException If the passed entity is not MANAGED.
      *
@@ -1077,8 +1077,8 @@ private function executeInserts(): void
     }
 
     /**
-     * @psalm-param ClassMetadata<T> $class
-     * @psalm-param T $entity
+     * @phpstan-param ClassMetadata<T> $class
+     * @phpstan-param T $entity
      *
      * @template T of object
      */
@@ -1429,7 +1429,7 @@ public function scheduleForUpdate(object $entity): void
      *
      * Extra updates for entities are stored as (entity, changeset) tuples.
      *
-     * @psalm-param array<string, array{mixed, mixed}>  $changeset The changeset of the entity (what to update).
+     * @phpstan-param array<string, array{mixed, mixed}>  $changeset The changeset of the entity (what to update).
      *
      * @ignore
      */
@@ -1599,9 +1599,9 @@ public function getIdHashByEntity(object $entity): string
      *                         This parameter can be set to improve performance of entity state detection
      *                         by potentially avoiding a database lookup if the distinction between NEW and DETACHED
      *                         is either known or does not matter for the caller of the method.
-     * @psalm-param self::STATE_*|null $assume
+     * @phpstan-param self::STATE_*|null $assume
      *
-     * @psalm-return self::STATE_*
+     * @phpstan-return self::STATE_*
      */
     public function getEntityState(object $entity, int|null $assume = null): int
     {
@@ -1769,7 +1769,7 @@ public function persist(object $entity): void
      * This method is internally called during persist() cascades as it tracks
      * the already visited entities to prevent infinite recursions.
      *
-     * @psalm-param array<int, object> $visited The already visited entities.
+     * @phpstan-param array<int, object> $visited The already visited entities.
      *
      * @throws ORMInvalidArgumentException
      * @throws UnexpectedValueException
@@ -1849,7 +1849,7 @@ public function remove(object $entity): void
      * This method is internally called during delete() cascades as it tracks
      * the already visited entities to prevent infinite recursions.
      *
-     * @psalm-param array<int, object> $visited The map of the already visited entities.
+     * @phpstan-param array<int, object> $visited The map of the already visited entities.
      *
      * @throws ORMInvalidArgumentException If the instance is a detached entity.
      * @throws UnexpectedValueException
@@ -1958,7 +1958,7 @@ private function doDetach(
      * Refreshes the state of the given entity from the database, overwriting
      * any local, unpersisted changes.
      *
-     * @psalm-param LockMode::*|null $lockMode
+     * @phpstan-param LockMode::*|null $lockMode
      *
      * @throws InvalidArgumentException If the entity is not MANAGED.
      * @throws TransactionRequiredException
@@ -1973,8 +1973,8 @@ public function refresh(object $entity, LockMode|int|null $lockMode = null): voi
     /**
      * Executes a refresh operation on an entity.
      *
-     * @psalm-param array<int, object>  $visited The already visited entities during cascades.
-     * @psalm-param LockMode::*|null $lockMode
+     * @phpstan-param array<int, object>  $visited The already visited entities during cascades.
+     * @phpstan-param LockMode::*|null $lockMode
      *
      * @throws ORMInvalidArgumentException If the entity is not MANAGED.
      * @throws TransactionRequiredException
@@ -2015,8 +2015,8 @@ private function doRefresh(object $entity, array &$visited, LockMode|int|null $l
     /**
      * Cascades a refresh operation to associated entities.
      *
-     * @psalm-param array<int, object> $visited
-     * @psalm-param LockMode::*|null $lockMode
+     * @phpstan-param array<int, object> $visited
+     * @phpstan-param LockMode::*|null $lockMode
      */
     private function cascadeRefresh(object $entity, array &$visited, LockMode|int|null $lockMode = null): void
     {
@@ -2098,7 +2098,7 @@ private function cascadeDetach(object $entity, array &$visited): void
     /**
      * Cascades the save operation to associated entities.
      *
-     * @psalm-param array<int, object> $visited
+     * @phpstan-param array<int, object> $visited
      */
     private function cascadePersist(object $entity, array &$visited): void
     {
@@ -2160,7 +2160,7 @@ private function cascadePersist(object $entity, array &$visited): void
     /**
      * Cascades the delete operation to associated entities.
      *
-     * @psalm-param array<int, object> $visited
+     * @phpstan-param array<int, object> $visited
      */
     private function cascadeRemove(object $entity, array &$visited): void
     {
@@ -2207,7 +2207,7 @@ private function cascadeRemove(object $entity, array &$visited): void
     /**
      * Acquire a lock on the given entity.
      *
-     * @psalm-param LockMode::* $lockMode
+     * @phpstan-param LockMode::* $lockMode
      *
      * @throws ORMInvalidArgumentException
      * @throws TransactionRequiredException
@@ -2755,7 +2755,7 @@ public function getIdentityMap(): array
      * Gets the original data of an entity. The original data is the data that was
      * present at the time the entity was reconstituted from the database.
      *
-     * @psalm-return array<string, mixed>
+     * @phpstan-return array<string, mixed>
      */
     public function getOriginalEntityData(object $entity): array
     {
@@ -2973,7 +2973,7 @@ public function propertyChanged(object $sender, string $propertyName, mixed $old
     /**
      * Gets the currently scheduled entity insertions in this UnitOfWork.
      *
-     * @psalm-return array<int, object>
+     * @phpstan-return array<int, object>
      */
     public function getScheduledEntityInsertions(): array
     {
@@ -2983,7 +2983,7 @@ public function getScheduledEntityInsertions(): array
     /**
      * Gets the currently scheduled entity updates in this UnitOfWork.
      *
-     * @psalm-return array<int, object>
+     * @phpstan-return array<int, object>
      */
     public function getScheduledEntityUpdates(): array
     {
@@ -2993,7 +2993,7 @@ public function getScheduledEntityUpdates(): array
     /**
      * Gets the currently scheduled entity deletions in this UnitOfWork.
      *
-     * @psalm-return array<int, object>
+     * @phpstan-return array<int, object>
      */
     public function getScheduledEntityDeletions(): array
     {
@@ -3003,7 +3003,7 @@ public function getScheduledEntityDeletions(): array
     /**
      * Gets the currently scheduled complete collection deletions
      *
-     * @psalm-return array<int, PersistentCollection<array-key, object>>
+     * @phpstan-return array<int, PersistentCollection<array-key, object>>
      */
     public function getScheduledCollectionDeletions(): array
     {
@@ -3013,7 +3013,7 @@ public function getScheduledCollectionDeletions(): array
     /**
      * Gets the currently scheduled collection inserts, updates and deletes.
      *
-     * @psalm-return array<int, PersistentCollection<array-key, object>>
+     * @phpstan-return array<int, PersistentCollection<array-key, object>>
      */
     public function getScheduledCollectionUpdates(): array
     {
@@ -3039,7 +3039,7 @@ public function initializeObject(object $obj): void
     /**
      * Tests if a value is an uninitialized entity.
      *
-     * @psalm-assert-if-true InternalProxy $obj
+     * @phpstan-assert-if-true InternalProxy $obj
      */
     public function isUninitializedObject(mixed $obj): bool
     {
diff --git a/src/Utility/HierarchyDiscriminatorResolver.php b/src/Utility/HierarchyDiscriminatorResolver.php
index b682125d02e..0949f7b12b8 100644
--- a/src/Utility/HierarchyDiscriminatorResolver.php
+++ b/src/Utility/HierarchyDiscriminatorResolver.php
@@ -19,7 +19,7 @@ private function __construct()
      * it extracts all the discriminators from the child classes and returns them
      *
      * @return null[]
-     * @psalm-return array<array-key, null>
+     * @phpstan-return array<array-key, null>
      */
     public static function resolveDiscriminatorsForClass(
         ClassMetadata $rootClassMetadata,
diff --git a/src/Utility/IdentifierFlattener.php b/src/Utility/IdentifierFlattener.php
index 3792d334bba..2f16e56e4ac 100644
--- a/src/Utility/IdentifierFlattener.php
+++ b/src/Utility/IdentifierFlattener.php
@@ -40,7 +40,7 @@ public function __construct(
      * @param mixed[] $id
      *
      * @return mixed[]
-     * @psalm-return array<string, mixed>
+     * @phpstan-return array<string, mixed>
      */
     public function flattenIdentifier(ClassMetadata $class, array $id): array
     {
diff --git a/tests/StaticAnalysis/Tools/Pagination/paginator-covariant.php b/tests/StaticAnalysis/Tools/Pagination/paginator-covariant.php
index ec0b88fd20f..0211a605033 100644
--- a/tests/StaticAnalysis/Tools/Pagination/paginator-covariant.php
+++ b/tests/StaticAnalysis/Tools/Pagination/paginator-covariant.php
@@ -24,7 +24,7 @@ public function getClass(): string
         return $this->class;
     }
 
-    /** @psalm-return Paginator<T> */
+    /** @phpstan-return Paginator<T> */
     abstract public function createPaginator(): Paginator;
 }
 
diff --git a/tests/Tests/Mocks/ConcurrentRegionMock.php b/tests/Tests/Mocks/ConcurrentRegionMock.php
index a1e9ac43659..2d5ff97b140 100644
--- a/tests/Tests/Mocks/ConcurrentRegionMock.php
+++ b/tests/Tests/Mocks/ConcurrentRegionMock.php
@@ -22,13 +22,13 @@
  */
 class ConcurrentRegionMock implements ConcurrentRegion
 {
-    /** @psalm-var array<string, list<array<string, mixed>>> */
+    /** @phpstan-var array<string, list<array<string, mixed>>> */
     public array $calls = [];
 
-    /** @psalm-var array<string, list<Exception>> */
+    /** @phpstan-var array<string, list<Exception>> */
     public array $exceptions = [];
 
-    /** @psalm-var array<string, Lock> */
+    /** @phpstan-var array<string, Lock> */
     public array $locks = [];
 
     public function __construct(
diff --git a/tests/Tests/Mocks/EntityPersisterMock.php b/tests/Tests/Mocks/EntityPersisterMock.php
index fbc8d072d13..e7e5ce85433 100644
--- a/tests/Tests/Mocks/EntityPersisterMock.php
+++ b/tests/Tests/Mocks/EntityPersisterMock.php
@@ -19,7 +19,7 @@ class EntityPersisterMock extends BasicEntityPersister
     private int $identityColumnValueCounter = 0;
     private int|null $mockIdGeneratorType   = null;
 
-    /** @psalm-var list<array{generatedId: int, entity: object}> */
+    /** @phpstan-var list<array{generatedId: int, entity: object}> */
     private array $postInsertIds = [];
 
     private bool $existsCalled = false;
diff --git a/tests/Tests/Models/CMS/CmsAddressListener.php b/tests/Tests/Models/CMS/CmsAddressListener.php
index ce50a28cd03..e06019e541f 100644
--- a/tests/Tests/Models/CMS/CmsAddressListener.php
+++ b/tests/Tests/Models/CMS/CmsAddressListener.php
@@ -10,7 +10,7 @@
 
 class CmsAddressListener
 {
-    /** @psalm-var array<string, list<list<mixed>>> */
+    /** @phpstan-var array<string, list<list<mixed>>> */
     public $calls;
 
     public function prePersist(): void
diff --git a/tests/Tests/Models/CMS/CmsGroup.php b/tests/Tests/Models/CMS/CmsGroup.php
index d419b46ba41..d3b9329b51c 100644
--- a/tests/Tests/Models/CMS/CmsGroup.php
+++ b/tests/Tests/Models/CMS/CmsGroup.php
@@ -31,7 +31,7 @@ class CmsGroup implements IteratorAggregate
     #[Column(length: 50)]
     public $name;
 
-    /** @psalm-var Collection<int, CmsUser> */
+    /** @phpstan-var Collection<int, CmsUser> */
     #[ManyToMany(targetEntity: 'CmsUser', mappedBy: 'groups')]
     public $users;
 
@@ -55,7 +55,7 @@ public function addUser(CmsUser $user): void
         $this->users[] = $user;
     }
 
-    /** @psalm-return Collection<int, CmsUser> */
+    /** @phpstan-return Collection<int, CmsUser> */
     public function getUsers(): Collection
     {
         return $this->users;
diff --git a/tests/Tests/Models/CMS/CmsTag.php b/tests/Tests/Models/CMS/CmsTag.php
index aef3dc132c8..b59f67cead5 100644
--- a/tests/Tests/Models/CMS/CmsTag.php
+++ b/tests/Tests/Models/CMS/CmsTag.php
@@ -29,7 +29,7 @@ class CmsTag
     #[Column(length: 50, name: 'tag_name', nullable: true)]
     public $name;
 
-    /** @psalm-var Collection<int, CmsUser> */
+    /** @phpstan-var Collection<int, CmsUser> */
     #[ManyToMany(targetEntity: 'CmsUser', mappedBy: 'tags')]
     public $users;
 
@@ -48,7 +48,7 @@ public function addUser(CmsUser $user): void
         $this->users[] = $user;
     }
 
-    /** @psalm-return Collection<int, CmsUser> */
+    /** @phpstan-return Collection<int, CmsUser> */
     public function getUsers(): Collection
     {
         return $this->users;
diff --git a/tests/Tests/Models/CMS/CmsUser.php b/tests/Tests/Models/CMS/CmsUser.php
index c0fa4bb76b5..d94fa20adc3 100644
--- a/tests/Tests/Models/CMS/CmsUser.php
+++ b/tests/Tests/Models/CMS/CmsUser.php
@@ -37,15 +37,15 @@ class CmsUser
     #[Column(type: 'string', length: 255, unique: true)]
     public $username;
 
-    /** @psalm-var string|null */
+    /** @phpstan-var string|null */
     #[Column(type: 'string', length: 255)]
     public $name;
 
-    /** @psalm-var Collection<int, CmsPhonenumber> */
+    /** @phpstan-var Collection<int, CmsPhonenumber> */
     #[OneToMany(targetEntity: 'CmsPhonenumber', mappedBy: 'user', cascade: ['persist'], orphanRemoval: true)]
     public $phonenumbers;
 
-    /** @psalm-var Collection<int, CmsArticle> */
+    /** @phpstan-var Collection<int, CmsArticle> */
     #[OneToMany(targetEntity: 'CmsArticle', mappedBy: 'user', cascade: ['detach'])]
     public $articles;
 
@@ -58,7 +58,7 @@ class CmsUser
     #[JoinColumn(referencedColumnName: 'id', nullable: true)]
     public $email;
 
-    /** @psalm-var Collection<int, CmsGroup> */
+    /** @phpstan-var Collection<int, CmsGroup> */
     #[JoinTable(name: 'cms_users_groups')]
     #[JoinColumn(name: 'user_id', referencedColumnName: 'id')]
     #[InverseJoinColumn(name: 'group_id', referencedColumnName: 'id')]
@@ -115,7 +115,7 @@ public function addPhonenumber(CmsPhonenumber $phone): void
         $phone->setUser($this);
     }
 
-    /** @psalm-return Collection<int, CmsPhonenumber> */
+    /** @phpstan-return Collection<int, CmsPhonenumber> */
     public function getPhonenumbers(): Collection
     {
         return $this->phonenumbers;
@@ -133,7 +133,7 @@ public function addGroup(CmsGroup $group): void
         $group->addUser($this);
     }
 
-    /** @psalm-return Collection<int, CmsGroup> */
+    /** @phpstan-return Collection<int, CmsGroup> */
     public function getGroups(): Collection
     {
         return $this->groups;
diff --git a/tests/Tests/Models/Cache/Action.php b/tests/Tests/Models/Cache/Action.php
index 95495b8df7c..88d8dfd3495 100644
--- a/tests/Tests/Models/Cache/Action.php
+++ b/tests/Tests/Models/Cache/Action.php
@@ -17,7 +17,7 @@
 #[Entity]
 class Action
 {
-    /** @psalm-var Collection<int, Token> */
+    /** @phpstan-var Collection<int, Token> */
     #[OneToMany(targetEntity: 'Token', cascade: ['persist', 'remove'], mappedBy: 'action')]
     public $tokens;
 
diff --git a/tests/Tests/Models/Cache/Attraction.php b/tests/Tests/Models/Cache/Attraction.php
index 385dc65adcb..04d9358ce39 100644
--- a/tests/Tests/Models/Cache/Attraction.php
+++ b/tests/Tests/Models/Cache/Attraction.php
@@ -31,7 +31,7 @@ abstract class Attraction
     #[Column(type: 'integer')]
     protected $id;
 
-    /** @psalm-var Collection<int, AttractionInfo> */
+    /** @phpstan-var Collection<int, AttractionInfo> */
     #[Cache]
     #[OneToMany(targetEntity: 'AttractionInfo', mappedBy: 'attraction')]
     protected $infos;
@@ -77,7 +77,7 @@ public function setCity(City $city): void
         $this->city = $city;
     }
 
-    /** @psalm-return Collection<int, AttractionInfo> */
+    /** @phpstan-return Collection<int, AttractionInfo> */
     public function getInfos(): Collection
     {
         return $this->infos;
diff --git a/tests/Tests/Models/Cache/City.php b/tests/Tests/Models/Cache/City.php
index edeec5e77a4..834ba0abf07 100644
--- a/tests/Tests/Models/Cache/City.php
+++ b/tests/Tests/Models/Cache/City.php
@@ -24,7 +24,7 @@ class City
     #[ORM\ManyToMany(targetEntity: 'Travel', mappedBy: 'visitedCities')]
     public $travels;
 
-    /** @psalm-var Collection<int, Attraction> */
+    /** @phpstan-var Collection<int, Attraction> */
     #[ORM\Cache]
     #[ORM\OrderBy(['name' => 'ASC'])]
     #[ORM\OneToMany(targetEntity: 'Attraction', mappedBy: 'city')]
@@ -77,7 +77,7 @@ public function addTravel(Travel $travel): void
         $this->travels[] = $travel;
     }
 
-    /** @psalm-return Collection<int, Travel> */
+    /** @phpstan-return Collection<int, Travel> */
     public function getTravels(): Collection
     {
         return $this->travels;
@@ -88,7 +88,7 @@ public function addAttraction(Attraction $attraction): void
         $this->attractions[] = $attraction;
     }
 
-    /** @psalm-return Collection<int, Attraction> */
+    /** @phpstan-return Collection<int, Attraction> */
     public function getAttractions(): Collection
     {
         return $this->attractions;
diff --git a/tests/Tests/Models/Cache/ComplexAction.php b/tests/Tests/Models/Cache/ComplexAction.php
index 58eb8513db6..7e0da48add3 100644
--- a/tests/Tests/Models/Cache/ComplexAction.php
+++ b/tests/Tests/Models/Cache/ComplexAction.php
@@ -18,7 +18,7 @@
 #[Entity]
 class ComplexAction
 {
-    /** @psalm-var Collection<int, Token> */
+    /** @phpstan-var Collection<int, Token> */
     #[OneToMany(targetEntity: 'Token', cascade: ['persist', 'remove'], mappedBy: 'complexAction')]
     public $tokens;
 
diff --git a/tests/Tests/Models/Cache/State.php b/tests/Tests/Models/Cache/State.php
index d72fbacadfb..fafbf3656fd 100644
--- a/tests/Tests/Models/Cache/State.php
+++ b/tests/Tests/Models/Cache/State.php
@@ -27,7 +27,7 @@ class State
     #[Column(type: 'integer')]
     protected $id;
 
-    /** @psalm-var Collection<int, City> */
+    /** @phpstan-var Collection<int, City> */
     #[Cache('NONSTRICT_READ_WRITE')]
     #[OneToMany(targetEntity: 'City', mappedBy: 'state')]
     protected $cities;
@@ -73,13 +73,13 @@ public function setCountry(Country $country): void
         $this->country = $country;
     }
 
-    /** @psalm-return Collection<int, City> */
+    /** @phpstan-return Collection<int, City> */
     public function getCities(): Collection
     {
         return $this->cities;
     }
 
-    /** @psalm-param Collection<int, City> $cities */
+    /** @phpstan-param Collection<int, City> $cities */
     public function setCities(Collection $cities): void
     {
         $this->cities = $cities;
diff --git a/tests/Tests/Models/Cache/Token.php b/tests/Tests/Models/Cache/Token.php
index 44de9a286f2..b38f68ed58d 100644
--- a/tests/Tests/Models/Cache/Token.php
+++ b/tests/Tests/Models/Cache/Token.php
@@ -29,7 +29,7 @@ class Token
     #[Column(type: 'date')]
     public $expiresAt;
 
-    /** @psalm-var Collection<int, Login> */
+    /** @phpstan-var Collection<int, Login> */
     #[OneToMany(targetEntity: 'Login', cascade: ['persist', 'remove'], mappedBy: 'token')]
     public $logins;
 
diff --git a/tests/Tests/Models/Cache/Travel.php b/tests/Tests/Models/Cache/Travel.php
index 784c8ba0b8f..167d75817aa 100644
--- a/tests/Tests/Models/Cache/Travel.php
+++ b/tests/Tests/Models/Cache/Travel.php
@@ -34,7 +34,7 @@ class Travel
     #[Column(type: 'date')]
     protected $createdAt;
 
-    /** @psalm-var Collection<int, City> */
+    /** @phpstan-var Collection<int, City> */
     #[JoinTable(name: 'cache_visited_cities')]
     #[JoinColumn(name: 'travel_id', referencedColumnName: 'id')]
     #[InverseJoinColumn(name: 'city_id', referencedColumnName: 'id')]
@@ -67,7 +67,7 @@ public function setTraveler(Traveler $traveler): void
         $this->traveler = $traveler;
     }
 
-    /** @psalm-return Collection<int, City> */
+    /** @phpstan-return Collection<int, City> */
     public function getVisitedCities(): Collection
     {
         return $this->visitedCities;
diff --git a/tests/Tests/Models/Cache/Traveler.php b/tests/Tests/Models/Cache/Traveler.php
index a1f5363785c..2e56f0fab84 100644
--- a/tests/Tests/Models/Cache/Traveler.php
+++ b/tests/Tests/Models/Cache/Traveler.php
@@ -26,7 +26,7 @@ class Traveler
     #[Column(type: 'integer')]
     protected $id;
 
-    /** @psalm-var Collection<int, Travel> */
+    /** @phpstan-var Collection<int, Travel> */
     #[Cache('NONSTRICT_READ_WRITE')]
     #[OneToMany(targetEntity: 'Travel', mappedBy: 'traveler', cascade: ['persist', 'remove'], orphanRemoval: true)]
     public $travels;
@@ -73,7 +73,7 @@ public function setProfile(TravelerProfile $profile): void
         $this->profile = $profile;
     }
 
-    /** @psalm-return Collection<int, Travel> */
+    /** @phpstan-return Collection<int, Travel> */
     public function getTravels(): Collection
     {
         return $this->travels;
diff --git a/tests/Tests/Models/Company/CompanyContract.php b/tests/Tests/Models/Company/CompanyContract.php
index e52e9e99b5b..9f6cc63b32b 100644
--- a/tests/Tests/Models/Company/CompanyContract.php
+++ b/tests/Tests/Models/Company/CompanyContract.php
@@ -35,7 +35,7 @@ abstract class CompanyContract
     #[Column(type: 'boolean')]
     private bool $completed = false;
 
-    /** @psalm-var Collection<int, CompanyEmployee> */
+    /** @phpstan-var Collection<int, CompanyEmployee> */
     #[JoinTable(name: 'company_contract_employees')]
     #[JoinColumn(name: 'contract_id', referencedColumnName: 'id', onDelete: 'CASCADE')]
     #[InverseJoinColumn(name: 'employee_id', referencedColumnName: 'id')]
@@ -72,7 +72,7 @@ public function setSalesPerson(CompanyEmployee $salesPerson): void
         $this->salesPerson = $salesPerson;
     }
 
-    /** @psalm-return Collection<int, CompanyEmployee> */
+    /** @phpstan-return Collection<int, CompanyEmployee> */
     public function getEngineers(): Collection
     {
         return $this->engineers;
diff --git a/tests/Tests/Models/Company/CompanyContractListener.php b/tests/Tests/Models/Company/CompanyContractListener.php
index f3f433fc9b6..ea6f37919ac 100644
--- a/tests/Tests/Models/Company/CompanyContractListener.php
+++ b/tests/Tests/Models/Company/CompanyContractListener.php
@@ -10,28 +10,28 @@
 
 class CompanyContractListener
 {
-    /** @psalm-var list<list<mixed>> */
+    /** @phpstan-var list<list<mixed>> */
     public $postPersistCalls;
 
-    /** @psalm-var list<list<mixed>> */
+    /** @phpstan-var list<list<mixed>> */
     public $prePersistCalls;
 
-    /** @psalm-var list<list<mixed>> */
+    /** @phpstan-var list<list<mixed>> */
     public $postUpdateCalls;
 
-    /** @psalm-var list<list<mixed>> */
+    /** @phpstan-var list<list<mixed>> */
     public $preUpdateCalls;
 
-    /** @psalm-var list<list<mixed>> */
+    /** @phpstan-var list<list<mixed>> */
     public $postRemoveCalls;
 
-    /** @psalm-var list<list<mixed>> */
+    /** @phpstan-var list<list<mixed>> */
     public $preRemoveCalls;
 
-    /** @psalm-var list<list<mixed>> */
+    /** @phpstan-var list<list<mixed>> */
     public $preFlushCalls;
 
-    /** @psalm-var list<list<mixed>> */
+    /** @phpstan-var list<list<mixed>> */
     public $postLoadCalls;
 
     #[ORM\PostPersist]
diff --git a/tests/Tests/Models/Company/CompanyEmployee.php b/tests/Tests/Models/Company/CompanyEmployee.php
index e48746cab8b..6d17eae9d42 100644
--- a/tests/Tests/Models/Company/CompanyEmployee.php
+++ b/tests/Tests/Models/Company/CompanyEmployee.php
@@ -25,11 +25,11 @@ class CompanyEmployee extends CompanyPerson
     #[Column(type: 'datetime', nullable: true)]
     private DateTime|null $startDate = null;
 
-    /** @psalm-var Collection<int, CompanyContract> */
+    /** @phpstan-var Collection<int, CompanyContract> */
     #[ManyToMany(targetEntity: 'CompanyContract', mappedBy: 'engineers', fetch: 'EXTRA_LAZY')]
     public $contracts;
 
-    /** @psalm-var Collection<int, CompanyFlexUltraContract> */
+    /** @phpstan-var Collection<int, CompanyFlexUltraContract> */
     #[OneToMany(targetEntity: 'CompanyFlexUltraContract', mappedBy: 'salesPerson', fetch: 'EXTRA_LAZY')]
     public $soldContracts;
 
diff --git a/tests/Tests/Models/Company/CompanyFlexContract.php b/tests/Tests/Models/Company/CompanyFlexContract.php
index 88bdc59b5a7..e8c71e1ee18 100644
--- a/tests/Tests/Models/Company/CompanyFlexContract.php
+++ b/tests/Tests/Models/Company/CompanyFlexContract.php
@@ -22,7 +22,7 @@ class CompanyFlexContract extends CompanyContract
     #[Column(type: 'integer')]
     private int $pricePerHour = 0;
 
-    /** @psalm-var Collection<int, CompanyManager> */
+    /** @phpstan-var Collection<int, CompanyManager> */
     #[JoinTable(name: 'company_contract_managers')]
     #[JoinColumn(name: 'contract_id', referencedColumnName: 'id', onDelete: 'CASCADE')]
     #[InverseJoinColumn(name: 'employee_id', referencedColumnName: 'id')]
@@ -54,7 +54,7 @@ public function setPricePerHour(int $pricePerHour): void
         $this->pricePerHour = $pricePerHour;
     }
 
-    /** @psalm-return Collection<int, CompanyManager> */
+    /** @phpstan-return Collection<int, CompanyManager> */
     public function getManagers(): Collection
     {
         return $this->managers;
diff --git a/tests/Tests/Models/Company/CompanyFlexUltraContractListener.php b/tests/Tests/Models/Company/CompanyFlexUltraContractListener.php
index e83b68e2a68..70bc525c523 100644
--- a/tests/Tests/Models/Company/CompanyFlexUltraContractListener.php
+++ b/tests/Tests/Models/Company/CompanyFlexUltraContractListener.php
@@ -11,7 +11,7 @@
 
 class CompanyFlexUltraContractListener
 {
-    /** @psalm-var list<mixed[]> */
+    /** @phpstan-var list<mixed[]> */
     public $prePersistCalls;
 
     #[ORM\PrePersist]
diff --git a/tests/Tests/Models/Company/CompanyManager.php b/tests/Tests/Models/Company/CompanyManager.php
index c0a12351dba..d753bbcdfc9 100644
--- a/tests/Tests/Models/Company/CompanyManager.php
+++ b/tests/Tests/Models/Company/CompanyManager.php
@@ -23,7 +23,7 @@ class CompanyManager extends CompanyEmployee
     #[JoinColumn(name: 'car_id', referencedColumnName: 'id')]
     private CompanyCar|null $car = null;
 
-    /** @psalm-var Collection<int, CompanyFlexContract> */
+    /** @phpstan-var Collection<int, CompanyFlexContract> */
     #[ManyToMany(targetEntity: 'CompanyFlexContract', mappedBy: 'managers', fetch: 'EXTRA_LAZY')]
     public $managedContracts;
 
diff --git a/tests/Tests/Models/Company/CompanyOrganization.php b/tests/Tests/Models/Company/CompanyOrganization.php
index 3e6de6f5037..ecc3e818393 100644
--- a/tests/Tests/Models/Company/CompanyOrganization.php
+++ b/tests/Tests/Models/Company/CompanyOrganization.php
@@ -23,7 +23,7 @@ class CompanyOrganization
     #[GeneratedValue(strategy: 'AUTO')]
     private int $id;
 
-    /** @psalm-var Collection<int, CompanyEvent> */
+    /** @phpstan-var Collection<int, CompanyEvent> */
     #[OneToMany(targetEntity: 'CompanyEvent', mappedBy: 'organization', cascade: ['persist'], fetch: 'EXTRA_LAZY')]
     public $events;
 
@@ -32,7 +32,7 @@ public function getId(): int
         return $this->id;
     }
 
-    /** @psalm-return Collection<int, CompanyEvent> */
+    /** @phpstan-return Collection<int, CompanyEvent> */
     public function getEvents(): Collection
     {
         return $this->events;
diff --git a/tests/Tests/Models/Company/CompanyPerson.php b/tests/Tests/Models/Company/CompanyPerson.php
index ad4082a4ea3..f6cd16327e1 100644
--- a/tests/Tests/Models/Company/CompanyPerson.php
+++ b/tests/Tests/Models/Company/CompanyPerson.php
@@ -43,7 +43,7 @@ class CompanyPerson
     #[JoinColumn(name: 'spouse_id', referencedColumnName: 'id', onDelete: 'CASCADE')]
     private CompanyPerson|null $spouse = null;
 
-    /** @psalm-var Collection<int, CompanyPerson> */
+    /** @phpstan-var Collection<int, CompanyPerson> */
     #[JoinTable(name: 'company_persons_friends')]
     #[JoinColumn(name: 'person_id', referencedColumnName: 'id', onDelete: 'CASCADE')]
     #[InverseJoinColumn(name: 'friend_id', referencedColumnName: 'id', onDelete: 'CASCADE')]
@@ -75,7 +75,7 @@ public function getSpouse(): CompanyPerson|null
         return $this->spouse;
     }
 
-    /** @psalm-return Collection<int, CompanyPerson> */
+    /** @phpstan-return Collection<int, CompanyPerson> */
     public function getFriends(): Collection
     {
         return $this->friends;
diff --git a/tests/Tests/Models/CustomType/CustomIdObjectTypeParent.php b/tests/Tests/Models/CustomType/CustomIdObjectTypeParent.php
index 1df2d4860ad..92e6f029cea 100644
--- a/tests/Tests/Models/CustomType/CustomIdObjectTypeParent.php
+++ b/tests/Tests/Models/CustomType/CustomIdObjectTypeParent.php
@@ -17,7 +17,7 @@
 #[Entity]
 class CustomIdObjectTypeParent
 {
-    /** @psalm-var Collection<int, CustomIdObjectTypeChild> */
+    /** @phpstan-var Collection<int, CustomIdObjectTypeChild> */
     #[OneToMany(targetEntity: 'Doctrine\Tests\Models\CustomType\CustomIdObjectTypeChild', cascade: ['persist', 'remove'], mappedBy: 'parent')]
     public $children;
 
diff --git a/tests/Tests/Models/CustomType/CustomTypeParent.php b/tests/Tests/Models/CustomType/CustomTypeParent.php
index 50107740a2c..3771812ed19 100644
--- a/tests/Tests/Models/CustomType/CustomTypeParent.php
+++ b/tests/Tests/Models/CustomType/CustomTypeParent.php
@@ -35,11 +35,11 @@ class CustomTypeParent
     #[OneToOne(targetEntity: 'Doctrine\Tests\Models\CustomType\CustomTypeChild', cascade: ['persist', 'remove'])]
     public $child;
 
-    /** @psalm-var Collection<int, CustomTypeParent> */
+    /** @phpstan-var Collection<int, CustomTypeParent> */
     #[ManyToMany(targetEntity: 'Doctrine\Tests\Models\CustomType\CustomTypeParent', mappedBy: 'myFriends')]
     private $friendsWithMe;
 
-    /** @psalm-var Collection<int, CustomTypeParent> */
+    /** @phpstan-var Collection<int, CustomTypeParent> */
     #[JoinTable(name: 'customtype_parent_friends')]
     #[JoinColumn(name: 'customtypeparent_id', referencedColumnName: 'id')]
     #[InverseJoinColumn(name: 'friend_customtypeparent_id', referencedColumnName: 'id')]
@@ -58,7 +58,7 @@ public function addMyFriend(CustomTypeParent $friend): void
         $friend->addFriendWithMe($this);
     }
 
-    /** @psalm-return Collection<int, CustomTypeParent> */
+    /** @phpstan-return Collection<int, CustomTypeParent> */
     public function getMyFriends(): Collection
     {
         return $this->myFriends;
@@ -69,7 +69,7 @@ public function addFriendWithMe(CustomTypeParent $friend): void
         $this->getFriendsWithMe()->add($friend);
     }
 
-    /** @psalm-return Collection<int, CustomTypeParent> */
+    /** @phpstan-return Collection<int, CustomTypeParent> */
     public function getFriendsWithMe()
     {
         return $this->friendsWithMe;
diff --git a/tests/Tests/Models/DDC117/DDC117Article.php b/tests/Tests/Models/DDC117/DDC117Article.php
index 6ab22230e3e..b6c2778b0d3 100644
--- a/tests/Tests/Models/DDC117/DDC117Article.php
+++ b/tests/Tests/Models/DDC117/DDC117Article.php
@@ -21,14 +21,14 @@ class DDC117Article
     #[GeneratedValue]
     private int $id;
 
-    /** @psalm-var Collection<int, DDC117Reference> */
+    /** @phpstan-var Collection<int, DDC117Reference> */
     #[OneToMany(targetEntity: 'DDC117Reference', mappedBy: 'source', cascade: ['remove'])]
     private $references;
 
     #[OneToOne(targetEntity: 'DDC117ArticleDetails', mappedBy: 'article', cascade: ['persist', 'remove'])]
     private DDC117ArticleDetails|null $details = null;
 
-    /** @psalm-var Collection<int, DDC117Translation> */
+    /** @phpstan-var Collection<int, DDC117Translation> */
     #[OneToMany(targetEntity: 'DDC117Translation', mappedBy: 'article', cascade: ['persist', 'remove'])]
     private $translations;
 
diff --git a/tests/Tests/Models/DDC117/DDC117Editor.php b/tests/Tests/Models/DDC117/DDC117Editor.php
index adf43398e99..99f8eda98b1 100644
--- a/tests/Tests/Models/DDC117/DDC117Editor.php
+++ b/tests/Tests/Models/DDC117/DDC117Editor.php
@@ -25,7 +25,7 @@ class DDC117Editor
     #[GeneratedValue]
     public $id;
 
-    /** @psalm-var Collection<int, DDC117Translation> */
+    /** @phpstan-var Collection<int, DDC117Translation> */
     #[JoinTable]
     #[JoinColumn(name: 'editor_id', referencedColumnName: 'id')]
     #[InverseJoinColumn(name: 'article_id', referencedColumnName: 'article_id')]
diff --git a/tests/Tests/Models/DDC3579/DDC3579Group.php b/tests/Tests/Models/DDC3579/DDC3579Group.php
index 2a3a27edc5d..174483b0c86 100644
--- a/tests/Tests/Models/DDC3579/DDC3579Group.php
+++ b/tests/Tests/Models/DDC3579/DDC3579Group.php
@@ -20,7 +20,7 @@ class DDC3579Group
     #[Column(type: 'integer')]
     private int $id;
 
-    /** @psalm-var Collection<int, DDC3579Admin> */
+    /** @phpstan-var Collection<int, DDC3579Admin> */
     #[ManyToMany(targetEntity: DDC3579Admin::class, mappedBy: 'groups')]
     private $admins;
 
@@ -46,7 +46,7 @@ public function addAdmin(DDC3579Admin $admin): void
         $this->admins[] = $admin;
     }
 
-    /** @psalm-return Collection<int, DDC3579Admin> */
+    /** @phpstan-return Collection<int, DDC3579Admin> */
     public function getAdmins(): Collection
     {
         return $this->admins;
diff --git a/tests/Tests/Models/DDC3699/DDC3699Child.php b/tests/Tests/Models/DDC3699/DDC3699Child.php
index 57a179f8bf8..f2b85bb0040 100644
--- a/tests/Tests/Models/DDC3699/DDC3699Child.php
+++ b/tests/Tests/Models/DDC3699/DDC3699Child.php
@@ -29,7 +29,7 @@ class DDC3699Child extends DDC3699Parent
     #[OneToOne(targetEntity: 'DDC3699RelationOne', inversedBy: 'child')]
     public $oneRelation;
 
-    /** @psalm-var Collection<int, DDC3699RelationMany> */
+    /** @phpstan-var Collection<int, DDC3699RelationMany> */
     #[OneToMany(targetEntity: 'DDC3699RelationMany', mappedBy: 'child')]
     public $relations;
 }
diff --git a/tests/Tests/Models/DDC3899/DDC3899User.php b/tests/Tests/Models/DDC3899/DDC3899User.php
index 9ae1febb10c..32b3de82589 100644
--- a/tests/Tests/Models/DDC3899/DDC3899User.php
+++ b/tests/Tests/Models/DDC3899/DDC3899User.php
@@ -20,7 +20,7 @@ class DDC3899User
     #[Column(type: 'integer')]
     public $id;
 
-    /** @psalm-var Collection<int, DDC3899Contract> */
+    /** @phpstan-var Collection<int, DDC3899Contract> */
     #[OneToMany(targetEntity: 'DDC3899Contract', mappedBy: 'user')]
     public $contracts;
 }
diff --git a/tests/Tests/Models/DDC5934/DDC5934BaseContract.php b/tests/Tests/Models/DDC5934/DDC5934BaseContract.php
index e1c04ff1f99..61d07001c67 100644
--- a/tests/Tests/Models/DDC5934/DDC5934BaseContract.php
+++ b/tests/Tests/Models/DDC5934/DDC5934BaseContract.php
@@ -22,7 +22,7 @@ class DDC5934BaseContract
     #[GeneratedValue]
     public $id;
 
-    /** @psalm-var Collection<int, DDC5934Member> */
+    /** @phpstan-var Collection<int, DDC5934Member> */
     #[ManyToMany(targetEntity: DDC5934Member::class, fetch: 'LAZY', inversedBy: 'contracts')]
     public $members;
 
diff --git a/tests/Tests/Models/DDC964/DDC964Group.php b/tests/Tests/Models/DDC964/DDC964Group.php
index b25c5a0f10b..9210e097fed 100644
--- a/tests/Tests/Models/DDC964/DDC964Group.php
+++ b/tests/Tests/Models/DDC964/DDC964Group.php
@@ -19,7 +19,7 @@ class DDC964Group
     #[Column(type: 'integer')]
     private int $id;
 
-    /** @psalm-var ArrayCollection<int, DDC964User> */
+    /** @phpstan-var ArrayCollection<int, DDC964User> */
     #[ManyToMany(targetEntity: 'DDC964User', mappedBy: 'groups')]
     private $users;
 
@@ -45,7 +45,7 @@ public function addUser(DDC964User $user): void
         $this->users[] = $user;
     }
 
-    /** @psalm-return ArrayCollection<int, DDC964User> */
+    /** @phpstan-return ArrayCollection<int, DDC964User> */
     public function getUsers(): ArrayCollection
     {
         return $this->users;
diff --git a/tests/Tests/Models/DDC964/DDC964User.php b/tests/Tests/Models/DDC964/DDC964User.php
index 9adcca23dd6..bae9c360d0c 100644
--- a/tests/Tests/Models/DDC964/DDC964User.php
+++ b/tests/Tests/Models/DDC964/DDC964User.php
@@ -26,7 +26,7 @@ class DDC964User
     #[Column(type: 'integer', name: 'user_id', length: 150)]
     protected $id;
 
-    /** @psalm-var Collection<int, DDC964Group> */
+    /** @phpstan-var Collection<int, DDC964Group> */
     #[ManyToMany(targetEntity: DDC964Group::class, inversedBy: 'users', cascade: ['persist', 'detach'])]
     #[JoinTable(name: 'ddc964_users_groups')]
     #[JoinColumn(name: 'user_id', referencedColumnName: 'id')]
@@ -66,7 +66,7 @@ public function addGroup(DDC964Group $group): void
         $group->addUser($this);
     }
 
-    /** @psalm-return Collection<int, DDC964Group> */
+    /** @phpstan-return Collection<int, DDC964Group> */
     public function getGroups(): ArrayCollection
     {
         return $this->groups;
diff --git a/tests/Tests/Models/ECommerce/ECommerceCart.php b/tests/Tests/Models/ECommerce/ECommerceCart.php
index 206a409deeb..9e494daeea4 100644
--- a/tests/Tests/Models/ECommerce/ECommerceCart.php
+++ b/tests/Tests/Models/ECommerce/ECommerceCart.php
@@ -37,7 +37,7 @@ class ECommerceCart
     #[JoinColumn(name: 'customer_id', referencedColumnName: 'id')]
     private ECommerceCustomer|null $customer = null;
 
-    /** @psalm-var Collection<int, ECommerceProduct> */
+    /** @phpstan-var Collection<int, ECommerceProduct> */
     #[JoinTable(name: 'ecommerce_carts_products')]
     #[JoinColumn(name: 'cart_id', referencedColumnName: 'id')]
     #[InverseJoinColumn(name: 'product_id', referencedColumnName: 'id')]
@@ -86,7 +86,7 @@ public function getCustomer(): ECommerceCustomer|null
         return $this->customer;
     }
 
-    /** @psalm-return Collection<int, ECommerceProduct> */
+    /** @phpstan-return Collection<int, ECommerceProduct> */
     public function getProducts(): Collection
     {
         return $this->products;
diff --git a/tests/Tests/Models/ECommerce/ECommerceCategory.php b/tests/Tests/Models/ECommerce/ECommerceCategory.php
index db64b563f6d..959d771af22 100644
--- a/tests/Tests/Models/ECommerce/ECommerceCategory.php
+++ b/tests/Tests/Models/ECommerce/ECommerceCategory.php
@@ -32,11 +32,11 @@ class ECommerceCategory
     #[Column(type: 'string', length: 50)]
     private string|null $name = null;
 
-    /** @psalm-var Collection<int, ECommerceProduct> */
+    /** @phpstan-var Collection<int, ECommerceProduct> */
     #[ManyToMany(targetEntity: 'ECommerceProduct', mappedBy: 'categories')]
     private $products;
 
-    /** @psalm-var Collection<int, ECommerceCategory> */
+    /** @phpstan-var Collection<int, ECommerceCategory> */
     #[OneToMany(targetEntity: 'ECommerceCategory', mappedBy: 'parent', cascade: ['persist'])]
     private $children;
 
@@ -81,7 +81,7 @@ public function removeProduct(ECommerceProduct $product): void
         }
     }
 
-    /** @psalm-return Collection<int, ECommerceProduct> */
+    /** @phpstan-return Collection<int, ECommerceProduct> */
     public function getProducts(): Collection
     {
         return $this->products;
@@ -92,7 +92,7 @@ private function setParent(ECommerceCategory $parent): void
         $this->parent = $parent;
     }
 
-    /** @psalm-return Collection<int, ECommerceCategory> */
+    /** @phpstan-return Collection<int, ECommerceCategory> */
     public function getChildren(): Collection
     {
         return $this->children;
diff --git a/tests/Tests/Models/ECommerce/ECommerceProduct.php b/tests/Tests/Models/ECommerce/ECommerceProduct.php
index 8978ab0fad4..0a8329e62d0 100644
--- a/tests/Tests/Models/ECommerce/ECommerceProduct.php
+++ b/tests/Tests/Models/ECommerce/ECommerceProduct.php
@@ -40,11 +40,11 @@ class ECommerceProduct
     #[JoinColumn(name: 'shipping_id', referencedColumnName: 'id')]
     private ECommerceShipping|null $shipping = null;
 
-    /** @psalm-var Collection<int, ECommerceFeature> */
+    /** @phpstan-var Collection<int, ECommerceFeature> */
     #[OneToMany(targetEntity: 'ECommerceFeature', mappedBy: 'product', cascade: ['persist'])]
     private $features;
 
-    /** @psalm-var Collection<int, ECommerceCategory> */
+    /** @phpstan-var Collection<int, ECommerceCategory> */
     #[JoinTable(name: 'ecommerce_products_categories')]
     #[JoinColumn(name: 'product_id', referencedColumnName: 'id')]
     #[InverseJoinColumn(name: 'category_id', referencedColumnName: 'id')]
@@ -55,7 +55,7 @@ class ECommerceProduct
      * This relation is saved with two records in the association table for
      * simplicity.
      *
-     * @psalm-var Collection<int, ECommerceProduct>
+     * @phpstan-var Collection<int, ECommerceProduct>
      */
     #[JoinTable(name: 'ecommerce_products_related')]
     #[JoinColumn(name: 'product_id', referencedColumnName: 'id')]
@@ -106,7 +106,7 @@ public function removeShipping(): void
         $this->shipping = null;
     }
 
-    /** @psalm-return Collection<int, ECommerceFeature> */
+    /** @phpstan-return Collection<int, ECommerceFeature> */
     public function getFeatures(): Collection
     {
         return $this->features;
@@ -150,19 +150,19 @@ public function removeCategory(ECommerceCategory $category): void
         }
     }
 
-    /** @psalm-param Collection<int, ECommerceCategory> $categories */
+    /** @phpstan-param Collection<int, ECommerceCategory> $categories */
     public function setCategories(Collection $categories): void
     {
         $this->categories = $categories;
     }
 
-    /** @psalm-return Collection<int, ECommerceCategory> $categories */
+    /** @phpstan-return Collection<int, ECommerceCategory> $categories */
     public function getCategories(): Collection
     {
         return $this->categories;
     }
 
-    /** @psalm-return Collection<int, ECommerceProduct> $categories */
+    /** @phpstan-return Collection<int, ECommerceProduct> $categories */
     public function getRelated(): Collection
     {
         return $this->related;
diff --git a/tests/Tests/Models/Enums/FaultySwitch.php b/tests/Tests/Models/Enums/FaultySwitch.php
index 7f01b239966..97320be73a9 100644
--- a/tests/Tests/Models/Enums/FaultySwitch.php
+++ b/tests/Tests/Models/Enums/FaultySwitch.php
@@ -11,12 +11,6 @@ class FaultySwitch
     #[Column(type: 'string')]
     public string $value;
 
-    /**
-     * The following line is ignored on psalm and phpstan so that we can test
-     * that the mapping is throwing an exception when a non-backed enum is used.
-     *
-     * @psalm-suppress InvalidArgument
-     */
     #[Column(enumType: SwitchStatus::class)]
     public SwitchStatus $status;
 }
diff --git a/tests/Tests/Models/Forum/ForumCategory.php b/tests/Tests/Models/Forum/ForumCategory.php
index f35e88fd5f8..5c58328e5e9 100644
--- a/tests/Tests/Models/Forum/ForumCategory.php
+++ b/tests/Tests/Models/Forum/ForumCategory.php
@@ -27,7 +27,7 @@ class ForumCategory
     #[Column(type: 'string', length: 255)]
     public $name;
 
-    /** @psalm-var Collection<int, ForumBoard> */
+    /** @phpstan-var Collection<int, ForumBoard> */
     #[OneToMany(targetEntity: 'ForumBoard', mappedBy: 'category')]
     public $boards;
 
diff --git a/tests/Tests/Models/GH7141/GH7141Article.php b/tests/Tests/Models/GH7141/GH7141Article.php
index 0e5d448d518..f0811314484 100644
--- a/tests/Tests/Models/GH7141/GH7141Article.php
+++ b/tests/Tests/Models/GH7141/GH7141Article.php
@@ -9,7 +9,7 @@
 
 class GH7141Article
 {
-    /** @psalm-var Collection<int, mixed> */
+    /** @phpstan-var Collection<int, mixed> */
     private $tags;
 
     public function __construct()
diff --git a/tests/Tests/Models/GH7316/GH7316Article.php b/tests/Tests/Models/GH7316/GH7316Article.php
index 5a582c31b2d..9440c4f63a0 100644
--- a/tests/Tests/Models/GH7316/GH7316Article.php
+++ b/tests/Tests/Models/GH7316/GH7316Article.php
@@ -9,7 +9,7 @@
 
 class GH7316Article
 {
-    /** @psalm-var Collection<int, mixed> */
+    /** @phpstan-var Collection<int, mixed> */
     private $tags;
 
     public function __construct()
diff --git a/tests/Tests/Models/GeoNames/Admin1.php b/tests/Tests/Models/GeoNames/Admin1.php
index f20e365c134..d21290f6928 100644
--- a/tests/Tests/Models/GeoNames/Admin1.php
+++ b/tests/Tests/Models/GeoNames/Admin1.php
@@ -19,7 +19,7 @@
 #[Cache]
 class Admin1
 {
-    /** @psalm-var Collection<int, Admin1AlternateName> */
+    /** @phpstan-var Collection<int, Admin1AlternateName> */
     #[OneToMany(targetEntity: 'Admin1AlternateName', mappedBy: 'admin1')]
     #[Cache]
     public $names = [];
diff --git a/tests/Tests/Models/Global/GlobalNamespaceModel.php b/tests/Tests/Models/Global/GlobalNamespaceModel.php
index eebdf7c20db..5c2e6ebcb62 100644
--- a/tests/Tests/Models/Global/GlobalNamespaceModel.php
+++ b/tests/Tests/Models/Global/GlobalNamespaceModel.php
@@ -29,14 +29,14 @@ class DoctrineGlobalArticle
     #[Column(type: 'text')]
     protected $text;
 
-    /** @psalm-var Collection<int, DoctrineGlobalUser> */
+    /** @phpstan-var Collection<int, DoctrineGlobalUser> */
     #[JoinTable(name: 'author_articles')]
     #[JoinColumn(name: 'article_id', referencedColumnName: 'id')]
     #[InverseJoinColumn(name: 'author_id', referencedColumnName: 'id', unique: true)]
     #[ManyToMany(targetEntity: 'DoctrineGlobalUser')]
     protected $author;
 
-    /** @psalm-var Collection<int, DoctrineGlobalUser> */
+    /** @phpstan-var Collection<int, DoctrineGlobalUser> */
     #[JoinTable(name: 'editor_articles')]
     #[JoinColumn(name: 'article_id', referencedColumnName: 'id')]
     #[InverseJoinColumn(name: 'editor_id', referencedColumnName: 'id', unique: true)]
diff --git a/tests/Tests/Models/Hydration/EntityWithArrayDefaultArrayValueM2M.php b/tests/Tests/Models/Hydration/EntityWithArrayDefaultArrayValueM2M.php
index 1c8af8e1563..0216cdece8d 100644
--- a/tests/Tests/Models/Hydration/EntityWithArrayDefaultArrayValueM2M.php
+++ b/tests/Tests/Models/Hydration/EntityWithArrayDefaultArrayValueM2M.php
@@ -20,7 +20,7 @@ class EntityWithArrayDefaultArrayValueM2M
     #[GeneratedValue(strategy: 'AUTO')]
     public $id;
 
-    /** @psalm-var Collection<int, SimpleEntity> */
+    /** @phpstan-var Collection<int, SimpleEntity> */
     #[ManyToMany(targetEntity: SimpleEntity::class)]
     public $collection = [];
 }
diff --git a/tests/Tests/Models/Legacy/LegacyCar.php b/tests/Tests/Models/Legacy/LegacyCar.php
index 5297d6a2e66..42ea5b609fb 100644
--- a/tests/Tests/Models/Legacy/LegacyCar.php
+++ b/tests/Tests/Models/Legacy/LegacyCar.php
@@ -22,7 +22,7 @@ class LegacyCar
     #[Column(name: 'iCarId', type: 'integer', nullable: false)]
     public $id;
 
-    /** @psalm-var Collection<int, LegacyUser> */
+    /** @phpstan-var Collection<int, LegacyUser> */
     #[ManyToMany(targetEntity: 'LegacyUser', mappedBy: 'cars')]
     public $users;
 
@@ -40,7 +40,7 @@ public function addUser(LegacyUser $user): void
         $this->users[] = $user;
     }
 
-    /** @psalm-return Collection<int, LegacyUser> */
+    /** @phpstan-return Collection<int, LegacyUser> */
     public function getUsers(): Collection
     {
         return $this->users;
diff --git a/tests/Tests/Models/Legacy/LegacyUser.php b/tests/Tests/Models/Legacy/LegacyUser.php
index e43bc6828bc..a57ca8f3ab2 100644
--- a/tests/Tests/Models/Legacy/LegacyUser.php
+++ b/tests/Tests/Models/Legacy/LegacyUser.php
@@ -35,15 +35,15 @@ class LegacyUser
     #[Column(type: 'string', length: 255, name: 'name')]
     public $name;
 
-    /** @psalm-var Collection<int, LegacyArticle> */
+    /** @phpstan-var Collection<int, LegacyArticle> */
     #[OneToMany(targetEntity: 'LegacyArticle', mappedBy: 'user')]
     public $articles;
 
-    /** @psalm-var Collection<int, LegacyUserReference> */
+    /** @phpstan-var Collection<int, LegacyUserReference> */
     #[OneToMany(targetEntity: 'LegacyUserReference', mappedBy: '_source', cascade: ['remove'])]
     public $references;
 
-    /** @psalm-var Collection<int, LegacyCar> */
+    /** @phpstan-var Collection<int, LegacyCar> */
     #[JoinTable(name: 'legacy_users_cars')]
     #[JoinColumn(name: 'iUserId', referencedColumnName: 'iUserId')]
     #[InverseJoinColumn(name: 'iCarId', referencedColumnName: 'iCarId')]
@@ -78,7 +78,7 @@ public function addReference(LegacyUserReference $reference): void
         $this->references[] = $reference;
     }
 
-    /** @psalm-return Collection<int, LegacyUserReference> */
+    /** @phpstan-return Collection<int, LegacyUserReference> */
     public function references(): Collection
     {
         return $this->references;
@@ -90,7 +90,7 @@ public function addCar(LegacyCar $car): void
         $car->addUser($this);
     }
 
-    /** @psalm-return Collection<int, LegacyCar> */
+    /** @phpstan-return Collection<int, LegacyCar> */
     public function getCars(): Collection
     {
         return $this->cars;
diff --git a/tests/Tests/Models/ManyToManyPersister/ChildClass.php b/tests/Tests/Models/ManyToManyPersister/ChildClass.php
index b92cb70ccb5..30fb904c02b 100644
--- a/tests/Tests/Models/ManyToManyPersister/ChildClass.php
+++ b/tests/Tests/Models/ManyToManyPersister/ChildClass.php
@@ -22,7 +22,7 @@ class ChildClass
 {
     /**
      * @var Collection|ParentClass[]
-     * @psalm-var Collection<ParentClass>
+     * @phpstan-var Collection<ParentClass>
      */
     #[JoinTable(name: 'parent_child')]
     #[JoinColumn(name: 'child_id1', referencedColumnName: 'id1')]
diff --git a/tests/Tests/Models/ManyToManyPersister/ParentClass.php b/tests/Tests/Models/ManyToManyPersister/ParentClass.php
index f39cb68a494..bcba7da0fdb 100644
--- a/tests/Tests/Models/ManyToManyPersister/ParentClass.php
+++ b/tests/Tests/Models/ManyToManyPersister/ParentClass.php
@@ -18,7 +18,7 @@ class ParentClass
 {
     /**
      * @var Collection|ChildClass[]
-     * @psalm-var Collection<ChildClass>
+     * @phpstan-var Collection<ChildClass>
      */
     #[ManyToMany(targetEntity: ChildClass::class, mappedBy: 'parents', orphanRemoval: true, cascade: ['persist'])]
     public $children;
diff --git a/tests/Tests/Models/Navigation/NavCountry.php b/tests/Tests/Models/Navigation/NavCountry.php
index e9f92dced88..016c2d69f09 100644
--- a/tests/Tests/Models/Navigation/NavCountry.php
+++ b/tests/Tests/Models/Navigation/NavCountry.php
@@ -21,7 +21,7 @@ class NavCountry
     #[GeneratedValue]
     private int $id;
 
-    /** @psalm-var Collection<int, NavPointOfInterest> */
+    /** @phpstan-var Collection<int, NavPointOfInterest> */
     #[OneToMany(targetEntity: 'NavPointOfInterest', mappedBy: 'country')]
     private $pois;
 
diff --git a/tests/Tests/Models/Navigation/NavPointOfInterest.php b/tests/Tests/Models/Navigation/NavPointOfInterest.php
index 711b09514a5..7bbec91fb13 100644
--- a/tests/Tests/Models/Navigation/NavPointOfInterest.php
+++ b/tests/Tests/Models/Navigation/NavPointOfInterest.php
@@ -28,7 +28,7 @@ class NavPointOfInterest
     #[Column(type: 'integer', name: 'nav_lat')]
     private int $lat;
 
-    /** @psalm-var Collection<int, NavUser> */
+    /** @phpstan-var Collection<int, NavUser> */
     #[JoinTable(name: 'navigation_pois_visitors')]
     #[JoinColumn(name: 'poi_long', referencedColumnName: 'nav_long')]
     #[JoinColumn(name: 'poi_lat', referencedColumnName: 'nav_lat')]
@@ -74,7 +74,7 @@ public function addVisitor(NavUser $user): void
         $this->visitors[] = $user;
     }
 
-    /** @psalm-var Collection<int, NavUser> */
+    /** @phpstan-var Collection<int, NavUser> */
     public function getVisitors(): Collection
     {
         return $this->visitors;
diff --git a/tests/Tests/Models/Pagination/Company.php b/tests/Tests/Models/Pagination/Company.php
index 66f16d874c7..f9ee1537dd6 100644
--- a/tests/Tests/Models/Pagination/Company.php
+++ b/tests/Tests/Models/Pagination/Company.php
@@ -38,7 +38,7 @@ class Company
     #[OneToOne(targetEntity: 'Logo', mappedBy: 'company', cascade: ['persist'], orphanRemoval: true)]
     public $logo;
 
-    /** @psalm-var Collection<int, Department> */
+    /** @phpstan-var Collection<int, Department> */
     #[OneToMany(targetEntity: 'Department', mappedBy: 'company', cascade: ['persist'], orphanRemoval: true)]
     public $departments;
 }
diff --git a/tests/Tests/Models/Quote/Group.php b/tests/Tests/Models/Quote/Group.php
index d9d941def13..c57108b76f7 100644
--- a/tests/Tests/Models/Quote/Group.php
+++ b/tests/Tests/Models/Quote/Group.php
@@ -24,7 +24,7 @@ class Group
     #[Column(type: 'integer', name: '`group-id`')]
     public $id;
 
-    /** @psalm-var Collection<int, User> */
+    /** @phpstan-var Collection<int, User> */
     #[ManyToMany(targetEntity: 'User', mappedBy: 'groups')]
     public $users;
 
diff --git a/tests/Tests/Models/Quote/User.php b/tests/Tests/Models/Quote/User.php
index f58912337c8..5a31d9b1303 100644
--- a/tests/Tests/Models/Quote/User.php
+++ b/tests/Tests/Models/Quote/User.php
@@ -32,7 +32,7 @@ class User
     #[Column(type: 'string', length: 255, name: '`user-name`')]
     public $name;
 
-    /** @psalm-var Collection<int, Phone> */
+    /** @phpstan-var Collection<int, Phone> */
     #[OneToMany(targetEntity: 'Phone', mappedBy: 'user', cascade: ['persist'])]
     public $phones;
 
@@ -40,7 +40,7 @@ class User
     #[OneToOne(targetEntity: 'Address', mappedBy: 'user', cascade: ['persist'], fetch: 'EAGER')]
     public $address;
 
-    /** @psalm-var Collection<int, Group> */
+    /** @phpstan-var Collection<int, Group> */
     #[JoinTable(name: '`quote-users-groups`')]
     #[JoinColumn(name: '`user-id`', referencedColumnName: '`user-id`')]
     #[InverseJoinColumn(name: '`group-id`', referencedColumnName: '`group-id`')]
@@ -53,7 +53,7 @@ public function __construct()
         $this->groups = new ArrayCollection();
     }
 
-    /** @psalm-return Collection<int, Phone> */
+    /** @phpstan-return Collection<int, Phone> */
     public function getPhones(): Collection
     {
         return $this->phones;
@@ -64,7 +64,7 @@ public function getAddress(): Address|null
         return $this->address;
     }
 
-    /** @psalm-return Collection<int, Group> */
+    /** @phpstan-return Collection<int, Group> */
     public function getGroups(): Collection
     {
         return $this->groups;
diff --git a/tests/Tests/Models/StockExchange/Market.php b/tests/Tests/Models/StockExchange/Market.php
index 832afb62ac9..ed0902d4adc 100644
--- a/tests/Tests/Models/StockExchange/Market.php
+++ b/tests/Tests/Models/StockExchange/Market.php
@@ -21,7 +21,7 @@ class Market
     #[GeneratedValue]
     private int $id;
 
-    /** @psalm-var ArrayCollection<string, Stock> */
+    /** @phpstan-var ArrayCollection<string, Stock> */
     #[OneToMany(targetEntity: 'Stock', mappedBy: 'market', indexBy: 'symbol')]
     public $stocks;
 
diff --git a/tests/Tests/Models/Taxi/Car.php b/tests/Tests/Models/Taxi/Car.php
index 1ee808363a6..54a0804f7c2 100644
--- a/tests/Tests/Models/Taxi/Car.php
+++ b/tests/Tests/Models/Taxi/Car.php
@@ -24,11 +24,11 @@ class Car
     #[Column(type: 'string', length: 255)]
     private string|null $model = null;
 
-    /** @psalm-var Collection<int, Ride> */
+    /** @phpstan-var Collection<int, Ride> */
     #[OneToMany(targetEntity: 'Ride', mappedBy: 'car')]
     private $freeCarRides;
 
-    /** @psalm-var Collection<int, PaidRide> */
+    /** @phpstan-var Collection<int, PaidRide> */
     #[OneToMany(targetEntity: 'PaidRide', mappedBy: 'car')]
     private $carRides;
 
diff --git a/tests/Tests/Models/Taxi/Driver.php b/tests/Tests/Models/Taxi/Driver.php
index 58e83efbf68..63353abd7bc 100644
--- a/tests/Tests/Models/Taxi/Driver.php
+++ b/tests/Tests/Models/Taxi/Driver.php
@@ -24,11 +24,11 @@ class Driver
     #[Column(type: 'string', length: 255)]
     private string|null $name = null;
 
-    /** @psalm-var Collection<int, Ride> */
+    /** @phpstan-var Collection<int, Ride> */
     #[OneToMany(targetEntity: 'Ride', mappedBy: 'driver')]
     private $freeDriverRides;
 
-    /** @psalm-var Collection<int, PaidRide> */
+    /** @phpstan-var Collection<int, PaidRide> */
     #[OneToMany(targetEntity: 'PaidRide', mappedBy: 'driver')]
     private $driverRides;
 
diff --git a/tests/Tests/Models/Tweet/User.php b/tests/Tests/Models/Tweet/User.php
index 38d2e89f8e1..649906eb36c 100644
--- a/tests/Tests/Models/Tweet/User.php
+++ b/tests/Tests/Models/Tweet/User.php
@@ -27,11 +27,11 @@ class User
     #[Column(type: 'string', length: 255)]
     public $name;
 
-    /** @psalm-var Collection<int, Tweet> */
+    /** @phpstan-var Collection<int, Tweet> */
     #[OneToMany(targetEntity: 'Tweet', mappedBy: 'author', cascade: ['persist'], fetch: 'EXTRA_LAZY')]
     public $tweets;
 
-    /** @psalm-var Collection<int, UserList> */
+    /** @phpstan-var Collection<int, UserList> */
     #[OneToMany(targetEntity: 'UserList', mappedBy: 'owner', fetch: 'EXTRA_LAZY', orphanRemoval: true)]
     public $userLists;
 
diff --git a/tests/Tests/Models/ValueConversionType/InversedManyToManyCompositeIdEntity.php b/tests/Tests/Models/ValueConversionType/InversedManyToManyCompositeIdEntity.php
index fca65f2528f..72b57a811e7 100644
--- a/tests/Tests/Models/ValueConversionType/InversedManyToManyCompositeIdEntity.php
+++ b/tests/Tests/Models/ValueConversionType/InversedManyToManyCompositeIdEntity.php
@@ -26,7 +26,7 @@ class InversedManyToManyCompositeIdEntity
     #[Id]
     public $id2;
 
-    /** @psalm-var Collection<int, OwningManyToManyCompositeIdEntity> */
+    /** @phpstan-var Collection<int, OwningManyToManyCompositeIdEntity> */
     #[ManyToMany(targetEntity: 'OwningManyToManyCompositeIdEntity', mappedBy: 'associatedEntities')]
     public $associatedEntities;
 
diff --git a/tests/Tests/Models/ValueConversionType/InversedManyToManyCompositeIdForeignKeyEntity.php b/tests/Tests/Models/ValueConversionType/InversedManyToManyCompositeIdForeignKeyEntity.php
index aeb65dfbc4f..456d08b9e1b 100644
--- a/tests/Tests/Models/ValueConversionType/InversedManyToManyCompositeIdForeignKeyEntity.php
+++ b/tests/Tests/Models/ValueConversionType/InversedManyToManyCompositeIdForeignKeyEntity.php
@@ -29,7 +29,7 @@ class InversedManyToManyCompositeIdForeignKeyEntity
     #[Id]
     public $foreignEntity;
 
-    /** @psalm-var Collection<int, OwningManyToManyCompositeIdForeignKeyEntity> */
+    /** @phpstan-var Collection<int, OwningManyToManyCompositeIdForeignKeyEntity> */
     #[ManyToMany(targetEntity: 'OwningManyToManyCompositeIdForeignKeyEntity', mappedBy: 'associatedEntities')]
     public $associatedEntities;
 
diff --git a/tests/Tests/Models/ValueConversionType/InversedManyToManyEntity.php b/tests/Tests/Models/ValueConversionType/InversedManyToManyEntity.php
index 01c40b7a573..50e575e3a56 100644
--- a/tests/Tests/Models/ValueConversionType/InversedManyToManyEntity.php
+++ b/tests/Tests/Models/ValueConversionType/InversedManyToManyEntity.php
@@ -21,7 +21,7 @@ class InversedManyToManyEntity
     #[Id]
     public $id1;
 
-    /** @psalm-var Collection<int, OwningManyToManyEntity> */
+    /** @phpstan-var Collection<int, OwningManyToManyEntity> */
     #[ManyToMany(targetEntity: 'OwningManyToManyEntity', mappedBy: 'associatedEntities')]
     public $associatedEntities;
 
diff --git a/tests/Tests/Models/ValueConversionType/InversedOneToManyCompositeIdEntity.php b/tests/Tests/Models/ValueConversionType/InversedOneToManyCompositeIdEntity.php
index dd297b39081..caecd4dcf28 100644
--- a/tests/Tests/Models/ValueConversionType/InversedOneToManyCompositeIdEntity.php
+++ b/tests/Tests/Models/ValueConversionType/InversedOneToManyCompositeIdEntity.php
@@ -30,7 +30,7 @@ class InversedOneToManyCompositeIdEntity
     #[Column(type: 'string', length: 255, name: 'some_property')]
     public $someProperty;
 
-    /** @psalm-var Collection<int, OwningManyToOneCompositeIdEntity> */
+    /** @phpstan-var Collection<int, OwningManyToOneCompositeIdEntity> */
     #[OneToMany(targetEntity: 'OwningManyToOneCompositeIdEntity', mappedBy: 'associatedEntity')]
     public $associatedEntities;
 
diff --git a/tests/Tests/Models/ValueConversionType/InversedOneToManyCompositeIdForeignKeyEntity.php b/tests/Tests/Models/ValueConversionType/InversedOneToManyCompositeIdForeignKeyEntity.php
index 05f72effcff..b79f1ea4001 100644
--- a/tests/Tests/Models/ValueConversionType/InversedOneToManyCompositeIdForeignKeyEntity.php
+++ b/tests/Tests/Models/ValueConversionType/InversedOneToManyCompositeIdForeignKeyEntity.php
@@ -33,7 +33,7 @@ class InversedOneToManyCompositeIdForeignKeyEntity
     #[Column(type: 'string', length: 255, name: 'some_property')]
     public $someProperty;
 
-    /** @psalm-var Collection<int, OwningManyToOneCompositeIdForeignKeyEntity> */
+    /** @phpstan-var Collection<int, OwningManyToOneCompositeIdForeignKeyEntity> */
     #[OneToMany(targetEntity: 'OwningManyToOneCompositeIdForeignKeyEntity', mappedBy: 'associatedEntity')]
     public $associatedEntities;
 
diff --git a/tests/Tests/Models/ValueConversionType/InversedOneToManyEntity.php b/tests/Tests/Models/ValueConversionType/InversedOneToManyEntity.php
index 03795dcbd88..9ffbf32b677 100644
--- a/tests/Tests/Models/ValueConversionType/InversedOneToManyEntity.php
+++ b/tests/Tests/Models/ValueConversionType/InversedOneToManyEntity.php
@@ -21,7 +21,7 @@ class InversedOneToManyEntity
     #[Id]
     public $id1;
 
-    /** @psalm-var Collection<int, OwningManyToOneEntity> */
+    /** @phpstan-var Collection<int, OwningManyToOneEntity> */
     #[OneToMany(targetEntity: 'OwningManyToOneEntity', mappedBy: 'associatedEntity')]
     public $associatedEntities;
 
diff --git a/tests/Tests/ORM/Cache/RegionTestCase.php b/tests/Tests/ORM/Cache/RegionTestCase.php
index 72102c4b462..110a560aa18 100644
--- a/tests/Tests/ORM/Cache/RegionTestCase.php
+++ b/tests/Tests/ORM/Cache/RegionTestCase.php
@@ -19,7 +19,7 @@
 #[Group('DDC-2183')]
 abstract class RegionTestCase extends OrmFunctionalTestCase
 {
-    /** @psalm-var TRegion */
+    /** @phpstan-var TRegion */
     protected Region $region;
     protected CacheItemPoolInterface $cacheItemPool;
 
@@ -31,10 +31,10 @@ protected function setUp(): void
         $this->region        = $this->createRegion();
     }
 
-    /** @psalm-return TRegion */
+    /** @phpstan-return TRegion */
     abstract protected function createRegion(): Region;
 
-    /** @psalm-return list<array{CacheKeyMock, CacheEntryMock}> */
+    /** @phpstan-return list<array{CacheKeyMock, CacheEntryMock}> */
     public static function dataProviderCacheValues(): array
     {
         return [
diff --git a/tests/Tests/ORM/EntityManagerTest.php b/tests/Tests/ORM/EntityManagerTest.php
index 9e9f67d1a83..e724d9ac632 100644
--- a/tests/Tests/ORM/EntityManagerTest.php
+++ b/tests/Tests/ORM/EntityManagerTest.php
@@ -118,7 +118,7 @@ public function testCreateQuery(): void
         self::assertEquals('SELECT 1', $q->getDql());
     }
 
-    /** @psalm-return list<array{string}> */
+    /** @phpstan-return list<array{string}> */
     public static function dataAffectedByErrorIfClosedException(): array
     {
         return [
diff --git a/tests/Tests/ORM/Functional/AdvancedAssociationTest.php b/tests/Tests/ORM/Functional/AdvancedAssociationTest.php
index b5a1da15a9b..a05e7e70eff 100644
--- a/tests/Tests/ORM/Functional/AdvancedAssociationTest.php
+++ b/tests/Tests/ORM/Functional/AdvancedAssociationTest.php
@@ -303,7 +303,7 @@ class Phrase
     #[JoinColumn(name: 'phrase_type_id', referencedColumnName: 'phrase_type_id')]
     private PhraseType|null $type = null;
 
-    /** @psalm-var Collection<int, Definition> */
+    /** @phpstan-var Collection<int, Definition> */
     #[OneToMany(targetEntity: 'Definition', mappedBy: 'phrase', cascade: ['persist'])]
     private $definitions;
 
@@ -366,7 +366,7 @@ class PhraseType
     #[Column(type: 'string', name: 'phrase_type_abbreviation', unique: true)]
     private string|null $abbreviation = null;
 
-    /** @psalm-var Collection<int, Phrase> */
+    /** @phpstan-var Collection<int, Phrase> */
     #[OneToMany(targetEntity: 'Phrase', mappedBy: 'type')]
     private $phrases;
 
diff --git a/tests/Tests/ORM/Functional/CascadeRemoveOrderTest.php b/tests/Tests/ORM/Functional/CascadeRemoveOrderTest.php
index d64b398fa82..b151791587c 100644
--- a/tests/Tests/ORM/Functional/CascadeRemoveOrderTest.php
+++ b/tests/Tests/ORM/Functional/CascadeRemoveOrderTest.php
@@ -82,7 +82,7 @@ class CascadeRemoveOrderEntityO
     #[JoinColumn(nullable: true, onDelete: 'SET NULL')]
     private CascadeRemoveOrderEntityG|null $oneToOneG = null;
 
-    /** @psalm-var Collection<int, CascadeRemoveOrderEntityG> */
+    /** @phpstan-var Collection<int, CascadeRemoveOrderEntityG> */
     #[OneToMany(targetEntity: 'Doctrine\Tests\ORM\Functional\CascadeRemoveOrderEntityG', mappedBy: 'ownerO', cascade: ['persist', 'remove'])]
     private $oneToManyG;
 
@@ -111,7 +111,7 @@ public function addOneToManyG(CascadeRemoveOrderEntityG $eG): void
         $this->oneToManyG->add($eG);
     }
 
-    /** @psalm-return array<int, CascadeRemoveOrderEntityG> */
+    /** @phpstan-return array<int, CascadeRemoveOrderEntityG> */
     public function getOneToManyGs(): array
     {
         return $this->oneToManyG->toArray();
diff --git a/tests/Tests/ORM/Functional/ClassTableInheritanceSecondTest.php b/tests/Tests/ORM/Functional/ClassTableInheritanceSecondTest.php
index 06e5ac71241..4f55a05fb31 100644
--- a/tests/Tests/ORM/Functional/ClassTableInheritanceSecondTest.php
+++ b/tests/Tests/ORM/Functional/ClassTableInheritanceSecondTest.php
@@ -170,7 +170,7 @@ class CTIRelated2
     #[GeneratedValue]
     private int $id;
 
-    /** @psalm-var Collection<int, CTIChild> */
+    /** @phpstan-var Collection<int, CTIChild> */
     #[ManyToMany(targetEntity: 'CTIChild')]
     private $ctiChildren;
 
@@ -189,7 +189,7 @@ public function addCTIChild(CTIChild $child): void
         $this->ctiChildren->add($child);
     }
 
-    /** @psalm-return Collection<int, CTIChild> */
+    /** @phpstan-return Collection<int, CTIChild> */
     public function getCTIChildren(): Collection
     {
         return $this->ctiChildren;
diff --git a/tests/Tests/ORM/Functional/DatabaseDriverTestCase.php b/tests/Tests/ORM/Functional/DatabaseDriverTestCase.php
index abbf26c3ed6..bf004f7972e 100644
--- a/tests/Tests/ORM/Functional/DatabaseDriverTestCase.php
+++ b/tests/Tests/ORM/Functional/DatabaseDriverTestCase.php
@@ -20,7 +20,7 @@
  */
 abstract class DatabaseDriverTestCase extends OrmFunctionalTestCase
 {
-    /** @psalm-return array<string, ClassMetadata> */
+    /** @phpstan-return array<string, ClassMetadata> */
     protected function convertToClassMetadata(array $entityTables, array $manyTables = []): array
     {
         $sm     = $this->createSchemaManager();
diff --git a/tests/Tests/ORM/Functional/EntityRepositoryTest.php b/tests/Tests/ORM/Functional/EntityRepositoryTest.php
index 38d78823e28..4ea391669f5 100644
--- a/tests/Tests/ORM/Functional/EntityRepositoryTest.php
+++ b/tests/Tests/ORM/Functional/EntityRepositoryTest.php
@@ -86,7 +86,7 @@ public function loadFixture(): int
         return $user1Id;
     }
 
-    /** @psalm-return array{int, int} */
+    /** @phpstan-return array{int, int} */
     public function loadAssociatedFixture(): array
     {
         $address          = new CmsAddress();
@@ -109,7 +109,7 @@ public function loadAssociatedFixture(): array
         return [$user->id, $address->id];
     }
 
-    /** @psalm-return list<CmsUser> */
+    /** @phpstan-return list<CmsUser> */
     public function loadFixtureUserEmail(): array
     {
         $user1 = new CmsUser();
diff --git a/tests/Tests/ORM/Functional/LifecycleCallbackTest.php b/tests/Tests/ORM/Functional/LifecycleCallbackTest.php
index 0a51b15b092..3dcee0e3712 100644
--- a/tests/Tests/ORM/Functional/LifecycleCallbackTest.php
+++ b/tests/Tests/ORM/Functional/LifecycleCallbackTest.php
@@ -536,7 +536,7 @@ class LifecycleCallbackCascader
     #[GeneratedValue(strategy: 'AUTO')]
     private int $id;
 
-    /** @psalm-var Collection<int, LifecycleCallbackTestEntity> */
+    /** @phpstan-var Collection<int, LifecycleCallbackTestEntity> */
     #[OneToMany(targetEntity: 'LifecycleCallbackTestEntity', mappedBy: 'cascader', cascade: ['persist'])]
     public $entities;
 
diff --git a/tests/Tests/ORM/Functional/ManyToManyBidirectionalAssociationTest.php b/tests/Tests/ORM/Functional/ManyToManyBidirectionalAssociationTest.php
index df2f8f2d72b..a2f48df25e5 100644
--- a/tests/Tests/ORM/Functional/ManyToManyBidirectionalAssociationTest.php
+++ b/tests/Tests/ORM/Functional/ManyToManyBidirectionalAssociationTest.php
@@ -102,7 +102,7 @@ private function createLoadingFixture(): void
         $this->_em->clear();
     }
 
-    /** @psalm-return list<ECommerceProduct> */
+    /** @phpstan-return list<ECommerceProduct> */
     protected function findProducts(): array
     {
         $query  = $this->_em->createQuery('SELECT p, c FROM Doctrine\Tests\Models\ECommerce\ECommerceProduct p LEFT JOIN p.categories c ORDER BY p.id, c.id');
@@ -118,7 +118,7 @@ protected function findProducts(): array
         return $result;
     }
 
-    /** @psalm-return list<ECommerceCategory> */
+    /** @phpstan-return list<ECommerceCategory> */
     protected function findCategories(): array
     {
         $query  = $this->_em->createQuery('SELECT c, p FROM Doctrine\Tests\Models\ECommerce\ECommerceCategory c LEFT JOIN c.products p ORDER BY c.id, p.id');
@@ -137,7 +137,7 @@ protected function findCategories(): array
         return $result;
     }
 
-    /** @psalm-param list<ECommerceProduct> */
+    /** @phpstan-param list<ECommerceProduct> */
     public function assertLazyLoadFromInverseSide(array $products): void
     {
         [$firstProduct, $secondProduct] = $products;
@@ -173,7 +173,7 @@ public function assertLazyLoadFromInverseSide(array $products): void
         $this->assertCollectionEquals($firstCategoryProducts, $secondCategoryProducts);
     }
 
-    /** @psalm-param list<ECommerceCategory> */
+    /** @phpstan-param list<ECommerceCategory> */
     public function assertLazyLoadFromOwningSide(array $categories): void
     {
         [$firstCategory, $secondCategory] = $categories;
diff --git a/tests/Tests/ORM/Functional/ManyToManySelfReferentialAssociationTest.php b/tests/Tests/ORM/Functional/ManyToManySelfReferentialAssociationTest.php
index 2717fb66ada..927af3d3e13 100644
--- a/tests/Tests/ORM/Functional/ManyToManySelfReferentialAssociationTest.php
+++ b/tests/Tests/ORM/Functional/ManyToManySelfReferentialAssociationTest.php
@@ -100,7 +100,7 @@ public function testLazyLoadsOwningSide(): void
         $this->assertLoadingOfOwningSide($products);
     }
 
-    /** @psalm-param list<ECommerceProduct> $products */
+    /** @phpstan-param list<ECommerceProduct> $products */
     public function assertLoadingOfOwningSide(array $products): void
     {
         [$firstProduct, $secondProduct] = $products;
@@ -135,7 +135,7 @@ protected function createLoadingFixture(): void
         $this->_em->clear();
     }
 
-    /** @psalm-return list<ECommerceProduct> */
+    /** @phpstan-return list<ECommerceProduct> */
     protected function findProducts(): array
     {
         $query = $this->_em->createQuery('SELECT p, r FROM Doctrine\Tests\Models\ECommerce\ECommerceProduct p LEFT JOIN p.related r ORDER BY p.id, r.id');
diff --git a/tests/Tests/ORM/Functional/NewOperatorTest.php b/tests/Tests/ORM/Functional/NewOperatorTest.php
index 5a742c1b3a9..2394b6fd880 100644
--- a/tests/Tests/ORM/Functional/NewOperatorTest.php
+++ b/tests/Tests/ORM/Functional/NewOperatorTest.php
@@ -39,7 +39,7 @@ protected function setUp(): void
         $this->loadFixtures();
     }
 
-    /** @psalm-return list<array{int}> */
+    /** @phpstan-return list<array{int}> */
     public static function provideDataForHydrationMode(): array
     {
         return [
diff --git a/tests/Tests/ORM/Functional/OneToManyUnidirectionalAssociationTest.php b/tests/Tests/ORM/Functional/OneToManyUnidirectionalAssociationTest.php
index 8d2af327e61..cefef0e15da 100644
--- a/tests/Tests/ORM/Functional/OneToManyUnidirectionalAssociationTest.php
+++ b/tests/Tests/ORM/Functional/OneToManyUnidirectionalAssociationTest.php
@@ -16,7 +16,7 @@
  */
 class OneToManyUnidirectionalAssociationTest extends OrmFunctionalTestCase
 {
-    /** @psalm-var array<string, RoutingLocation> */
+    /** @phpstan-var array<string, RoutingLocation> */
     protected $locations = [];
 
     protected function setUp(): void
diff --git a/tests/Tests/ORM/Functional/OneToOneEagerLoadingTest.php b/tests/Tests/ORM/Functional/OneToOneEagerLoadingTest.php
index bfeb802de01..e841b8cf64b 100644
--- a/tests/Tests/ORM/Functional/OneToOneEagerLoadingTest.php
+++ b/tests/Tests/ORM/Functional/OneToOneEagerLoadingTest.php
@@ -233,7 +233,7 @@ class Train
     #[JoinColumn(nullable: false)]
     public $owner;
 
-    /** @psalm-var Collection<int, Waggon> */
+    /** @phpstan-var Collection<int, Waggon> */
     #[OneToMany(targetEntity: 'Waggon', mappedBy: 'train', cascade: ['persist'])]
     public $waggons;
 
diff --git a/tests/Tests/ORM/Functional/OrderedCollectionTest.php b/tests/Tests/ORM/Functional/OrderedCollectionTest.php
index 96413145536..72179ee19a4 100644
--- a/tests/Tests/ORM/Functional/OrderedCollectionTest.php
+++ b/tests/Tests/ORM/Functional/OrderedCollectionTest.php
@@ -13,7 +13,7 @@
 
 class OrderedCollectionTest extends OrmFunctionalTestCase
 {
-    /** @psalm-var array<string, RoutingLocation> */
+    /** @phpstan-var array<string, RoutingLocation> */
     protected $locations = [];
 
     protected function setUp(): void
diff --git a/tests/Tests/ORM/Functional/OrderedJoinedTableInheritanceCollectionTest.php b/tests/Tests/ORM/Functional/OrderedJoinedTableInheritanceCollectionTest.php
index bc67df8d172..d93ef14b2c2 100644
--- a/tests/Tests/ORM/Functional/OrderedJoinedTableInheritanceCollectionTest.php
+++ b/tests/Tests/ORM/Functional/OrderedJoinedTableInheritanceCollectionTest.php
@@ -98,12 +98,12 @@ abstract class OJTICPet
     #[ManyToOne(targetEntity: 'OJTICPet')]
     public $mother;
 
-    /** @psalm-var Collection<int, OJTICPet> */
+    /** @phpstan-var Collection<int, OJTICPet> */
     #[OneToMany(targetEntity: 'OJTICPet', mappedBy: 'mother')]
     #[OrderBy(['name' => 'ASC'])]
     public $children;
 
-    /** @psalm-var Collection<int, OJTICPet> */
+    /** @phpstan-var Collection<int, OJTICPet> */
     #[JoinTable(name: 'OTJIC_Pet_Friends')]
     #[JoinColumn(name: 'pet_id', referencedColumnName: 'id')]
     #[InverseJoinColumn(name: 'friend_id', referencedColumnName: 'id')]
diff --git a/tests/Tests/ORM/Functional/PaginationTest.php b/tests/Tests/ORM/Functional/PaginationTest.php
index db89c353d45..af7b83394ce 100644
--- a/tests/Tests/ORM/Functional/PaginationTest.php
+++ b/tests/Tests/ORM/Functional/PaginationTest.php
@@ -766,7 +766,7 @@ public function populate(): void
         $this->_em->flush();
     }
 
-    /** @psalm-return list<array{bool}> */
+    /** @phpstan-return list<array{bool}> */
     public static function useOutputWalkers(): array
     {
         return [
@@ -775,7 +775,7 @@ public static function useOutputWalkers(): array
         ];
     }
 
-    /** @psalm-return list<array{bool}> */
+    /** @phpstan-return list<array{bool}> */
     public static function fetchJoinCollection(): array
     {
         return [
@@ -784,7 +784,7 @@ public static function fetchJoinCollection(): array
         ];
     }
 
-    /** @psalm-return list<array{bool, bool}> */
+    /** @phpstan-return list<array{bool, bool}> */
     public static function useOutputWalkersAndFetchJoinCollection(): array
     {
         return [
diff --git a/tests/Tests/ORM/Functional/SecondLevelCacheFunctionalTestCase.php b/tests/Tests/ORM/Functional/SecondLevelCacheFunctionalTestCase.php
index 16132c743dd..290f9654291 100644
--- a/tests/Tests/ORM/Functional/SecondLevelCacheFunctionalTestCase.php
+++ b/tests/Tests/ORM/Functional/SecondLevelCacheFunctionalTestCase.php
@@ -27,34 +27,34 @@
 #[Group('DDC-2183')]
 abstract class SecondLevelCacheFunctionalTestCase extends OrmFunctionalTestCase
 {
-    /** @psalm-var list<Person> */
+    /** @phpstan-var list<Person> */
     protected array $people = [];
 
-    /** @psalm-var list<Address> */
+    /** @phpstan-var list<Address> */
     protected array $addresses = [];
 
-    /** @psalm-var list<Country> */
+    /** @phpstan-var list<Country> */
     protected array $countries = [];
 
-    /** @psalm-var list<State> */
+    /** @phpstan-var list<State> */
     protected array $states = [];
 
-    /** @psalm-var list<City> */
+    /** @phpstan-var list<City> */
     protected array $cities = [];
 
-    /** @psalm-var list<Travel> */
+    /** @phpstan-var list<Travel> */
     protected array $travels = [];
 
-    /** @psalm-var list<Traveler> */
+    /** @phpstan-var list<Traveler> */
     protected array $travelers = [];
 
-    /** @psalm-var list<Attraction> */
+    /** @phpstan-var list<Attraction> */
     protected array $attractions = [];
 
-    /** @psalm-var list<AttractionInfo> */
+    /** @phpstan-var list<AttractionInfo> */
     protected array $attractionsInfo = [];
 
-    /** @psalm-var list<TravelerProfile> */
+    /** @phpstan-var list<TravelerProfile> */
     protected array $travelersWithProfile = [];
 
     protected Cache $cache;
diff --git a/tests/Tests/ORM/Functional/SecondLevelCacheTest.php b/tests/Tests/ORM/Functional/SecondLevelCacheTest.php
index e23c98a2797..145a7286165 100644
--- a/tests/Tests/ORM/Functional/SecondLevelCacheTest.php
+++ b/tests/Tests/ORM/Functional/SecondLevelCacheTest.php
@@ -341,7 +341,7 @@ class ListenerSecondLevelCacheTest
 {
     /**
      * @param array<string, callable> $callbacks
-     * @psalm-param array<string, callable> $callbacks
+     * @phpstan-param array<string, callable> $callbacks
      */
     public function __construct(public array $callbacks = [])
     {
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC1080Test.php b/tests/Tests/ORM/Functional/Ticket/DDC1080Test.php
index fd319b59772..1e8f337e58b 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC1080Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC1080Test.php
@@ -91,7 +91,7 @@ class DDC1080Foo
     #[Column(name: 'fooTitle', type: 'string', length: 255)]
     protected $fooTitle;
 
-    /** @psalm-var Collection<DDC1080FooBar> */
+    /** @phpstan-var Collection<DDC1080FooBar> */
     #[OneToMany(targetEntity: 'DDC1080FooBar', mappedBy: 'foo', cascade: ['persist'])]
     #[OrderBy(['orderNr' => 'ASC'])]
     protected $fooBars;
@@ -111,7 +111,7 @@ public function getFooTitle(): string
         return $this->fooTitle;
     }
 
-    /** @psalm-return Collection<DDC1080FooBar> */
+    /** @phpstan-return Collection<DDC1080FooBar> */
     public function getFooBars(): Collection
     {
         return $this->fooBars;
@@ -146,7 +146,7 @@ class DDC1080Bar
     #[Column(name: 'barTitle', type: 'string', length: 255)]
     protected $barTitle;
 
-    /** @psalm-var Collection<DDC1080FooBar> */
+    /** @phpstan-var Collection<DDC1080FooBar> */
     #[OneToMany(targetEntity: 'DDC1080FooBar', mappedBy: 'bar', cascade: ['persist'])]
     #[OrderBy(['orderNr' => 'ASC'])]
     protected $fooBars;
@@ -166,7 +166,7 @@ public function getBarTitle(): string
         return $this->barTitle;
     }
 
-    /** @psalm-return Collection<DDC1080FooBar> */
+    /** @phpstan-return Collection<DDC1080FooBar> */
     public function getFooBars(): Collection
     {
         return $this->fooBars;
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC1300Test.php b/tests/Tests/ORM/Functional/Ticket/DDC1300Test.php
index d126abaa0d4..1bb898dc835 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC1300Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC1300Test.php
@@ -64,7 +64,7 @@ class DDC1300Foo
     #[Column(name: 'fooReference', type: 'string', nullable: true, length: 45)]
     public $fooReference = null;
 
-    /** @psalm-var Collection<int, DDC1300FooLocale> */
+    /** @phpstan-var Collection<int, DDC1300FooLocale> */
     #[OneToMany(targetEntity: 'DDC1300FooLocale', mappedBy: 'foo', cascade: ['persist'])]
     public $fooLocaleRefFoo = null;
 
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC1335Test.php b/tests/Tests/ORM/Functional/Ticket/DDC1335Test.php
index 8efad774b32..69156476c44 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC1335Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC1335Test.php
@@ -162,7 +162,7 @@ class DDC1335User
     #[GeneratedValue]
     public int|null $id = null;
 
-    /** @psalm-var Collection<int, DDC1335Phone> */
+    /** @phpstan-var Collection<int, DDC1335Phone> */
     #[OneToMany(targetEntity: 'DDC1335Phone', mappedBy: 'user', cascade: ['persist', 'remove'])]
     public Collection $phones;
 
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC1400Test.php b/tests/Tests/ORM/Functional/Ticket/DDC1400Test.php
index dd223cceebc..6b5d8002d5a 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC1400Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC1400Test.php
@@ -79,7 +79,7 @@ class DDC1400Article
     #[GeneratedValue]
     public $id;
 
-    /** @psalm-var Collection<int, DDC1400UserState> */
+    /** @phpstan-var Collection<int, DDC1400UserState> */
     #[OneToMany(targetEntity: 'DDC1400UserState', mappedBy: 'article', indexBy: 'userId', fetch: 'EXTRA_LAZY')]
     public $userStates;
 }
@@ -93,7 +93,7 @@ class DDC1400User
     #[GeneratedValue]
     public $id;
 
-    /** @psalm-var Collection<int, DDC1400UserState> */
+    /** @phpstan-var Collection<int, DDC1400UserState> */
     #[OneToMany(targetEntity: 'DDC1400UserState', mappedBy: 'user', indexBy: 'articleId', fetch: 'EXTRA_LAZY')]
     public $userStates;
 }
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC1452Test.php b/tests/Tests/ORM/Functional/Ticket/DDC1452Test.php
index 2d44baf3383..f3095c2b924 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC1452Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC1452Test.php
@@ -104,7 +104,7 @@ class DDC1452EntityA
     #[Column]
     public $title;
 
-    /** @psalm-var Collection<int, DDC1452EntityB> */
+    /** @phpstan-var Collection<int, DDC1452EntityB> */
     #[OneToMany(targetEntity: 'DDC1452EntityB', mappedBy: 'entityAFrom')]
     public $entitiesB;
 
@@ -113,7 +113,7 @@ public function __construct()
         $this->entitiesB = new ArrayCollection();
     }
 
-    /** @psalm-return Collection<int, DDC1452EntityB> */
+    /** @phpstan-return Collection<int, DDC1452EntityB> */
     public function getEntitiesB(): Collection
     {
         return $this->entitiesB;
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC1514Test.php b/tests/Tests/ORM/Functional/Ticket/DDC1514Test.php
index 0e0a7078e57..a8dac0915eb 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC1514Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC1514Test.php
@@ -81,7 +81,7 @@ class DDC1514EntityA
     #[Column]
     public $title;
 
-    /** @psalm-var Collection<int, DDC1514EntityB> */
+    /** @phpstan-var Collection<int, DDC1514EntityB> */
     #[ManyToMany(targetEntity: 'DDC1514EntityB', mappedBy: 'entityAFrom')]
     public $entitiesB;
 
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC1526Test.php b/tests/Tests/ORM/Functional/Ticket/DDC1526Test.php
index d7cb6e16b5f..cad27a4f057 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC1526Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC1526Test.php
@@ -65,7 +65,7 @@ class DDC1526Menu
     #[ManyToOne(targetEntity: 'DDC1526Menu', inversedBy: 'children')]
     public $parent;
 
-    /** @psalm-var Collection<int, DDC1526Menu> */
+    /** @phpstan-var Collection<int, DDC1526Menu> */
     #[OneToMany(targetEntity: 'DDC1526Menu', mappedBy: 'parent')]
     public $children;
 }
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC1595Test.php b/tests/Tests/ORM/Functional/Ticket/DDC1595Test.php
index 8a757b4ba73..e6035ee4218 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC1595Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC1595Test.php
@@ -91,14 +91,14 @@ abstract class DDC1595BaseInheritance
 #[Entity]
 class DDC1595InheritedEntity1 extends DDC1595BaseInheritance
 {
-    /** @psalm-var Collection<int, DDC1595InheritedEntity2> */
+    /** @phpstan-var Collection<int, DDC1595InheritedEntity2> */
     #[JoinTable(name: 'entity1_entity2')]
     #[JoinColumn(name: 'parent', referencedColumnName: 'id')]
     #[InverseJoinColumn(name: 'item', referencedColumnName: 'id')]
     #[ManyToMany(targetEntity: 'DDC1595InheritedEntity2', fetch: 'EXTRA_LAZY')]
     protected $entities;
 
-    /** @psalm-return Collection<int, DDC1595InheritedEntity2> */
+    /** @phpstan-return Collection<int, DDC1595InheritedEntity2> */
     public function getEntities(): Collection
     {
         return $this->entities;
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC1654Test.php b/tests/Tests/ORM/Functional/Ticket/DDC1654Test.php
index 49063ad4ee3..fdd3b52cb90 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC1654Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC1654Test.php
@@ -144,7 +144,7 @@ class DDC1654Post
     #[GeneratedValue]
     public $id;
 
-    /** @psalm-var Collection<int, DDC1654Comment> */
+    /** @phpstan-var Collection<int, DDC1654Comment> */
     #[ManyToMany(targetEntity: 'DDC1654Comment', orphanRemoval: true, cascade: ['persist'])]
     public $comments = [];
 }
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC1655Test.php b/tests/Tests/ORM/Functional/Ticket/DDC1655Test.php
index a6452a5dbf5..d6e721d9247 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC1655Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC1655Test.php
@@ -144,7 +144,7 @@ class DDC1655Baz
     #[Column(type: 'integer')]
     public $id;
 
-    /** @psalm-var Collection<int, DDC1655Foo> */
+    /** @phpstan-var Collection<int, DDC1655Foo> */
     #[OneToMany(targetEntity: 'DDC1655Foo', mappedBy: 'baz')]
     public $foos = [];
 }
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC1884Test.php b/tests/Tests/ORM/Functional/Ticket/DDC1884Test.php
index 360ac2bf519..b5b76a5b125 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC1884Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC1884Test.php
@@ -55,7 +55,7 @@ protected function setUp(): void
     }
 
     /**
-     * @psalm-return array{Car, Car, Car, Car}
+     * @phpstan-return array{Car, Car, Car, Car}
      *
      * @var class-string<Car> $class
      */
@@ -86,7 +86,7 @@ private function createCars(string $class): array
     }
 
     /**
-     * @psalm-return array{Driver, Driver}
+     * @phpstan-return array{Driver, Driver}
      *
      * @var class-string<Driver> $class
      */
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC1925Test.php b/tests/Tests/ORM/Functional/Ticket/DDC1925Test.php
index f64d8555aa9..ec3ded3b068 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC1925Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC1925Test.php
@@ -66,7 +66,7 @@ class DDC1925Product
     #[Column(name: 'title', type: 'string', length: 255)]
     private string|null $title = null;
 
-    /** @psalm-var Collection<int, DDC1925User> */
+    /** @phpstan-var Collection<int, DDC1925User> */
     #[JoinTable(name: 'user_purchases')]
     #[JoinColumn(name: 'product_id', referencedColumnName: 'id')]
     #[InverseJoinColumn(name: 'user_id', referencedColumnName: 'id')]
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC199Test.php b/tests/Tests/ORM/Functional/Ticket/DDC199Test.php
index ccef0f3242b..9cfd9149c9b 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC199Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC199Test.php
@@ -81,7 +81,7 @@ class DDC199ParentClass
     #[Column(type: 'string', length: 255)]
     public $parentData;
 
-    /** @psalm-var Collection<int, DDC199RelatedClass> */
+    /** @phpstan-var Collection<int, DDC199RelatedClass> */
     #[OneToMany(targetEntity: 'DDC199RelatedClass', mappedBy: 'parent')]
     public $relatedEntities;
 }
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC2012Test.php b/tests/Tests/ORM/Functional/Ticket/DDC2012Test.php
index 12f6d34e9e9..fe9ec893ed6 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC2012Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC2012Test.php
@@ -93,7 +93,7 @@ class DDC2012Item
     #[Column(type: 'integer')]
     public $id;
 
-    /** @psalm-var list<string> */
+    /** @phpstan-var list<string> */
     #[Column(name: 'tsv', type: 'tsvector', length: 255, nullable: true)]
     public $tsv;
 }
@@ -108,7 +108,7 @@ class DDC2012TsVectorType extends Type
 {
     public const MYTYPE = 'tsvector';
 
-    /** @psalm-var array<string, list<array{value: mixed, platform: AbstractPlatform}>> */
+    /** @phpstan-var array<string, list<array{value: mixed, platform: AbstractPlatform}>> */
     public static $calls = [];
 
     /**
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC2106Test.php b/tests/Tests/ORM/Functional/Ticket/DDC2106Test.php
index 0107bf8ca6a..10043467bb1 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC2106Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC2106Test.php
@@ -58,7 +58,7 @@ class DDC2106Entity
     #[ManyToOne(targetEntity: 'DDC2106Entity', inversedBy: 'children')]
     public $parent;
 
-    /** @psalm-var Collection<int, DDC2106Entity> */
+    /** @phpstan-var Collection<int, DDC2106Entity> */
     #[OneToMany(targetEntity: 'DDC2106Entity', mappedBy: 'parent', cascade: ['persist'])]
     public $children;
 
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC211Test.php b/tests/Tests/ORM/Functional/Ticket/DDC211Test.php
index 3d6de065d12..7a04f5ee621 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC211Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC211Test.php
@@ -67,7 +67,7 @@ class DDC211User
     #[Column(name: 'name', type: 'string', length: 255)]
     protected $name;
 
-    /** @psalm-var Collection<int, DDC211Group> */
+    /** @phpstan-var Collection<int, DDC211Group> */
     #[JoinTable(name: 'user_groups')]
     #[JoinColumn(name: 'user_id', referencedColumnName: 'id')]
     #[InverseJoinColumn(name: 'group_id', referencedColumnName: 'id')]
@@ -84,7 +84,7 @@ public function setName(string $name): void
         $this->name = $name;
     }
 
-    /** @psalm-return Collection<int, DDC211Group> */
+    /** @phpstan-return Collection<int, DDC211Group> */
     public function getGroups(): Collection
     {
         return $this->groups;
@@ -105,7 +105,7 @@ class DDC211Group
     #[Column(name: 'name', type: 'string', length: 255)]
     protected $name;
 
-    /** @psalm-var Collection<int, DDC211User> */
+    /** @phpstan-var Collection<int, DDC211User> */
     #[ManyToMany(targetEntity: 'DDC211User', mappedBy: 'groups')]
     protected $users;
 
@@ -119,7 +119,7 @@ public function setName(string $name): void
         $this->name = $name;
     }
 
-    /** @psalm-return Collection<int, DDC211User> */
+    /** @phpstan-return Collection<int, DDC211User> */
     public function getUsers(): Collection
     {
         return $this->users;
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC2252Test.php b/tests/Tests/ORM/Functional/Ticket/DDC2252Test.php
index 0e21c835be3..4eed0a25ce9 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC2252Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC2252Test.php
@@ -24,16 +24,16 @@
 #[Group('DDC-2252')]
 class DDC2252Test extends OrmFunctionalTestCase
 {
-    /** @psalm-var DDC2252User */
+    /** @phpstan-var DDC2252User */
     private $user;
 
-    /** @psalm-var DDC2252MerchantAccount */
+    /** @phpstan-var DDC2252MerchantAccount */
     private $merchant;
 
-    /** @psalm-var DDC2252Membership */
+    /** @phpstan-var DDC2252Membership */
     private $membership;
 
-    /** @psalm-var list<DDC2252Privilege> */
+    /** @phpstan-var list<DDC2252Privilege> */
     private array $privileges = [];
 
     protected function setUp(): void
@@ -161,7 +161,7 @@ class DDC2252User
     #[Column(type: 'integer')]
     protected $uid = 222;
 
-    /** @psalm-var Collection<int, DDC2252Membership> */
+    /** @phpstan-var Collection<int, DDC2252Membership> */
     #[OneToMany(targetEntity: 'DDC2252Membership', mappedBy: 'userAccount', cascade: ['persist'])]
     #[JoinColumn(name: 'uid', referencedColumnName: 'uid')]
     protected $memberships;
@@ -176,7 +176,7 @@ public function getUid(): int
         return $this->uid;
     }
 
-    /** @psalm-return Collection<int, DDC2252Membership> */
+    /** @phpstan-return Collection<int, DDC2252Membership> */
     public function getMemberships(): Collection
     {
         return $this->memberships;
@@ -193,7 +193,7 @@ public function addMembership(DDC2252Membership $membership): void
 #[HasLifecycleCallbacks]
 class DDC2252Membership
 {
-    /** @psalm-var Collection<int, DDC2252Privilege> */
+    /** @phpstan-var Collection<int, DDC2252Privilege> */
     #[JoinTable(name: 'ddc2252_user_mch_account_privilege')]
     #[JoinColumn(name: 'mch_accountid', referencedColumnName: 'mch_accountid')]
     #[JoinColumn(name: 'uid', referencedColumnName: 'uid')]
@@ -219,7 +219,7 @@ public function addPrivilege(DDC2252Privilege $privilege): void
         $this->privileges[] = $privilege;
     }
 
-    /** @psalm-var Collection<int, DDC2252Privilege> */
+    /** @phpstan-var Collection<int, DDC2252Privilege> */
     public function getPrivileges(): Collection
     {
         return $this->privileges;
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC2350Test.php b/tests/Tests/ORM/Functional/Ticket/DDC2350Test.php
index c0b84c905a0..49d08d8b80a 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC2350Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC2350Test.php
@@ -60,7 +60,7 @@ class DDC2350User
     #[GeneratedValue]
     public $id;
 
-    /** @psalm-var Collection<int, DDC2350Bug> */
+    /** @phpstan-var Collection<int, DDC2350Bug> */
     #[OneToMany(targetEntity: 'DDC2350Bug', mappedBy: 'user', fetch: 'EAGER')]
     public $reportedBugs;
 }
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC2494Test.php b/tests/Tests/ORM/Functional/Ticket/DDC2494Test.php
index a83be2af1f3..4b9be908390 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC2494Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC2494Test.php
@@ -82,7 +82,7 @@ public function testIssue(): void
 #[Entity]
 class DDC2494Currency
 {
-    /** @psalm-var Collection<int, DDC2494Campaign> */
+    /** @phpstan-var Collection<int, DDC2494Campaign> */
     #[OneToMany(targetEntity: 'DDC2494Campaign', mappedBy: 'currency')]
     protected $campaigns;
 
@@ -105,7 +105,7 @@ public function getTemp(): int
         return $this->temp;
     }
 
-    /** @psalm-return Collection<int, DDC2494Campaign> */
+    /** @phpstan-return Collection<int, DDC2494Campaign> */
     public function getCampaigns(): Collection
     {
         return $this->campaigns;
@@ -142,7 +142,7 @@ public function getCurrency(): DDC2494Currency
 
 class DDC2494TinyIntType extends Type
 {
-    /** @psalm-var array<string, list<array{value:mixed, return: string, platform: AbstractPlatform}>> */
+    /** @phpstan-var array<string, list<array{value:mixed, return: string, platform: AbstractPlatform}>> */
     public static $calls = [];
 
     /**
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC2575Test.php b/tests/Tests/ORM/Functional/Ticket/DDC2575Test.php
index 6fb5f45e882..ca7f3d8c2f3 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC2575Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC2575Test.php
@@ -16,13 +16,13 @@
 #[Group('DDC-2575')]
 class DDC2575Test extends OrmFunctionalTestCase
 {
-    /** @psalm-var list<DDC2575Root> */
+    /** @phpstan-var list<DDC2575Root> */
     private array $rootsEntities = [];
 
-    /** @psalm-var list<DDC2575A> */
+    /** @phpstan-var list<DDC2575A> */
     private array $aEntities = [];
 
-    /** @psalm-var list<DDC2575B> */
+    /** @phpstan-var list<DDC2575B> */
     private array $bEntities = [];
 
     protected function setUp(): void
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC2759Test.php b/tests/Tests/ORM/Functional/Ticket/DDC2759Test.php
index de1efcade62..968b3361615 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC2759Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC2759Test.php
@@ -93,7 +93,7 @@ class DDC2759Category
     #[GeneratedValue]
     public $id;
 
-    /** @psalm-var Collection<int, DDC2759MetadataCategory> */
+    /** @phpstan-var Collection<int, DDC2759MetadataCategory> */
     #[OneToMany(targetEntity: 'DDC2759MetadataCategory', mappedBy: 'category')]
     public $metadataCategories;
 }
@@ -108,7 +108,7 @@ class DDC2759QualificationMetadata
     #[GeneratedValue]
     public $id;
 
-    /** @psalm-var Collection<int, DDC2759MetadataCategory> */
+    /** @phpstan-var Collection<int, DDC2759MetadataCategory> */
     #[OneToMany(targetEntity: 'DDC2759MetadataCategory', mappedBy: 'metadata')]
     protected $metadataCategories;
 
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC2775Test.php b/tests/Tests/ORM/Functional/Ticket/DDC2775Test.php
index 47a6f548c68..4a2d76646c4 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC2775Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC2775Test.php
@@ -83,7 +83,7 @@ abstract class Role
     #[ManyToOne(targetEntity: 'User', inversedBy: 'roles')]
     public $user;
 
-    /** @psalm-var Collection<int, Authorization> */
+    /** @phpstan-var Collection<int, Authorization> */
     #[OneToMany(targetEntity: 'Authorization', mappedBy: 'role', cascade: ['all'], orphanRemoval: true)]
     public $authorizations;
 
@@ -129,11 +129,11 @@ class User
     #[GeneratedValue(strategy: 'AUTO')]
     public $id;
 
-    /** @psalm-var Collection<int, Role> */
+    /** @phpstan-var Collection<int, Role> */
     #[OneToMany(targetEntity: 'Role', mappedBy: 'user', cascade: ['all'], orphanRemoval: true)]
     public $roles;
 
-    /** @psalm-var Collection<int, Authorization> */
+    /** @phpstan-var Collection<int, Authorization> */
     #[OneToMany(targetEntity: 'Authorization', mappedBy: 'user', cascade: ['all'], orphanRemoval: true)]
     public $authorizations;
 
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC3033Test.php b/tests/Tests/ORM/Functional/Ticket/DDC3033Test.php
index e91198319a1..f1224536c69 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC3033Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC3033Test.php
@@ -70,7 +70,7 @@ public function testIssue(): void
 #[HasLifecycleCallbacks]
 class DDC3033Product
 {
-    /** @psalm-var array<string, array{mixed, mixed}> */
+    /** @phpstan-var array<string, array{mixed, mixed}> */
     public $changeSet = [];
 
     /** @var int $id */
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC3192Test.php b/tests/Tests/ORM/Functional/Ticket/DDC3192Test.php
index 7ed9b8665f3..6b1f4a74855 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC3192Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC3192Test.php
@@ -114,7 +114,7 @@ public function __construct(
 
 class DDC3192CurrencyCode extends Type
 {
-    /** @psalm-var array<string, int> */
+    /** @phpstan-var array<string, int> */
     private static array $map = ['BYR' => 974];
 
     /**
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC3330Test.php b/tests/Tests/ORM/Functional/Ticket/DDC3330Test.php
index 5bf7c285f94..20806b04136 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC3330Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC3330Test.php
@@ -83,7 +83,7 @@ class DDC3330Building
     #[GeneratedValue]
     public $id;
 
-    /** @psalm-var Collection<int, DDC3330Hall> */
+    /** @phpstan-var Collection<int, DDC3330Hall> */
     #[OneToMany(targetEntity: 'DDC3330Hall', mappedBy: 'building', cascade: ['persist'])]
     public $halls;
 
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC345Test.php b/tests/Tests/ORM/Functional/Ticket/DDC345Test.php
index f78ec2b4062..914b0f722c3 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC345Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC345Test.php
@@ -82,7 +82,7 @@ class DDC345User
     #[Column(type: 'string', length: 255)]
     public $name;
 
-    /** @psalm-var Collection<int, DDC345Membership> */
+    /** @phpstan-var Collection<int, DDC345Membership> */
     #[OneToMany(targetEntity: 'DDC345Membership', mappedBy: 'user', cascade: ['persist'])]
     public $memberships;
 
@@ -105,7 +105,7 @@ class DDC345Group
     #[Column(type: 'string', length: 255)]
     public $name;
 
-    /** @psalm-var Collection<int, DDC345Membership> */
+    /** @phpstan-var Collection<int, DDC345Membership> */
     #[OneToMany(targetEntity: 'DDC345Membership', mappedBy: 'group', cascade: ['persist'])]
     public $memberships;
 
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC3644Test.php b/tests/Tests/ORM/Functional/Ticket/DDC3644Test.php
index 892d3bed7c4..249b21e46bd 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC3644Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC3644Test.php
@@ -150,11 +150,11 @@ class DDC3644User
     #[Column(type: 'string', length: 255)]
     public $name;
 
-    /** @psalm-var Collection<int, DDC3644Address> */
+    /** @phpstan-var Collection<int, DDC3644Address> */
     #[OneToMany(targetEntity: 'DDC3644Address', mappedBy: 'user', orphanRemoval: true)]
     public $addresses = [];
 
-    /** @psalm-var Collection<int, DDC3644Pet> */
+    /** @phpstan-var Collection<int, DDC3644Pet> */
     #[OneToMany(targetEntity: 'DDC3644Pet', mappedBy: 'owner', orphanRemoval: true)]
     public $pets = [];
 
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC371Test.php b/tests/Tests/ORM/Functional/Ticket/DDC371Test.php
index ed185ad873d..0148501f578 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC371Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC371Test.php
@@ -84,7 +84,7 @@ class DDC371Parent
     #[Column(type: 'string', length: 255)]
     public $data;
 
-    /** @psalm-var Collection<int, DDC371Child> */
+    /** @phpstan-var Collection<int, DDC371Child> */
     #[OneToMany(targetEntity: 'DDC371Child', mappedBy: 'parent')]
     public $children;
 }
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC3785Test.php b/tests/Tests/ORM/Functional/Ticket/DDC3785Test.php
index 609e9ad7f2e..7fff73d6f81 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC3785Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC3785Test.php
@@ -67,14 +67,14 @@ public function testOwningValueObjectIdIsCorrectlyTransformedWhenRemovingOrphane
 #[Entity]
 class DDC3785Asset
 {
-    /** @psalm-var Collection<int, DDC3785Attribute> */
+    /** @phpstan-var Collection<int, DDC3785Attribute> */
     #[JoinTable(name: 'asset_attributes')]
     #[JoinColumn(name: 'asset_id', referencedColumnName: 'id')]
     #[InverseJoinColumn(name: 'attribute_id', referencedColumnName: 'id')]
     #[ManyToMany(targetEntity: 'DDC3785Attribute', cascade: ['persist'], orphanRemoval: true)]
     private $attributes;
 
-    /** @psalm-param list<DDC3785Attribute> $attributes */
+    /** @phpstan-param list<DDC3785Attribute> $attributes */
     public function __construct(
         #[Id]
         #[GeneratedValue(strategy: 'NONE')]
@@ -94,7 +94,7 @@ public function getId(): DDC3785AssetId
         return $this->id;
     }
 
-    /** @psalm-return Collection<int, DDC3785Attribute> */
+    /** @phpstan-return Collection<int, DDC3785Attribute> */
     public function getAttributes()
     {
         return $this->attributes;
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC440Test.php b/tests/Tests/ORM/Functional/Ticket/DDC440Test.php
index b6b1e8bb542..c19f341bd52 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC440Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC440Test.php
@@ -149,7 +149,7 @@ class DDC440Client
     #[OneToOne(targetEntity: 'DDC440Phone', fetch: 'EAGER')]
     protected $mainPhone;
 
-    /** @psalm-var Collection<int, DDC440Phone> */
+    /** @phpstan-var Collection<int, DDC440Phone> */
     #[OneToMany(targetEntity: 'DDC440Phone', mappedBy: 'client', cascade: ['persist', 'remove'], fetch: 'EAGER', indexBy: 'id')]
     #[OrderBy(['number' => 'ASC'])]
     protected $phones;
@@ -178,7 +178,7 @@ public function addPhone(DDC440Phone $value): void
         $value->setClient($this, false);
     }
 
-    /** @psalm-return Collection<int, DDC440Phone> */
+    /** @phpstan-return Collection<int, DDC440Phone> */
     public function getPhones(): Collection
     {
         return $this->phones;
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC531Test.php b/tests/Tests/ORM/Functional/Ticket/DDC531Test.php
index adb3cbcf35a..9be32b0eca5 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC531Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC531Test.php
@@ -65,7 +65,7 @@ class DDC531Item
     #[GeneratedValue(strategy: 'AUTO')]
     public $id;
 
-    /** @psalm-var Collection<int, DDC531Item> */
+    /** @phpstan-var Collection<int, DDC531Item> */
     #[OneToMany(targetEntity: 'DDC531Item', mappedBy: 'parent')]
     protected $children;
 
@@ -84,7 +84,7 @@ public function getParent(): DDC531Item
         return $this->parent;
     }
 
-    /** @psalm-return Collection<int, DDC531Item> */
+    /** @phpstan-return Collection<int, DDC531Item> */
     public function getChildren(): Collection
     {
         return $this->children;
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC599Test.php b/tests/Tests/ORM/Functional/Ticket/DDC599Test.php
index 5d2adee5bfb..e827d3410b2 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC599Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC599Test.php
@@ -94,7 +94,7 @@ class DDC599Item
     #[GeneratedValue(strategy: 'AUTO')]
     public $id;
 
-    /** @psalm-var Collection<int, DDC599Child> */
+    /** @phpstan-var Collection<int, DDC599Child> */
     #[OneToMany(targetEntity: 'DDC599Child', mappedBy: 'parent', cascade: ['remove'])]
     protected $children;
 
@@ -103,7 +103,7 @@ public function __construct()
         $this->children = new ArrayCollection();
     }
 
-    /** @psalm-return Collection<int, DDC599Child> */
+    /** @phpstan-return Collection<int, DDC599Child> */
     public function getChildren(): Collection
     {
         return $this->children;
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC618Test.php b/tests/Tests/ORM/Functional/Ticket/DDC618Test.php
index 68a7abf5215..4ade4445e1d 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC618Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC618Test.php
@@ -141,7 +141,7 @@ class DDC618Author
     #[Column(type: 'string', length: 255)]
     public $name;
 
-    /** @psalm-var Collection<int, DDC618Book> */
+    /** @phpstan-var Collection<int, DDC618Book> */
     #[OneToMany(targetEntity: 'DDC618Book', mappedBy: 'author', cascade: ['persist'])]
     public $books;
 
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC698Test.php b/tests/Tests/ORM/Functional/Ticket/DDC698Test.php
index 089ac3c16a7..6208322be2a 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC698Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC698Test.php
@@ -84,7 +84,7 @@ class DDC698Privilege
     #[Column(name: 'name', type: 'string', length: 45)]
     protected $name;
 
-    /** @psalm-var Collection<int, DDC698Role> */
+    /** @phpstan-var Collection<int, DDC698Role> */
     #[ManyToMany(targetEntity: 'DDC698Role', mappedBy: 'privilege')]
     protected $roles;
 }
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC69Test.php b/tests/Tests/ORM/Functional/Ticket/DDC69Test.php
index 113da8cae2a..7ce3ec1131e 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC69Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC69Test.php
@@ -158,7 +158,7 @@ public function removeRelation(Relation $relation): void
         }
     }
 
-    /** @psalm-return Collection<int, Relation> */
+    /** @phpstan-return Collection<int, Relation> */
     public function getRelations(): Collection
     {
         return $this->relations;
@@ -303,7 +303,7 @@ public function removeRelation(Relation $relation): void
         }
     }
 
-    /** @psalm-return Collection<int, Relation> */
+    /** @phpstan-return Collection<int, Relation> */
     public function getRelations(): Collection
     {
         return $this->relations;
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC719Test.php b/tests/Tests/ORM/Functional/Ticket/DDC719Test.php
index b73545995ba..41bc9879b7f 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC719Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC719Test.php
@@ -68,14 +68,14 @@ class DDC719Group extends MyEntity
     #[Column(type: 'string', nullable: true)]
     protected $description;
 
-    /** @psalm-var Collection<int, DDC719Group> */
+    /** @phpstan-var Collection<int, DDC719Group> */
     #[JoinTable(name: 'groups_groups')]
     #[JoinColumn(name: 'parent_id', referencedColumnName: 'id')]
     #[InverseJoinColumn(name: 'child_id', referencedColumnName: 'id')]
     #[ManyToMany(targetEntity: 'DDC719Group', inversedBy: 'parents')]
     protected $children = null;
 
-    /** @psalm-var Collection<int, DDC719Group> */
+    /** @phpstan-var Collection<int, DDC719Group> */
     #[ManyToMany(targetEntity: 'DDC719Group', mappedBy: 'children')]
     protected $parents = null;
 
@@ -127,19 +127,19 @@ public function setDescription(string $description): void
         $this->description = $description;
     }
 
-    /** @psalm-return Collection<int, DDC719Group> */
+    /** @phpstan-return Collection<int, DDC719Group> */
     public function getChildren(): Collection
     {
         return $this->children;
     }
 
-    /** @psalm-return Collection<int, DDC719Group> */
+    /** @phpstan-return Collection<int, DDC719Group> */
     public function getParents(): Collection
     {
         return $this->parents;
     }
 
-    /** @psalm-return Collection<int, Channel> */
+    /** @phpstan-return Collection<int, Channel> */
     public function getChannels(): Collection
     {
         return $this->channels;
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC735Test.php b/tests/Tests/ORM/Functional/Ticket/DDC735Test.php
index 3d69e12f8e0..b57d3cc6bbf 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC735Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC735Test.php
@@ -64,7 +64,7 @@ class DDC735Product
     #[GeneratedValue]
     protected $id;
 
-    /** @psalm-var Collection<int, DDC735Review> */
+    /** @phpstan-var Collection<int, DDC735Review> */
     #[OneToMany(targetEntity: 'DDC735Review', mappedBy: 'product', cascade: ['persist'], orphanRemoval: true)]
     protected $reviews;
 
@@ -73,7 +73,7 @@ public function __construct()
         $this->reviews = new ArrayCollection();
     }
 
-    /** @psalm-return Collection<int, DDC735Review> */
+    /** @phpstan-return Collection<int, DDC735Review> */
     public function getReviews(): Collection
     {
         return $this->reviews;
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC809Test.php b/tests/Tests/ORM/Functional/Ticket/DDC809Test.php
index d36e2f520f3..319d3925769 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC809Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC809Test.php
@@ -73,14 +73,14 @@ class DDC809Variant
     #[Id]
     protected $variantId;
 
-    /** @psalm-var Collection<int, DDC809SpecificationValue> */
+    /** @phpstan-var Collection<int, DDC809SpecificationValue> */
     #[JoinTable(name: 'var_spec_value_test')]
     #[JoinColumn(name: 'variant_id', referencedColumnName: 'variant_id')]
     #[InverseJoinColumn(name: 'specification_value_id', referencedColumnName: 'specification_value_id')]
     #[ManyToMany(targetEntity: 'DDC809SpecificationValue', inversedBy: 'Variants')]
     protected $specificationValues;
 
-    /** @psalm-return Collection<int, DDC809SpecificationValue> */
+    /** @phpstan-return Collection<int, DDC809SpecificationValue> */
     public function getSpecificationValues(): Collection
     {
         return $this->specificationValues;
@@ -96,7 +96,7 @@ class DDC809SpecificationValue
     #[Id]
     protected $specificationValueId;
 
-    /** @psalm-var Collection<int,DDC809Variant> */
+    /** @phpstan-var Collection<int,DDC809Variant> */
     #[ManyToMany(targetEntity: 'DDC809Variant', mappedBy: 'SpecificationValues')]
     protected $variants;
 }
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC881Test.php b/tests/Tests/ORM/Functional/Ticket/DDC881Test.php
index a2e1b2c0751..49bacecee14 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC881Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC881Test.php
@@ -110,7 +110,7 @@ class DDC881User
     #[Column(type: 'string', length: 255)]
     private string|null $name = null;
 
-    /** @psalm-var Collection<int, DDC881PhoneNumber> */
+    /** @phpstan-var Collection<int, DDC881PhoneNumber> */
     #[OneToMany(targetEntity: 'DDC881PhoneNumber', mappedBy: 'id')]
     private $phoneNumbers;
 
@@ -139,7 +139,7 @@ class DDC881PhoneNumber
     #[Column(type: 'string', length: 255)]
     private string|null $phonenumber = null;
 
-    /** @psalm-var Collection<int, DDC881PhoneCall> */
+    /** @phpstan-var Collection<int, DDC881PhoneCall> */
     #[OneToMany(targetEntity: 'DDC881PhoneCall', mappedBy: 'phonenumber')]
     private $calls;
 
@@ -163,7 +163,7 @@ public function setPhoneNumber(string $phoneNumber): void
         $this->phonenumber = $phoneNumber;
     }
 
-    /** @psalm-var Collection<int, DDC881PhoneCall> */
+    /** @phpstan-var Collection<int, DDC881PhoneCall> */
     public function getCalls(): Collection
     {
         return $this->calls;
diff --git a/tests/Tests/ORM/Functional/Ticket/DDC992Test.php b/tests/Tests/ORM/Functional/Ticket/DDC992Test.php
index 9649f573438..9648f278f6e 100644
--- a/tests/Tests/ORM/Functional/Ticket/DDC992Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/DDC992Test.php
@@ -138,11 +138,11 @@ public function getRoleID(): int
     #[Column(name: 'name', type: 'string', length: 45)]
     public $name;
 
-    /** @psalm-var Collection<int, DDC992Role> */
+    /** @phpstan-var Collection<int, DDC992Role> */
     #[ManyToMany(targetEntity: 'DDC992Role', mappedBy: 'extends')]
     public $extendedBy;
 
-    /** @psalm-var Collection<int, DDC992Role> */
+    /** @phpstan-var Collection<int, DDC992Role> */
     #[JoinTable(name: 'RoleRelations')]
     #[JoinColumn(name: 'roleID', referencedColumnName: 'roleID')]
     #[InverseJoinColumn(name: 'extendsRoleID', referencedColumnName: 'roleID')]
diff --git a/tests/Tests/ORM/Functional/Ticket/GH11341Test.php b/tests/Tests/ORM/Functional/Ticket/GH11341Test.php
index 5c35dfe86c3..f3527afb752 100644
--- a/tests/Tests/ORM/Functional/Ticket/GH11341Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/GH11341Test.php
@@ -58,8 +58,8 @@ public static function dqlStatementsForInstanceOf(): Generator
     }
 
     /**
-     * @psalm-param class-string $baseClass
-     * @psalm-param class-string $inheritedClass
+     * @phpstan-param class-string $baseClass
+     * @phpstan-param class-string $inheritedClass
      */
     #[DataProvider('dqlStatementsForInstanceOf')]
     public function testInstanceOf(string $baseClass, string $inheritedClass): void
diff --git a/tests/Tests/ORM/Functional/Ticket/GH5762Test.php b/tests/Tests/ORM/Functional/Ticket/GH5762Test.php
index 522eba50f6e..3956e06d57f 100644
--- a/tests/Tests/ORM/Functional/Ticket/GH5762Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/GH5762Test.php
@@ -111,7 +111,7 @@ private function createData(): void
 #[Entity]
 class GH5762Driver
 {
-    /** @psalm-var Collection<int, GH5762DriverRide> */
+    /** @phpstan-var Collection<int, GH5762DriverRide> */
     #[OneToMany(targetEntity: 'GH5762DriverRide', mappedBy: 'driver')]
     public $driverRides;
 
@@ -150,7 +150,7 @@ public function __construct(
 #[Entity]
 class GH5762Car
 {
-    /** @psalm-var Collection<int, GH5762DriverRide> */
+    /** @phpstan-var Collection<int, GH5762DriverRide> */
     #[OneToMany(targetEntity: 'GH5762DriverRide', mappedBy: 'car')]
     public $carRides;
 
diff --git a/tests/Tests/ORM/Functional/Ticket/GH6029Test.php b/tests/Tests/ORM/Functional/Ticket/GH6029Test.php
index fd42ff8b3c2..5ac7908cc14 100644
--- a/tests/Tests/ORM/Functional/Ticket/GH6029Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/GH6029Test.php
@@ -95,7 +95,7 @@ class GH6029User
     #[GeneratedValue]
     public $id;
 
-    /** @psalm-var Collection<int, GH6029Group> */
+    /** @phpstan-var Collection<int, GH6029Group> */
     #[ManyToMany(targetEntity: GH6029Group::class, cascade: ['all'])]
     public $groups;
 
@@ -134,7 +134,7 @@ class GH6029Product
     #[GeneratedValue]
     public $id;
 
-    /** @psalm-var Collection<int,GH6029Feature> */
+    /** @phpstan-var Collection<int,GH6029Feature> */
     #[OneToMany(targetEntity: GH6029Feature::class, mappedBy: 'product', cascade: ['all'])]
     public $features;
 
diff --git a/tests/Tests/ORM/Functional/Ticket/GH6362Test.php b/tests/Tests/ORM/Functional/Ticket/GH6362Test.php
index 11f8f5ec632..ccc734a1150 100644
--- a/tests/Tests/ORM/Functional/Ticket/GH6362Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/GH6362Test.php
@@ -111,7 +111,7 @@ abstract class GH6362Base
     #[GeneratedValue]
     protected $id;
 
-    /** @psalm-var Collection<int, GH6362Start> */
+    /** @phpstan-var Collection<int, GH6362Start> */
     #[OneToMany(targetEntity: 'GH6362Start', mappedBy: 'bases')]
     private $starts;
 }
@@ -119,7 +119,7 @@ abstract class GH6362Base
 #[Entity]
 class GH6362Child extends GH6362Base
 {
-    /** @psalm-var Collection<int, GH6362Join> */
+    /** @phpstan-var Collection<int, GH6362Join> */
     #[OneToMany(targetEntity: 'GH6362Join', mappedBy: 'child')]
     private $joins;
 }
diff --git a/tests/Tests/ORM/Functional/Ticket/GH6531Test.php b/tests/Tests/ORM/Functional/Ticket/GH6531Test.php
index f4a7f30934d..27f2a0a8f47 100644
--- a/tests/Tests/ORM/Functional/Ticket/GH6531Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/GH6531Test.php
@@ -113,7 +113,7 @@ class GH6531Article
     #[GeneratedValue]
     public $id;
 
-    /** @psalm-var Collection<string, GH6531ArticleAttribute> */
+    /** @phpstan-var Collection<string, GH6531ArticleAttribute> */
     #[OneToMany(targetEntity: GH6531ArticleAttribute::class, mappedBy: 'article', cascade: ['ALL'], indexBy: 'attribute')]
     public $attributes;
 
@@ -148,7 +148,7 @@ class GH6531Order
     #[GeneratedValue]
     public $id;
 
-    /** @psalm-var Collection<int, GH6531OrderItem> */
+    /** @phpstan-var Collection<int, GH6531OrderItem> */
     #[OneToMany(targetEntity: GH6531OrderItem::class, mappedBy: 'order', cascade: ['ALL'])]
     public $items;
 
diff --git a/tests/Tests/ORM/Functional/Ticket/GH7062Test.php b/tests/Tests/ORM/Functional/Ticket/GH7062Test.php
index d16c204ba07..b8de944a086 100644
--- a/tests/Tests/ORM/Functional/Ticket/GH7062Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/GH7062Test.php
@@ -100,7 +100,7 @@ class GH7062Ranking
 {
     /**
      * @var Collection|GH7062RankingPosition[]
-     * @psalm-var Collection<GH7062RankingPosition>
+     * @phpstan-var Collection<GH7062RankingPosition>
      */
     #[OneToMany(targetEntity: GH7062RankingPosition::class, mappedBy: 'ranking', cascade: ['all'])]
     public $positions;
diff --git a/tests/Tests/ORM/Functional/Ticket/GH7767Test.php b/tests/Tests/ORM/Functional/Ticket/GH7767Test.php
index f60cfac092a..2eb32dd7c92 100644
--- a/tests/Tests/ORM/Functional/Ticket/GH7767Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/GH7767Test.php
@@ -75,7 +75,7 @@ class GH7767ParentEntity
     #[GeneratedValue]
     private int $id;
 
-    /** @psalm-var Collection<int, GH7767ChildEntity>&Selectable<int, GH7767ChildEntity> */
+    /** @phpstan-var Collection<int, GH7767ChildEntity>&Selectable<int, GH7767ChildEntity> */
     #[OneToMany(targetEntity: GH7767ChildEntity::class, mappedBy: 'parent', fetch: 'EXTRA_LAZY', cascade: ['persist'])]
     #[OrderBy(['position' => 'ASC'])]
     private $children;
@@ -85,7 +85,7 @@ public function addChild(int $position): void
         $this->children[] = new GH7767ChildEntity($this, $position);
     }
 
-    /** @psalm-return Collection<int, GH7767ChildEntity>&Selectable<int, GH7767ChildEntity> */
+    /** @phpstan-return Collection<int, GH7767ChildEntity>&Selectable<int, GH7767ChildEntity> */
     public function getChildren(): Collection
     {
         return $this->children;
diff --git a/tests/Tests/ORM/Functional/Ticket/GH7836Test.php b/tests/Tests/ORM/Functional/Ticket/GH7836Test.php
index 0aef74541bf..1cdaea018a1 100644
--- a/tests/Tests/ORM/Functional/Ticket/GH7836Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/GH7836Test.php
@@ -116,7 +116,7 @@ public function addChild(int $position, string $name): void
         $this->children[] = new GH7836ChildEntity($this, $position, $name);
     }
 
-    /** @psalm-return Collection<int, GH7836ChildEntity>&Selectable<int, GH7836ChildEntity> */
+    /** @phpstan-return Collection<int, GH7836ChildEntity>&Selectable<int, GH7836ChildEntity> */
     public function getChildren(): Collection
     {
         return $this->children;
diff --git a/tests/Tests/ORM/Functional/Ticket/GH8217Test.php b/tests/Tests/ORM/Functional/Ticket/GH8217Test.php
index 21b4db18abb..6747f5e084b 100644
--- a/tests/Tests/ORM/Functional/Ticket/GH8217Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/GH8217Test.php
@@ -54,7 +54,7 @@ class GH8217Collection
     #[GeneratedValue]
     public $id;
 
-    /** @psalm-var Collection<int, GH8217CollectionItem> */
+    /** @phpstan-var Collection<int, GH8217CollectionItem> */
     #[OneToMany(targetEntity: 'GH8217CollectionItem', mappedBy: 'collection', cascade: ['persist', 'remove'], orphanRemoval: true)]
     public $items;
 
diff --git a/tests/Tests/ORM/Functional/Ticket/GH9109Test.php b/tests/Tests/ORM/Functional/Ticket/GH9109Test.php
index 8bae1d8cc61..cf32fbf0a58 100644
--- a/tests/Tests/ORM/Functional/Ticket/GH9109Test.php
+++ b/tests/Tests/ORM/Functional/Ticket/GH9109Test.php
@@ -100,7 +100,7 @@ class GH9109Product
 
     /**
      * @var Collection|GH9109User[]
-     * @psalm-var Collection<int, GH9109User>
+     * @phpstan-var Collection<int, GH9109User>
      */
     #[ManyToMany(targetEntity: 'GH9109User')]
     private $buyers;
@@ -125,7 +125,7 @@ public function getTitle(): string
         return $this->title;
     }
 
-    /** @psalm-return Collection<int, GH9109User> */
+    /** @phpstan-return Collection<int, GH9109User> */
     public function getBuyers(): Collection
     {
         return $this->buyers;
diff --git a/tests/Tests/ORM/Functional/ValueObjectsTest.php b/tests/Tests/ORM/Functional/ValueObjectsTest.php
index 3186e71d357..ad77a29b29f 100644
--- a/tests/Tests/ORM/Functional/ValueObjectsTest.php
+++ b/tests/Tests/ORM/Functional/ValueObjectsTest.php
@@ -346,7 +346,7 @@ public function testThrowsExceptionOnInfiniteEmbeddableNesting(
         $this->createSchemaForModels(__NAMESPACE__ . '\\' . $embeddableClassName);
     }
 
-    /** @psalm-return list<array{string, string}> */
+    /** @phpstan-return list<array{string, string}> */
     public static function getInfiniteEmbeddableNestingData(): array
     {
         return [
diff --git a/tests/Tests/ORM/Hydration/ArrayHydratorTest.php b/tests/Tests/ORM/Hydration/ArrayHydratorTest.php
index 33d08edf7d1..db3c5bd4659 100644
--- a/tests/Tests/ORM/Hydration/ArrayHydratorTest.php
+++ b/tests/Tests/ORM/Hydration/ArrayHydratorTest.php
@@ -17,7 +17,7 @@
 
 class ArrayHydratorTest extends HydrationTestCase
 {
-    /** @psalm-return list<array{int|string}> */
+    /** @phpstan-return list<array{int|string}> */
     public static function provideDataForUserEntityResult(): array
     {
         return [
diff --git a/tests/Tests/ORM/Hydration/ObjectHydratorTest.php b/tests/Tests/ORM/Hydration/ObjectHydratorTest.php
index 0a1f369bd1f..526817263a7 100644
--- a/tests/Tests/ORM/Hydration/ObjectHydratorTest.php
+++ b/tests/Tests/ORM/Hydration/ObjectHydratorTest.php
@@ -38,7 +38,7 @@
 
 class ObjectHydratorTest extends HydrationTestCase
 {
-    /** @psalm-return list<array{mixed}> */
+    /** @phpstan-return list<array{mixed}> */
     public static function provideDataForUserEntityResult(): array
     {
         return [
@@ -47,7 +47,7 @@ public static function provideDataForUserEntityResult(): array
         ];
     }
 
-    /** @psalm-return list<array{mixed, mixed}> */
+    /** @phpstan-return list<array{mixed, mixed}> */
     public static function provideDataForMultipleRootEntityResult(): array
     {
         return [
@@ -58,7 +58,7 @@ public static function provideDataForMultipleRootEntityResult(): array
         ];
     }
 
-    /** @psalm-return list<array{mixed}> */
+    /** @phpstan-return list<array{mixed}> */
     public static function provideDataForProductEntityResult(): array
     {
         return [
diff --git a/tests/Tests/ORM/Internal/HydrationCompleteHandlerTest.php b/tests/Tests/ORM/Internal/HydrationCompleteHandlerTest.php
index 51cf37e0494..2bdeab19498 100644
--- a/tests/Tests/ORM/Internal/HydrationCompleteHandlerTest.php
+++ b/tests/Tests/ORM/Internal/HydrationCompleteHandlerTest.php
@@ -145,7 +145,7 @@ public function testSkipsDeferredPostLoadOfMetadataWithNoInvokedListeners(): voi
         $this->handler->hydrationComplete();
     }
 
-    /** @psalm-return list<array{int}> */
+    /** @phpstan-return list<array{int}> */
     public static function invocationFlagProvider(): array
     {
         return [
diff --git a/tests/Tests/ORM/Mapping/XmlMappingDriverTest.php b/tests/Tests/ORM/Mapping/XmlMappingDriverTest.php
index 5426da45c91..474c623f352 100644
--- a/tests/Tests/ORM/Mapping/XmlMappingDriverTest.php
+++ b/tests/Tests/ORM/Mapping/XmlMappingDriverTest.php
@@ -176,7 +176,7 @@ public function testValidateXmlSchema(
         $this->assertEquals($metadata->getAssociationNames(), $associationNames);
     }
 
-    /** @psalm-return []array{0: class-string, 1: string, 2: list<string>, 3: list<string>} */
+    /** @phpstan-return []array{0: class-string, 1: string, 2: list<string>, 3: list<string>} */
     public static function dataValidSchema(): array
     {
         return [
diff --git a/tests/Tests/ORM/ORMInvalidArgumentExceptionTest.php b/tests/Tests/ORM/ORMInvalidArgumentExceptionTest.php
index a4ce25192dc..00536a046b1 100644
--- a/tests/Tests/ORM/ORMInvalidArgumentExceptionTest.php
+++ b/tests/Tests/ORM/ORMInvalidArgumentExceptionTest.php
@@ -16,7 +16,7 @@
 #[CoversClass(ORMInvalidArgumentException::class)]
 class ORMInvalidArgumentExceptionTest extends TestCase
 {
-    /** @psalm-return list<array{mixed, string}> */
+    /** @phpstan-return list<array{mixed, string}> */
     public static function invalidEntityNames(): array
     {
         return [
diff --git a/tests/Tests/ORM/Query/LanguageRecognitionTest.php b/tests/Tests/ORM/Query/LanguageRecognitionTest.php
index 31181de1a44..02b42fb5ba6 100644
--- a/tests/Tests/ORM/Query/LanguageRecognitionTest.php
+++ b/tests/Tests/ORM/Query/LanguageRecognitionTest.php
@@ -43,7 +43,7 @@ public function assertInvalidDQL(string $dql): void
         $this->parseDql($dql);
     }
 
-    /** @psalm-param array<string, mixed> $hints */
+    /** @phpstan-param array<string, mixed> $hints */
     public function parseDql(string $dql, array $hints = []): ParserResult
     {
         $query = $this->entityManager->createQuery($dql);
@@ -92,7 +92,7 @@ public function testRejectsInvalidDQL(string $dql): void
         $this->parseDql($dql);
     }
 
-    /** @psalm-return list<array{string}> */
+    /** @phpstan-return list<array{string}> */
     public static function invalidDQL(): array
     {
         return [
diff --git a/tests/Tests/ORM/Query/LexerTest.php b/tests/Tests/ORM/Query/LexerTest.php
index 9ddd2811a27..bfce16ab7b7 100644
--- a/tests/Tests/ORM/Query/LexerTest.php
+++ b/tests/Tests/ORM/Query/LexerTest.php
@@ -184,7 +184,7 @@ public function testScannerTokenizesASimpleQueryCorrectly(): void
         self::assertFalse($lexer->moveNext());
     }
 
-    /** @psalm-return list<array{int, string}> */
+    /** @phpstan-return list<array{int, string}> */
     public static function provideTokens(): array
     {
         return [
diff --git a/tests/Tests/ORM/Query/ParameterTypeInfererTest.php b/tests/Tests/ORM/Query/ParameterTypeInfererTest.php
index 3a983af42a9..9893979cf59 100644
--- a/tests/Tests/ORM/Query/ParameterTypeInfererTest.php
+++ b/tests/Tests/ORM/Query/ParameterTypeInfererTest.php
@@ -19,7 +19,7 @@
 
 class ParameterTypeInfererTest extends OrmTestCase
 {
-    /** @psalm-return Generator<string, array{mixed, (ParameterType::*|ArrayParameterType::*|string)}> */
+    /** @phpstan-return Generator<string, array{mixed, (ParameterType::*|ArrayParameterType::*|string)}> */
     public static function providerParameterTypeInferer(): Generator
     {
         yield 'integer' => [1, Types::INTEGER];
diff --git a/tests/Tests/ORM/Query/ParserTest.php b/tests/Tests/ORM/Query/ParserTest.php
index 430177b1fcc..c260455d712 100644
--- a/tests/Tests/ORM/Query/ParserTest.php
+++ b/tests/Tests/ORM/Query/ParserTest.php
@@ -62,7 +62,7 @@ public function testMatchFailure(TokenType $expectedToken, string $inputString):
         $parser->match($expectedToken);
     }
 
-    /** @psalm-return list<array{int, string}> */
+    /** @phpstan-return list<array{int, string}> */
     public static function validMatches(): array
     {
         /*
@@ -83,7 +83,7 @@ public static function validMatches(): array
         ];
     }
 
-    /** @psalm-return list<array{int, string}> */
+    /** @phpstan-return list<array{int, string}> */
     public static function invalidMatches(): array
     {
         return [
diff --git a/tests/Tests/ORM/Query/QueryExpressionVisitorTest.php b/tests/Tests/ORM/Query/QueryExpressionVisitorTest.php
index 54cc54d5546..9ece94b5d2a 100644
--- a/tests/Tests/ORM/Query/QueryExpressionVisitorTest.php
+++ b/tests/Tests/ORM/Query/QueryExpressionVisitorTest.php
@@ -36,7 +36,7 @@ public function testWalkComparison(CriteriaComparison $criteriaExpr, QueryBuilde
     }
 
     /**
-     * @psalm-return list<array{
+     * @phpstan-return list<array{
      *                   0: CriteriaComparison,
      *                   1: QueryBuilder\Comparison|QueryBuilder\Func|string,
      *                   2?: Parameter,
diff --git a/tests/Tests/ORM/Query/QueryTest.php b/tests/Tests/ORM/Query/QueryTest.php
index 03acc8ce0d0..5e0bf0685f9 100644
--- a/tests/Tests/ORM/Query/QueryTest.php
+++ b/tests/Tests/ORM/Query/QueryTest.php
@@ -82,7 +82,7 @@ public function testSetParameters(): void
         self::assertEquals($parameters, $query->getParameters());
     }
 
-    /** @psalm-param LockMode::* $lockMode */
+    /** @phpstan-param LockMode::* $lockMode */
     #[DataProvider('provideLockModes')]
     public function testSetLockMode(LockMode|int $lockMode): void
     {
@@ -97,7 +97,7 @@ public function testSetLockMode(LockMode|int $lockMode): void
         self::assertSame($lockMode, $query->getHint(Query::HINT_LOCK_MODE));
     }
 
-    /** @psalm-return list<array{LockMode::*}> */
+    /** @phpstan-return list<array{LockMode::*}> */
     public static function provideLockModes(): array
     {
         return [
@@ -238,7 +238,7 @@ public function testExplicitCollectionParameters(): void
         self::assertEquals($cities, $parameter->getValue());
     }
 
-    /** @psalm-return Generator<string, array{iterable}> */
+    /** @phpstan-return Generator<string, array{iterable}> */
     public static function provideProcessParameterValueIterable(): Generator
     {
         $baseArray = [
diff --git a/tests/Tests/ORM/Query/SelectSqlGenerationTest.php b/tests/Tests/ORM/Query/SelectSqlGenerationTest.php
index 6b7d9585462..02c4921c54f 100644
--- a/tests/Tests/ORM/Query/SelectSqlGenerationTest.php
+++ b/tests/Tests/ORM/Query/SelectSqlGenerationTest.php
@@ -2128,7 +2128,7 @@ public function testHavingRegressionUsingVariableWithMathOperatorsExpression($op
         );
     }
 
-    /** @psalm-return list<array{string}> */
+    /** @phpstan-return list<array{string}> */
     public static function mathematicOperatorsProvider(): array
     {
         return [['+'], ['-'], ['*'], ['/']];
diff --git a/tests/Tests/ORM/Tools/AttachEntityListenersListenerTest.php b/tests/Tests/ORM/Tools/AttachEntityListenersListenerTest.php
index 82068f89aed..26fc5abe8d2 100644
--- a/tests/Tests/ORM/Tools/AttachEntityListenersListenerTest.php
+++ b/tests/Tests/ORM/Tools/AttachEntityListenersListenerTest.php
@@ -170,7 +170,7 @@ class AttachEntityListenersListenerTestBarEntity
 
 class AttachEntityListenersListenerTestListener
 {
-    /** @psalm-var array<string,list<list<mixed>>> */
+    /** @phpstan-var array<string,list<list<mixed>>> */
     public $calls;
 
     public function prePersist(): void
@@ -191,7 +191,7 @@ public function postPersist(): void
 
 class AttachEntityListenersListenerTestListener2
 {
-    /** @psalm-var array<string,list<list<mixed>>> */
+    /** @phpstan-var array<string,list<list<mixed>>> */
     public $calls;
 
     public function prePersist(): void
diff --git a/tests/Tests/ORM/Tools/DebugTest.php b/tests/Tests/ORM/Tools/DebugTest.php
index 8cf1a90ac59..abd37306573 100644
--- a/tests/Tests/ORM/Tools/DebugTest.php
+++ b/tests/Tests/ORM/Tools/DebugTest.php
@@ -122,7 +122,7 @@ public function testCollectionsAreCastIntoArrays(): void
         self::assertEquals(['foo', 'bar'], $var);
     }
 
-    /** @psalm-return array<string, array{TestAsset\ParentClass, mixed[]}> */
+    /** @phpstan-return array<string, array{TestAsset\ParentClass, mixed[]}> */
     public static function provideAttributesCases(): iterable
     {
         return [
diff --git a/tests/Tests/ORM/Tools/Pagination/PaginationTestCase.php b/tests/Tests/ORM/Tools/Pagination/PaginationTestCase.php
index 2532f5fe09c..4a5c6e47875 100644
--- a/tests/Tests/ORM/Tools/Pagination/PaginationTestCase.php
+++ b/tests/Tests/ORM/Tools/Pagination/PaginationTestCase.php
@@ -146,7 +146,7 @@ class Group
     #[GeneratedValue]
     public $id;
 
-    /** @psalm-var Collection<int, User> */
+    /** @phpstan-var Collection<int, User> */
     #[ManyToMany(targetEntity: 'User', mappedBy: 'groups')]
     public $users;
 }
@@ -160,7 +160,7 @@ class User
     #[GeneratedValue]
     public $id;
 
-    /** @psalm-var Collection<int, Group> */
+    /** @phpstan-var Collection<int, Group> */
     #[JoinTable(name: 'user_group')]
     #[JoinColumn(name: 'user_id', referencedColumnName: 'id')]
     #[InverseJoinColumn(name: 'group_id', referencedColumnName: 'id')]
diff --git a/tests/Tests/ORM/Tools/ResolveTargetEntityListenerTest.php b/tests/Tests/ORM/Tools/ResolveTargetEntityListenerTest.php
index 696f7927a15..779a7740ac7 100644
--- a/tests/Tests/ORM/Tools/ResolveTargetEntityListenerTest.php
+++ b/tests/Tests/ORM/Tools/ResolveTargetEntityListenerTest.php
@@ -123,14 +123,14 @@ class ResolveTargetEntity implements ResolveTarget
     #[GeneratedValue(strategy: 'AUTO')]
     private int $id;
 
-    /** @psalm-var Collection<int, Target> */
+    /** @phpstan-var Collection<int, Target> */
     #[ManyToMany(targetEntity: 'Doctrine\Tests\ORM\Tools\Target')]
     private $manyToMany;
 
     #[ManyToOne(targetEntity: 'Doctrine\Tests\ORM\Tools\ResolveTarget', inversedBy: 'oneToMany')]
     private ResolveTarget $manyToOne;
 
-    /** @psalm-var Collection<int, ResolveTarget> */
+    /** @phpstan-var Collection<int, ResolveTarget> */
     #[OneToMany(targetEntity: 'Doctrine\Tests\ORM\Tools\ResolveTarget', mappedBy: 'manyToOne')]
     private $oneToMany;
 
diff --git a/tests/Tests/ORM/Tools/SchemaToolTest.php b/tests/Tests/ORM/Tools/SchemaToolTest.php
index a1f3e77d70c..36037fcf569 100644
--- a/tests/Tests/ORM/Tools/SchemaToolTest.php
+++ b/tests/Tests/ORM/Tools/SchemaToolTest.php
@@ -492,7 +492,7 @@ class GH6830Category
     #[Column(type: 'string', length: 8, options: ['fixed' => true, 'collation' => 'latin1_bin', 'foo' => 'bar'])]
     public $id;
 
-    /** @psalm-var Collection<int, GH6830Board> */
+    /** @phpstan-var Collection<int, GH6830Board> */
     #[OneToMany(targetEntity: GH6830Board::class, mappedBy: 'category')]
     public $boards;
 }
diff --git a/tests/Tests/ORM/Tools/SchemaValidatorTest.php b/tests/Tests/ORM/Tools/SchemaValidatorTest.php
index c4e01c6f24e..8942380ce5b 100644
--- a/tests/Tests/ORM/Tools/SchemaValidatorTest.php
+++ b/tests/Tests/ORM/Tools/SchemaValidatorTest.php
@@ -475,12 +475,12 @@ class DDC3322One
     #[GeneratedValue]
     private int $id;
 
-    /** @psalm-var Collection<int, DDC3322ValidEntity1> */
+    /** @phpstan-var Collection<int, DDC3322ValidEntity1> */
     #[OneToMany(targetEntity: 'DDC3322ValidEntity1', mappedBy: 'oneValid')]
     #[OrderBy(['id' => 'ASC'])]
     private $validAssoc;
 
-    /** @psalm-var Collection<int, DDC3322ValidEntity1> */
+    /** @phpstan-var Collection<int, DDC3322ValidEntity1> */
     #[OneToMany(targetEntity: 'DDC3322ValidEntity1', mappedBy: 'oneInvalid')]
     #[OrderBy(['invalidField' => 'ASC'])]
     private $invalidAssoc;
@@ -494,12 +494,12 @@ class DDC3322Two
     #[GeneratedValue]
     private int $id;
 
-    /** @psalm-var Collection<int, DDC3322ValidEntity1> */
+    /** @phpstan-var Collection<int, DDC3322ValidEntity1> */
     #[OneToMany(targetEntity: 'DDC3322ValidEntity1', mappedBy: 'twoValid')]
     #[OrderBy(['manyToOne' => 'ASC'])]
     private $validAssoc;
 
-    /** @psalm-var Collection<int, DDC3322ValidEntity1> */
+    /** @phpstan-var Collection<int, DDC3322ValidEntity1> */
     #[OneToMany(targetEntity: 'DDC3322ValidEntity1', mappedBy: 'twoInvalid')]
     #[OrderBy(['oneToMany' => 'ASC'])]
     private $invalidAssoc;
@@ -517,7 +517,7 @@ class DDC3322Three
     #[OrderBy(['oneToOneOwning' => 'ASC'])]
     private DDC3322ValidEntity1 $validAssoc;
 
-    /** @psalm-var Collection<int, DDC3322ValidEntity1> */
+    /** @phpstan-var Collection<int, DDC3322ValidEntity1> */
     #[OneToMany(targetEntity: 'DDC3322ValidEntity1', mappedBy: 'threeInvalid')]
     #[OrderBy(['oneToOneInverse' => 'ASC'])]
     private $invalidAssoc;
@@ -554,7 +554,7 @@ class Issue9095Child extends Issue9095AbstractChild
 #[MappedSuperclass]
 class InvalidMappedSuperClass
 {
-    /** @psalm-var Collection<int, self> */
+    /** @phpstan-var Collection<int, self> */
     #[ManyToMany(targetEntity: 'InvalidMappedSuperClass', mappedBy: 'invalid')]
     private $selfWhatever;
 }
diff --git a/tests/Tests/ORM/UnitOfWorkTest.php b/tests/Tests/ORM/UnitOfWorkTest.php
index 2a421c6687d..238848696c3 100644
--- a/tests/Tests/ORM/UnitOfWorkTest.php
+++ b/tests/Tests/ORM/UnitOfWorkTest.php
@@ -330,7 +330,7 @@ public function testAddToIdentityMapValidIdentifiers(object $entity, string $idH
         self::assertSame($entity, $this->_unitOfWork->getByIdHash($idHash, $entity::class));
     }
 
-    /** @psalm-return array<string, array{object, string}> */
+    /** @phpstan-return array<string, array{object, string}> */
     public static function entitiesWithValidIdentifiersProvider(): array
     {
         $emptyString = new EntityWithStringIdentifier();
@@ -385,7 +385,7 @@ public function testAddToIdentityMapInvalidIdentifiers(object $entity, array $id
         $this->_unitOfWork->registerManaged($entity, $identifier, []);
     }
 
-    /** @psalm-return array<string, array{object, array<string, mixed>}> */
+    /** @phpstan-return array<string, array{object, array<string, mixed>}> */
     public static function entitiesWithInvalidIdentifiersProvider(): array
     {
         $firstNullString = new EntityWithCompositeStringIdentifier();
diff --git a/tests/Tests/OrmFunctionalTestCase.php b/tests/Tests/OrmFunctionalTestCase.php
index edec9ca261e..f2cf5f81f18 100644
--- a/tests/Tests/OrmFunctionalTestCase.php
+++ b/tests/Tests/OrmFunctionalTestCase.php
@@ -1068,7 +1068,7 @@ final protected function assertQueryCount(int $expectedCount, string $message =
         self::assertThat($this->getQueryLog()->queries, new Count($expectedCount), $message);
     }
 
-    /** @psalm-return array{sql: string, params: array|null, types: array|null} */
+    /** @phpstan-return array{sql: string, params: array|null, types: array|null} */
     final protected function getLastLoggedQuery(int $index = 0): array
     {
         $queries   = $this->getQueryLog()->queries;
diff --git a/tests/Tests/TestUtil.php b/tests/Tests/TestUtil.php
index 7c75fcff991..33869c3b174 100644
--- a/tests/Tests/TestUtil.php
+++ b/tests/Tests/TestUtil.php
@@ -160,7 +160,7 @@ private static function getPrivilegedConnectionParameters(): array
         return $parameters;
     }
 
-    /** @psalm-return array<string, mixed> */
+    /** @phpstan-return array<string, mixed> */
     private static function getTestConnectionParameters(): array
     {
         if (! isset($GLOBALS['db_driver'])) {