diff --git a/.gitattributes b/.gitattributes index 1b71dc4e5b..cec212e070 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 e0e880ef39..9fc2664859 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.2.0" + uses: "doctrine/.github/.github/workflows/coding-standards.yml@6.0.0" diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 6095959895..6ab4e1519b 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -319,6 +319,8 @@ jobs: upload_coverage: name: "Upload coverage to Codecov" runs-on: "ubuntu-22.04" + # Only run on PRs from forks + if: "github.event.pull_request.head.repo.full_name != github.repository" needs: - "phpunit-smoke-check" - "phpunit-postgres" diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index bf2ba69d77..84bf616c87 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.2.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 f8bd8bce82..0a35bee661 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.2.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 70b0610a03..866188a855 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: @@ -35,7 +33,7 @@ jobs: uses: shivammathur/setup-php@v2 with: coverage: none - php-version: "8.3" + php-version: "8.4" tools: cs2pr - name: Install dependencies with Composer @@ -43,23 +41,3 @@ jobs: - name: Run static analysis with phpstan/phpstan run: "vendor/bin/phpstan analyse --error-format=checkstyle | cs2pr" - - static-analysis-psalm: - name: Static Analysis with Psalm - runs-on: ubuntu-22.04 - - steps: - - name: "Checkout code" - uses: "actions/checkout@v4" - - - name: Install PHP - uses: shivammathur/setup-php@v2 - with: - coverage: none - php-version: "8.3" - - - 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 0ec779faf8..fbf6106d7e 100644 --- a/composer.json +++ b/composer.json @@ -41,13 +41,12 @@ "phpbench/phpbench": "^1.0", "phpdocumentor/guides-cli": "^1.4", "phpstan/extension-installer": "^1.4", - "phpstan/phpstan": "1.12.6", - "phpstan/phpstan-deprecation-rules": "^1.2", + "phpstan/phpstan": "2.0.3", + "phpstan/phpstan-deprecation-rules": "^2", "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/phpstan-baseline.neon b/phpstan-baseline.neon index dbd8b0a286..3d462f8250 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,311 +1,3343 @@ parameters: ignoreErrors: - - message: "#^Call to an undefined method Doctrine\\\\ORM\\\\Persisters\\\\Entity\\\\EntityPersister\\:\\:getCacheRegion\\(\\)\\.$#" + message: '#^Expression "\$setCacheEntry\(\$data\)" on a separate line does not do anything\.$#' + identifier: expr.resultUnused + count: 1 + path: src/AbstractQuery.php + + - + message: '#^Expression "\$setCacheEntry\(\$stmt\)" on a separate line does not do anything\.$#' + identifier: expr.resultUnused + count: 1 + path: src/AbstractQuery.php + + - + message: '#^Method Doctrine\\ORM\\AbstractQuery\:\:getParameter\(\) should return Doctrine\\ORM\\Query\\Parameter\|null but returns Doctrine\\ORM\\Query\\Parameter\|false\|null\.$#' + identifier: return.type + count: 1 + path: src/AbstractQuery.php + + - + message: '#^Parameter \#1 \$stmt of method Doctrine\\ORM\\Internal\\Hydration\\AbstractHydrator\:\:toIterable\(\) expects Doctrine\\DBAL\\Result, Doctrine\\DBAL\\Result\|int given\.$#' + identifier: argument.type + count: 1 + path: src/AbstractQuery.php + + - + message: '#^Method Doctrine\\ORM\\Cache\\CacheFactory\:\:buildCachedEntityPersister\(\) has parameter \$metadata with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Cache/CacheFactory.php + + - + message: '#^Method Doctrine\\ORM\\Cache\\CacheFactory\:\:buildEntityHydrator\(\) has parameter \$metadata with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Cache/CacheFactory.php + + - + message: '#^Method Doctrine\\ORM\\Cache\\CollectionHydrator\:\:buildCacheEntry\(\) has parameter \$collection with generic interface Doctrine\\Common\\Collections\\Collection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Cache/CollectionHydrator.php + + - + message: '#^Method Doctrine\\ORM\\Cache\\CollectionHydrator\:\:buildCacheEntry\(\) has parameter \$collection with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Cache/CollectionHydrator.php + + - + message: '#^Method Doctrine\\ORM\\Cache\\CollectionHydrator\:\:buildCacheEntry\(\) has parameter \$collection with no value type specified in iterable type array\|\(Doctrine\\Common\\Collections\\Collection&iterable\)\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Cache/CollectionHydrator.php + + - + message: '#^Method Doctrine\\ORM\\Cache\\CollectionHydrator\:\:buildCacheEntry\(\) has parameter \$metadata with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Cache/CollectionHydrator.php + + - + message: '#^Method Doctrine\\ORM\\Cache\\CollectionHydrator\:\:loadCacheEntry\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Cache/CollectionHydrator.php + + - + message: '#^Method Doctrine\\ORM\\Cache\\CollectionHydrator\:\:loadCacheEntry\(\) has parameter \$metadata with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Cache/CollectionHydrator.php + + - + message: '#^Method Doctrine\\ORM\\Cache\\DefaultCache\:\:buildCollectionCacheKey\(\) has parameter \$metadata with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Cache/DefaultCache.php + + - + message: '#^Method Doctrine\\ORM\\Cache\\DefaultCache\:\:buildEntityCacheKey\(\) has parameter \$metadata with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Cache/DefaultCache.php + + - + message: '#^Method Doctrine\\ORM\\Cache\\DefaultCache\:\:toIdentifierArray\(\) has parameter \$metadata with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Cache/DefaultCache.php + + - + message: '#^Method Doctrine\\ORM\\Cache\\DefaultCacheFactory\:\:buildCachedEntityPersister\(\) has parameter \$metadata with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Cache/DefaultCacheFactory.php + + - + message: '#^Method Doctrine\\ORM\\Cache\\DefaultCacheFactory\:\:buildEntityHydrator\(\) has parameter \$metadata with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Cache/DefaultCacheFactory.php + + - + message: '#^Method Doctrine\\ORM\\Cache\\DefaultCollectionHydrator\:\:buildCacheEntry\(\) has parameter \$collection with generic interface Doctrine\\Common\\Collections\\Collection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Cache/DefaultCollectionHydrator.php + + - + message: '#^Method Doctrine\\ORM\\Cache\\DefaultCollectionHydrator\:\:buildCacheEntry\(\) has parameter \$collection with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Cache/DefaultCollectionHydrator.php + + - + message: '#^Method Doctrine\\ORM\\Cache\\DefaultCollectionHydrator\:\:buildCacheEntry\(\) has parameter \$collection with no value type specified in iterable type array\|\(Doctrine\\Common\\Collections\\Collection&iterable\)\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Cache/DefaultCollectionHydrator.php + + - + message: '#^Method Doctrine\\ORM\\Cache\\DefaultCollectionHydrator\:\:buildCacheEntry\(\) has parameter \$metadata with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Cache/DefaultCollectionHydrator.php + + - + message: '#^Method Doctrine\\ORM\\Cache\\DefaultCollectionHydrator\:\:loadCacheEntry\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Cache/DefaultCollectionHydrator.php + + - + message: '#^Method Doctrine\\ORM\\Cache\\DefaultCollectionHydrator\:\:loadCacheEntry\(\) has parameter \$metadata with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Cache/DefaultCollectionHydrator.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$joinColumnFieldNames\.$#' + identifier: property.notFound + count: 1 + path: src/Cache/DefaultEntityHydrator.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$targetToSourceKeyColumns\.$#' + identifier: property.notFound + count: 1 + path: src/Cache/DefaultEntityHydrator.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$targetToSourceKeyColumns\.$#' + identifier: property.notFound + count: 1 + path: src/Cache/DefaultEntityHydrator.php + + - + message: '#^Call to an undefined method Doctrine\\ORM\\Persisters\\Entity\\EntityPersister\:\:getCacheRegion\(\)\.$#' + identifier: method.notFound + count: 1 + path: src/Cache/DefaultEntityHydrator.php + + - + message: '#^Method Doctrine\\ORM\\Cache\\DefaultEntityHydrator\:\:buildCacheEntry\(\) has parameter \$metadata with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Cache/DefaultEntityHydrator.php + + - + message: '#^Method Doctrine\\ORM\\Cache\\DefaultEntityHydrator\:\:loadCacheEntry\(\) has parameter \$metadata with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Cache/DefaultEntityHydrator.php + + - + message: '#^Parameter \#2 \$data of class Doctrine\\ORM\\Cache\\EntityCacheEntry constructor expects array\, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/Cache/DefaultEntityHydrator.php + + - + message: '#^Unable to resolve the template type T in call to method Doctrine\\ORM\\EntityManagerInterface\:\:getReference\(\)$#' + identifier: argument.templateType count: 1 path: src/Cache/DefaultEntityHydrator.php - - message: "#^Access to an undefined property Doctrine\\\\ORM\\\\Cache\\\\CacheEntry\\:\\:\\$class\\.$#" + message: '#^Access to an undefined property Doctrine\\ORM\\Cache\\CacheEntry\:\:\$class\.$#' + identifier: property.notFound count: 2 path: src/Cache/DefaultQueryCache.php - - message: "#^Call to an undefined method Doctrine\\\\ORM\\\\Cache\\\\CacheEntry\\:\\:resolveAssociationEntries\\(\\)\\.$#" + message: '#^Call to an undefined method Doctrine\\ORM\\Cache\\CacheEntry\:\:resolveAssociationEntries\(\)\.$#' + identifier: method.notFound count: 2 path: src/Cache/DefaultQueryCache.php - - message: "#^Call to an undefined method Doctrine\\\\ORM\\\\Persisters\\\\Entity\\\\EntityPersister\\:\\:getCacheRegion\\(\\)\\.$#" + message: '#^Call to an undefined method Doctrine\\ORM\\Persisters\\Entity\\EntityPersister\:\:getCacheRegion\(\)\.$#' + identifier: method.notFound count: 1 path: src/Cache/DefaultQueryCache.php - - message: "#^Call to an undefined method Doctrine\\\\ORM\\\\Persisters\\\\Entity\\\\EntityPersister\\:\\:storeEntityCache\\(\\)\\.$#" + message: '#^Call to an undefined method Doctrine\\ORM\\Persisters\\Entity\\EntityPersister\:\:storeEntityCache\(\)\.$#' + identifier: method.notFound + count: 2 + path: src/Cache/DefaultQueryCache.php + + - + message: '#^Method Doctrine\\ORM\\Cache\\DefaultQueryCache\:\:storeAssociationCache\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 2 + path: src/Cache/DefaultQueryCache.php + + - + message: '#^Parameter \#1 \$className of method Doctrine\\ORM\\EntityManagerInterface\:\:getClassMetadata\(\) expects string, class\-string\|false given\.$#' + identifier: argument.type + count: 2 + path: src/Cache/DefaultQueryCache.php + + - + message: '#^Parameter \#1 \$entityName of method Doctrine\\ORM\\UnitOfWork\:\:getEntityPersister\(\) expects class\-string, class\-string\|false given\.$#' + identifier: argument.type count: 2 path: src/Cache/DefaultQueryCache.php - - message: "#^Parameter \\#2 \\$key of method Doctrine\\\\ORM\\\\Cache\\\\Logging\\\\CacheLogger\\:\\:entityCacheHit\\(\\) expects Doctrine\\\\ORM\\\\Cache\\\\EntityCacheKey, Doctrine\\\\ORM\\\\Cache\\\\CacheKey given\\.$#" + message: '#^Parameter \#1 \$entityName of static method Doctrine\\ORM\\Cache\\Exception\\NonCacheableEntity\:\:fromEntity\(\) expects string, class\-string\|false given\.$#' + identifier: argument.type + count: 1 + path: src/Cache/DefaultQueryCache.php + + - + message: '#^Parameter \#1 \$result of class Doctrine\\ORM\\Cache\\QueryCacheEntry constructor expects array\, array\\>\> given\.$#' + identifier: argument.type + count: 1 + path: src/Cache/DefaultQueryCache.php + + - + message: '#^Parameter \#2 \$key of method Doctrine\\ORM\\Cache\\Logging\\CacheLogger\:\:entityCacheHit\(\) expects Doctrine\\ORM\\Cache\\EntityCacheKey, Doctrine\\ORM\\Cache\\CacheKey given\.$#' + identifier: argument.type count: 2 path: src/Cache/DefaultQueryCache.php - - message: "#^Parameter \\#2 \\$key of method Doctrine\\\\ORM\\\\Cache\\\\Logging\\\\CacheLogger\\:\\:entityCacheMiss\\(\\) expects Doctrine\\\\ORM\\\\Cache\\\\EntityCacheKey, Doctrine\\\\ORM\\\\Cache\\\\CacheKey given\\.$#" + message: '#^Parameter \#2 \$key of method Doctrine\\ORM\\Cache\\Logging\\CacheLogger\:\:entityCacheMiss\(\) expects Doctrine\\ORM\\Cache\\EntityCacheKey, Doctrine\\ORM\\Cache\\CacheKey given\.$#' + identifier: argument.type count: 2 path: src/Cache/DefaultQueryCache.php - - message: "#^Access to an undefined property Doctrine\\\\ORM\\\\Cache\\\\CacheEntry\\:\\:\\$identifiers\\.$#" + message: '#^Method Doctrine\\ORM\\Cache\\EntityHydrator\:\:buildCacheEntry\(\) has parameter \$metadata with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Cache/EntityHydrator.php + + - + message: '#^Method Doctrine\\ORM\\Cache\\EntityHydrator\:\:loadCacheEntry\(\) has parameter \$metadata with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Cache/EntityHydrator.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Cache\\CacheEntry\:\:\$identifiers\.$#' + identifier: property.notFound count: 1 path: src/Cache/Persister/Collection/AbstractCollectionPersister.php - - message: "#^Parameter \\#2 \\$key of method Doctrine\\\\ORM\\\\Cache\\\\EntityHydrator\\:\\:buildCacheEntry\\(\\) expects Doctrine\\\\ORM\\\\Cache\\\\EntityCacheKey, Doctrine\\\\ORM\\\\Cache\\\\CacheKey given\\.$#" + message: '#^Method Doctrine\\ORM\\Cache\\Persister\\Collection\\AbstractCollectionPersister\:\:contains\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics count: 1 path: src/Cache/Persister/Collection/AbstractCollectionPersister.php - - message: "#^Parameter \\#3 \\$entry of method Doctrine\\\\ORM\\\\Cache\\\\CollectionHydrator\\:\\:loadCacheEntry\\(\\) expects Doctrine\\\\ORM\\\\Cache\\\\CollectionCacheEntry, Doctrine\\\\ORM\\\\Cache\\\\CacheEntry given\\.$#" + message: '#^Method Doctrine\\ORM\\Cache\\Persister\\Collection\\AbstractCollectionPersister\:\:containsKey\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics count: 1 path: src/Cache/Persister/Collection/AbstractCollectionPersister.php - - message: "#^Call to an undefined method Doctrine\\\\ORM\\\\Cache\\\\Region\\:\\:lock\\(\\)\\.$#" - count: 2 - path: src/Cache/Persister/Collection/ReadWriteCachedCollectionPersister.php + message: '#^Method Doctrine\\ORM\\Cache\\Persister\\Collection\\AbstractCollectionPersister\:\:count\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Cache/Persister/Collection/AbstractCollectionPersister.php - - message: "#^Access to an undefined property Doctrine\\\\ORM\\\\Cache\\\\CacheEntry\\:\\:\\$class\\.$#" - count: 2 - path: src/Cache/Persister/Entity/AbstractEntityPersister.php + message: '#^Method Doctrine\\ORM\\Cache\\Persister\\Collection\\AbstractCollectionPersister\:\:get\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Cache/Persister/Collection/AbstractCollectionPersister.php - - message: "#^Call to an undefined method Doctrine\\\\ORM\\\\Cache\\\\Persister\\\\CachedPersister&Doctrine\\\\ORM\\\\Persisters\\\\Collection\\\\CollectionPersister\\:\\:loadCollectionCache\\(\\)\\.$#" - count: 2 - path: src/Cache/Persister/Entity/AbstractEntityPersister.php + message: '#^Method Doctrine\\ORM\\Cache\\Persister\\Collection\\AbstractCollectionPersister\:\:getSourceEntityMetadata\(\) return type with generic class Doctrine\\ORM\\Mapping\\ClassMetadata does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Cache/Persister/Collection/AbstractCollectionPersister.php - - message: "#^Call to an undefined method Doctrine\\\\ORM\\\\Cache\\\\Persister\\\\CachedPersister&Doctrine\\\\ORM\\\\Persisters\\\\Collection\\\\CollectionPersister\\:\\:storeCollectionCache\\(\\)\\.$#" - count: 2 - path: src/Cache/Persister/Entity/AbstractEntityPersister.php + message: '#^Method Doctrine\\ORM\\Cache\\Persister\\Collection\\AbstractCollectionPersister\:\:getTargetEntityMetadata\(\) return type with generic class Doctrine\\ORM\\Mapping\\ClassMetadata does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Cache/Persister/Collection/AbstractCollectionPersister.php - - message: "#^Call to an undefined method Doctrine\\\\ORM\\\\Persisters\\\\Entity\\\\EntityPersister\\:\\:storeEntityCache\\(\\)\\.$#" + message: '#^Method Doctrine\\ORM\\Cache\\Persister\\Collection\\AbstractCollectionPersister\:\:loadCollectionCache\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics count: 1 - path: src/Cache/Persister/Entity/AbstractEntityPersister.php + path: src/Cache/Persister/Collection/AbstractCollectionPersister.php - - message: "#^Parameter \\#3 \\$entry of method Doctrine\\\\ORM\\\\Cache\\\\EntityHydrator\\:\\:loadCacheEntry\\(\\) expects Doctrine\\\\ORM\\\\Cache\\\\EntityCacheEntry, Doctrine\\\\ORM\\\\Cache\\\\CacheEntry given\\.$#" + message: '#^Method Doctrine\\ORM\\Cache\\Persister\\Collection\\AbstractCollectionPersister\:\:loadCriteria\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics count: 1 - path: src/Cache/Persister/Entity/AbstractEntityPersister.php + path: src/Cache/Persister/Collection/AbstractCollectionPersister.php - - message: "#^Call to an undefined method Doctrine\\\\ORM\\\\Cache\\\\Region\\:\\:lock\\(\\)\\.$#" - count: 2 - path: src/Cache/Persister/Entity/ReadWriteCachedEntityPersister.php + message: '#^Method Doctrine\\ORM\\Cache\\Persister\\Collection\\AbstractCollectionPersister\:\:slice\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Cache/Persister/Collection/AbstractCollectionPersister.php - - message: "#^If condition is always true\\.$#" + message: '#^Method Doctrine\\ORM\\Cache\\Persister\\Collection\\AbstractCollectionPersister\:\:storeCollectionCache\(\) has parameter \$elements with generic interface Doctrine\\Common\\Collections\\Collection but does not specify its types\: TKey, T$#' + identifier: missingType.generics count: 1 - path: src/Cache/Persister/Entity/ReadWriteCachedEntityPersister.php + path: src/Cache/Persister/Collection/AbstractCollectionPersister.php - - message: "#^Access to an undefined property Doctrine\\\\ORM\\\\Cache\\\\CacheEntry\\:\\:\\$time\\.$#" + message: '#^Method Doctrine\\ORM\\Cache\\Persister\\Collection\\AbstractCollectionPersister\:\:storeCollectionCache\(\) has parameter \$elements with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/Cache/TimestampQueryCacheValidator.php + path: src/Cache/Persister/Collection/AbstractCollectionPersister.php - - message: "#^Return type \\(Doctrine\\\\ORM\\\\Mapping\\\\ClassMetadataFactory\\) of method Doctrine\\\\ORM\\\\Decorator\\\\EntityManagerDecorator\\:\\:getMetadataFactory\\(\\) should be compatible with return type \\(Doctrine\\\\Persistence\\\\Mapping\\\\ClassMetadataFactory\\\\>\\) of method Doctrine\\\\Persistence\\\\ObjectManager\\:\\:getMetadataFactory\\(\\)$#" + message: '#^Method Doctrine\\ORM\\Cache\\Persister\\Collection\\AbstractCollectionPersister\:\:storeCollectionCache\(\) has parameter \$elements with no value type specified in iterable type array\|\(Doctrine\\Common\\Collections\\Collection&iterable\)\.$#' + identifier: missingType.iterableValue count: 1 - path: src/Decorator/EntityManagerDecorator.php + path: src/Cache/Persister/Collection/AbstractCollectionPersister.php - - message: "#^Return type \\(Doctrine\\\\ORM\\\\Mapping\\\\ClassMetadataFactory\\) of method Doctrine\\\\ORM\\\\Decorator\\\\EntityManagerDecorator\\:\\:getMetadataFactory\\(\\) should be compatible with return type \\(Doctrine\\\\Persistence\\\\Mapping\\\\ClassMetadataFactory\\\\>\\) of method Doctrine\\\\Persistence\\\\ObjectManagerDecorator\\\\:\\:getMetadataFactory\\(\\)$#" + message: '#^Parameter \#2 \$key of method Doctrine\\ORM\\Cache\\EntityHydrator\:\:buildCacheEntry\(\) expects Doctrine\\ORM\\Cache\\EntityCacheKey, Doctrine\\ORM\\Cache\\CacheKey given\.$#' + identifier: argument.type count: 1 - path: src/Decorator/EntityManagerDecorator.php + path: src/Cache/Persister/Collection/AbstractCollectionPersister.php - - message: "#^Return type \\(Doctrine\\\\ORM\\\\Mapping\\\\ClassMetadataFactory\\) of method Doctrine\\\\ORM\\\\EntityManager\\:\\:getMetadataFactory\\(\\) should be compatible with return type \\(Doctrine\\\\Persistence\\\\Mapping\\\\ClassMetadataFactory\\\\>\\) of method Doctrine\\\\Persistence\\\\ObjectManager\\:\\:getMetadataFactory\\(\\)$#" + message: '#^Parameter \#3 \$entry of method Doctrine\\ORM\\Cache\\CollectionHydrator\:\:loadCacheEntry\(\) expects Doctrine\\ORM\\Cache\\CollectionCacheEntry, Doctrine\\ORM\\Cache\\CacheEntry given\.$#' + identifier: argument.type count: 1 - path: src/EntityManager.php + path: src/Cache/Persister/Collection/AbstractCollectionPersister.php - - message: "#^Return type \\(Doctrine\\\\ORM\\\\Mapping\\\\ClassMetadataFactory\\) of method Doctrine\\\\ORM\\\\EntityManagerInterface\\:\\:getMetadataFactory\\(\\) should be compatible with return type \\(Doctrine\\\\Persistence\\\\Mapping\\\\ClassMetadataFactory\\\\>\\) of method Doctrine\\\\Persistence\\\\ObjectManager\\:\\:getMetadataFactory\\(\\)$#" + message: '#^Property Doctrine\\ORM\\Cache\\Persister\\Collection\\AbstractCollectionPersister\:\:\$sourceEntity with generic class Doctrine\\ORM\\Mapping\\ClassMetadata does not specify its types\: T$#' + identifier: missingType.generics count: 1 - path: src/EntityManagerInterface.php + path: src/Cache/Persister/Collection/AbstractCollectionPersister.php - - message: "#^Method Doctrine\\\\ORM\\\\EntityRepository\\:\\:matching\\(\\) should return Doctrine\\\\Common\\\\Collections\\\\AbstractLazyCollection\\&Doctrine\\\\Common\\\\Collections\\\\Selectable\\ but returns Doctrine\\\\ORM\\\\LazyCriteriaCollection\\<\\(int\\|string\\), object\\>\\.$#" + message: '#^Property Doctrine\\ORM\\Cache\\Persister\\Collection\\AbstractCollectionPersister\:\:\$targetEntity with generic class Doctrine\\ORM\\Mapping\\ClassMetadata does not specify its types\: T$#' + identifier: missingType.generics count: 1 - path: src/EntityRepository.php + path: src/Cache/Persister/Collection/AbstractCollectionPersister.php - - message: "#^If condition is always true\\.$#" + message: '#^Method Doctrine\\ORM\\Cache\\Persister\\Collection\\CachedCollectionPersister\:\:getSourceEntityMetadata\(\) return type with generic class Doctrine\\ORM\\Mapping\\ClassMetadata does not specify its types\: T$#' + identifier: missingType.generics count: 1 - path: src/Mapping/ClassMetadataFactory.php + path: src/Cache/Persister/Collection/CachedCollectionPersister.php - - message: "#^Expression on left side of \\?\\? is not nullable\\.$#" + message: '#^Method Doctrine\\ORM\\Cache\\Persister\\Collection\\CachedCollectionPersister\:\:getTargetEntityMetadata\(\) return type with generic class Doctrine\\ORM\\Mapping\\ClassMetadata does not specify its types\: T$#' + identifier: missingType.generics count: 1 - path: src/Mapping/Driver/AttributeDriver.php + path: src/Cache/Persister/Collection/CachedCollectionPersister.php - - message: "#^Method Doctrine\\\\ORM\\\\Mapping\\\\ToOneOwningSideMapping\\:\\:fromMappingArray\\(\\) should return static\\(Doctrine\\\\ORM\\\\Mapping\\\\ToOneOwningSideMapping\\) but returns Doctrine\\\\ORM\\\\Mapping\\\\ManyToOneAssociationMapping\\|Doctrine\\\\ORM\\\\Mapping\\\\OneToOneOwningSideMapping\\.$#" + message: '#^Method Doctrine\\ORM\\Cache\\Persister\\Collection\\CachedCollectionPersister\:\:loadCollectionCache\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics count: 1 - path: src/Mapping/ToOneOwningSideMapping.php + path: src/Cache/Persister/Collection/CachedCollectionPersister.php - - message: "#^Method Doctrine\\\\ORM\\\\Mapping\\\\ToOneOwningSideMapping\\:\\:fromMappingArrayAndName\\(\\) should return static\\(Doctrine\\\\ORM\\\\Mapping\\\\ToOneOwningSideMapping\\) but returns Doctrine\\\\ORM\\\\Mapping\\\\ManyToOneAssociationMapping\\|Doctrine\\\\ORM\\\\Mapping\\\\OneToOneOwningSideMapping\\.$#" + message: '#^Method Doctrine\\ORM\\Cache\\Persister\\Collection\\CachedCollectionPersister\:\:storeCollectionCache\(\) has parameter \$elements with generic interface Doctrine\\Common\\Collections\\Collection but does not specify its types\: TKey, T$#' + identifier: missingType.generics count: 1 - path: src/Mapping/ToOneOwningSideMapping.php + path: src/Cache/Persister/Collection/CachedCollectionPersister.php - - message: "#^Call to function is_int\\(\\) with string will always evaluate to false\\.$#" + message: '#^Method Doctrine\\ORM\\Cache\\Persister\\Collection\\CachedCollectionPersister\:\:storeCollectionCache\(\) has parameter \$elements with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/NativeQuery.php + path: src/Cache/Persister/Collection/CachedCollectionPersister.php - - message: "#^Result of && is always false\\.$#" + message: '#^Method Doctrine\\ORM\\Cache\\Persister\\Collection\\CachedCollectionPersister\:\:storeCollectionCache\(\) has parameter \$elements with no value type specified in iterable type array\|\(Doctrine\\Common\\Collections\\Collection&iterable\)\.$#' + identifier: missingType.iterableValue count: 1 - path: src/NativeQuery.php + path: src/Cache/Persister/Collection/CachedCollectionPersister.php - - message: "#^Parameter \\#3 \\$hints of method Doctrine\\\\ORM\\\\Internal\\\\Hydration\\\\AbstractHydrator\\:\\:hydrateAll\\(\\) expects array\\, array\\ given\\.$#" + message: '#^Method Doctrine\\ORM\\Cache\\Persister\\Collection\\NonStrictReadWriteCachedCollectionPersister\:\:delete\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics count: 1 - path: src/Persisters/Entity/BasicEntityPersister.php + path: src/Cache/Persister/Collection/NonStrictReadWriteCachedCollectionPersister.php - - message: "#^Parameter \\#3 \\$hints of method Doctrine\\\\ORM\\\\Internal\\\\Hydration\\\\AbstractHydrator\\:\\:hydrateAll\\(\\) expects array\\, array\\ given\\.$#" - count: 4 - path: src/Persisters/Entity/BasicEntityPersister.php + message: '#^Method Doctrine\\ORM\\Cache\\Persister\\Collection\\NonStrictReadWriteCachedCollectionPersister\:\:update\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Cache/Persister/Collection/NonStrictReadWriteCachedCollectionPersister.php - - message: "#^Strict comparison using \\=\\=\\= between string and null will always evaluate to false\\.$#" + message: '#^Method Doctrine\\ORM\\Cache\\Persister\\Collection\\ReadOnlyCachedCollectionPersister\:\:update\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics count: 1 - path: src/Persisters/Entity/BasicEntityPersister.php + path: src/Cache/Persister/Collection/ReadOnlyCachedCollectionPersister.php + + - + message: '#^Call to an undefined method Doctrine\\ORM\\Cache\\Region\:\:lock\(\)\.$#' + identifier: method.notFound + count: 2 + path: src/Cache/Persister/Collection/ReadWriteCachedCollectionPersister.php - - message: "#^Access to an undefined property Doctrine\\\\Persistence\\\\Mapping\\\\ClassMetadata\\:\\:\\$isEmbeddedClass\\.$#" + message: '#^Method Doctrine\\ORM\\Cache\\Persister\\Collection\\ReadWriteCachedCollectionPersister\:\:delete\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics count: 1 - path: src/Proxy/ProxyFactory.php + path: src/Cache/Persister/Collection/ReadWriteCachedCollectionPersister.php - - message: "#^Access to an undefined property Doctrine\\\\Persistence\\\\Mapping\\\\ClassMetadata\\:\\:\\$isMappedSuperclass\\.$#" + message: '#^Method Doctrine\\ORM\\Cache\\Persister\\Collection\\ReadWriteCachedCollectionPersister\:\:update\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics count: 1 - path: src/Proxy/ProxyFactory.php + path: src/Cache/Persister/Collection/ReadWriteCachedCollectionPersister.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Cache\\CacheEntry\:\:\$class\.$#' + identifier: property.notFound + count: 2 + path: src/Cache/Persister/Entity/AbstractEntityPersister.php + + - + message: '#^Call to an undefined method Doctrine\\ORM\\Cache\\Persister\\CachedPersister&Doctrine\\ORM\\Persisters\\Collection\\CollectionPersister\:\:loadCollectionCache\(\)\.$#' + identifier: method.notFound + count: 2 + path: src/Cache/Persister/Entity/AbstractEntityPersister.php + + - + message: '#^Call to an undefined method Doctrine\\ORM\\Cache\\Persister\\CachedPersister&Doctrine\\ORM\\Persisters\\Collection\\CollectionPersister\:\:storeCollectionCache\(\)\.$#' + identifier: method.notFound + count: 2 + path: src/Cache/Persister/Entity/AbstractEntityPersister.php - - message: "#^Call to an undefined static method Doctrine\\\\ORM\\\\Proxy\\\\ProxyFactory\\:\\:createLazyGhost\\(\\)\\.$#" + message: '#^Call to an undefined method Doctrine\\ORM\\Persisters\\Entity\\EntityPersister\:\:storeEntityCache\(\)\.$#' + identifier: method.notFound count: 1 - path: src/Proxy/ProxyFactory.php + path: src/Cache/Persister/Entity/AbstractEntityPersister.php - - message: "#^Comparison operation \"\\<\" between 0\\|1\\|2\\|3\\|4 and 0 is always false\\.$#" + message: '#^Method Doctrine\\ORM\\Cache\\Persister\\Entity\\AbstractEntityPersister\:\:__construct\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics count: 1 - path: src/Proxy/ProxyFactory.php + path: src/Cache/Persister/Entity/AbstractEntityPersister.php - - message: "#^Comparison operation \"\\>\" between 0\\|1\\|2\\|3\\|4 and 4 is always false\\.$#" + message: '#^Method Doctrine\\ORM\\Cache\\Persister\\Entity\\AbstractEntityPersister\:\:getClassMetadata\(\) return type with generic class Doctrine\\ORM\\Mapping\\ClassMetadata does not specify its types\: T$#' + identifier: missingType.generics count: 1 - path: src/Proxy/ProxyFactory.php + path: src/Cache/Persister/Entity/AbstractEntityPersister.php - - message: "#^Parameter \\#1 \\$class of method Doctrine\\\\ORM\\\\Utility\\\\IdentifierFlattener\\:\\:flattenIdentifier\\(\\) expects Doctrine\\\\ORM\\\\Mapping\\\\ClassMetadata, Doctrine\\\\Persistence\\\\Mapping\\\\ClassMetadata given\\.$#" + message: '#^Method Doctrine\\ORM\\Cache\\Persister\\Entity\\AbstractEntityPersister\:\:loadManyToManyCollection\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics count: 1 - path: src/Proxy/ProxyFactory.php + path: src/Cache/Persister/Entity/AbstractEntityPersister.php - - message: "#^Result of \\|\\| is always false\\.$#" + message: '#^Method Doctrine\\ORM\\Cache\\Persister\\Entity\\AbstractEntityPersister\:\:loadOneToManyCollection\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics count: 1 - path: src/Proxy/ProxyFactory.php + path: src/Cache/Persister/Entity/AbstractEntityPersister.php - - message: "#^Parameter \\#2 \\$sqlParams of method Doctrine\\\\ORM\\\\Query\\:\\:evictResultSetCache\\(\\) expects array\\, array\\ given\\.$#" + message: '#^Parameter \#3 \$entry of method Doctrine\\ORM\\Cache\\EntityHydrator\:\:loadCacheEntry\(\) expects Doctrine\\ORM\\Cache\\EntityCacheEntry, Doctrine\\ORM\\Cache\\CacheEntry given\.$#' + identifier: argument.type count: 1 - path: src/Query.php + path: src/Cache/Persister/Entity/AbstractEntityPersister.php + + - + message: '#^Call to an undefined method Doctrine\\ORM\\Cache\\Region\:\:lock\(\)\.$#' + identifier: method.notFound + count: 2 + path: src/Cache/Persister/Entity/ReadWriteCachedEntityPersister.php - - message: "#^Access to an undefined property Doctrine\\\\ORM\\\\Query\\\\AST\\\\Node\\:\\:\\$value\\.$#" + message: '#^If condition is always true\.$#' + identifier: if.alwaysTrue count: 1 - path: src/Query/AST/Functions/DateAddFunction.php + path: src/Cache/Persister/Entity/ReadWriteCachedEntityPersister.php - - message: "#^Access to an undefined property Doctrine\\\\ORM\\\\Query\\\\AST\\\\Node\\:\\:\\$value\\.$#" + message: '#^Method Doctrine\\ORM\\Cache\\Persister\\Entity\\ReadWriteCachedEntityPersister\:\:__construct\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics count: 1 - path: src/Query/AST/Functions/DateSubFunction.php + path: src/Cache/Persister/Entity/ReadWriteCachedEntityPersister.php - - message: "#^Call to an undefined method Doctrine\\\\ORM\\\\Query\\\\SqlWalker\\:\\:walkJoinPathExpression\\(\\)\\.$#" + message: '#^Access to an undefined property Doctrine\\ORM\\Cache\\CacheEntry\:\:\$time\.$#' + identifier: property.notFound count: 1 - path: src/Query/AST/JoinClassPathExpression.php + path: src/Cache/TimestampQueryCacheValidator.php - - message: "#^Call to an undefined method Doctrine\\\\ORM\\\\Query\\\\SqlWalker\\:\\:walkJoinVariableDeclaration\\(\\)\\.$#" + message: '#^Method Doctrine\\ORM\\Configuration\:\:getDefaultRepositoryClassName\(\) return type with generic class Doctrine\\ORM\\EntityRepository does not specify its types\: T$#' + identifier: missingType.generics count: 1 - path: src/Query/AST/JoinVariableDeclaration.php + path: src/Configuration.php - - message: "#^Call to an undefined method Doctrine\\\\ORM\\\\Query\\\\SqlWalker\\:\\:walkWhenClauseExpression\\(\\)\\.$#" + message: '#^Method Doctrine\\ORM\\Configuration\:\:setDefaultRepositoryClassName\(\) has parameter \$className with generic class Doctrine\\ORM\\EntityRepository but does not specify its types\: T$#' + identifier: missingType.generics count: 1 - path: src/Query/AST/SimpleWhenClause.php + path: src/Configuration.php - - message: "#^Call to an undefined method Doctrine\\\\ORM\\\\Query\\\\SqlWalker\\:\\:walkWhenClauseExpression\\(\\)\\.$#" + message: '#^Parameter \#2 \$className of method Doctrine\\ORM\\Configuration\:\:addCustomNumericFunction\(\) expects \(callable\(string\)\: Doctrine\\ORM\\Query\\AST\\Functions\\FunctionNode\)\|class\-string\, class\-string given\.$#' + identifier: argument.type count: 1 - path: src/Query/AST/WhenClause.php + path: src/Configuration.php - - message: "#^PHPDoc type array\\ of property Doctrine\\\\ORM\\\\Query\\\\Expr\\\\Andx\\:\\:\\$allowedClasses is not covariant with PHPDoc type array\\ of overridden property Doctrine\\\\ORM\\\\Query\\\\Expr\\\\Base\\:\\:\\$allowedClasses\\.$#" + message: '#^Method Doctrine\\ORM\\Decorator\\EntityManagerDecorator\:\:getClassMetadata\(\) return type with generic class Doctrine\\ORM\\Mapping\\ClassMetadata does not specify its types\: T$#' + identifier: missingType.generics count: 1 - path: src/Query/Expr/Andx.php + path: src/Decorator/EntityManagerDecorator.php - - message: "#^PHPDoc type array\\ of property Doctrine\\\\ORM\\\\Query\\\\Expr\\\\Orx\\:\\:\\$allowedClasses is not covariant with PHPDoc type array\\ of overridden property Doctrine\\\\ORM\\\\Query\\\\Expr\\\\Base\\:\\:\\$allowedClasses\\.$#" + message: '#^Method Doctrine\\ORM\\Decorator\\EntityManagerDecorator\:\:getRepository\(\) return type with generic class Doctrine\\ORM\\EntityRepository does not specify its types\: T$#' + identifier: missingType.generics count: 1 - path: src/Query/Expr/Orx.php + path: src/Decorator/EntityManagerDecorator.php - - message: "#^PHPDoc type array\\ of property Doctrine\\\\ORM\\\\Query\\\\Expr\\\\Select\\:\\:\\$allowedClasses is not covariant with PHPDoc type array\\ of overridden property Doctrine\\\\ORM\\\\Query\\\\Expr\\\\Base\\:\\:\\$allowedClasses\\.$#" + message: '#^Return type \(Doctrine\\ORM\\Mapping\\ClassMetadataFactory\) of method Doctrine\\ORM\\Decorator\\EntityManagerDecorator\:\:getMetadataFactory\(\) should be compatible with return type \(Doctrine\\Persistence\\Mapping\\ClassMetadataFactory\\>\) of method Doctrine\\Persistence\\ObjectManager\:\:getMetadataFactory\(\)$#' + identifier: method.childReturnType count: 1 - path: src/Query/Expr/Select.php + path: src/Decorator/EntityManagerDecorator.php - - message: "#^Parameter \\#2 \\$stringPattern of class Doctrine\\\\ORM\\\\Query\\\\AST\\\\LikeExpression constructor expects Doctrine\\\\ORM\\\\Query\\\\AST\\\\Functions\\\\FunctionNode\\|Doctrine\\\\ORM\\\\Query\\\\AST\\\\InputParameter\\|Doctrine\\\\ORM\\\\Query\\\\AST\\\\Literal\\|Doctrine\\\\ORM\\\\Query\\\\AST\\\\PathExpression, Doctrine\\\\ORM\\\\Query\\\\AST\\\\Node given\\.$#" + message: '#^Return type \(Doctrine\\ORM\\Mapping\\ClassMetadataFactory\) of method Doctrine\\ORM\\Decorator\\EntityManagerDecorator\:\:getMetadataFactory\(\) should be compatible with return type \(Doctrine\\Persistence\\Mapping\\ClassMetadataFactory\\>\) of method Doctrine\\Persistence\\ObjectManagerDecorator\\:\:getMetadataFactory\(\)$#' + identifier: method.childReturnType count: 1 - path: src/Query/Parser.php + path: src/Decorator/EntityManagerDecorator.php - - message: "#^Unreachable statement \\- code above always terminates\\.$#" - count: 2 - path: src/Query/Parser.php + message: '#^Call to an undefined method object\:\:setEntityManager\(\)\.$#' + identifier: method.notFound + count: 1 + path: src/EntityManager.php - - message: "#^Match arm is unreachable because previous comparison is always true\\.$#" + message: '#^Method Doctrine\\ORM\\EntityManager\:\:checkLockRequirements\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics count: 1 - path: src/Query/SqlWalker.php + path: src/EntityManager.php - - message: "#^Parameter \\#1 \\$condTerm of method Doctrine\\\\ORM\\\\Query\\\\SqlWalker\\:\\:walkConditionalTerm\\(\\) expects Doctrine\\\\ORM\\\\Query\\\\AST\\\\ConditionalFactor\\|Doctrine\\\\ORM\\\\Query\\\\AST\\\\ConditionalPrimary\\|Doctrine\\\\ORM\\\\Query\\\\AST\\\\ConditionalTerm, Doctrine\\\\ORM\\\\Query\\\\AST\\\\Phase2OptimizableConditional given\\.$#" + message: '#^Method Doctrine\\ORM\\EntityManager\:\:find\(\) should return \(T of object\)\|null but returns object\.$#' + identifier: return.type count: 1 - path: src/Query/SqlWalker.php + path: src/EntityManager.php - - message: "#^Parameter \\#2 \\$dqlPart of method Doctrine\\\\ORM\\\\QueryBuilder\\:\\:add\\(\\) expects array\\<'join'\\|int, array\\\\|string\\>\\|object\\|string, non\\-empty\\-array\\ given\\.$#" - count: 2 - path: src/QueryBuilder.php + message: '#^Method Doctrine\\ORM\\EntityManager\:\:find\(\) should return \(T of object\)\|null but returns object\|null\.$#' + identifier: return.type + count: 3 + path: src/EntityManager.php - - message: "#^Access to an undefined property Doctrine\\\\Persistence\\\\Mapping\\\\ClassMetadata\\:\\:\\$name\\.$#" + message: '#^Method Doctrine\\ORM\\EntityManager\:\:getReference\(\) should return \(T of object\)\|null but returns Doctrine\\ORM\\Proxy\\InternalProxy\.$#' + identifier: return.type count: 1 - path: src/Tools/Console/Command/GenerateProxiesCommand.php + path: src/EntityManager.php - - message: "#^Parameter \\#1 \\$entityListeners of method Doctrine\\\\ORM\\\\Tools\\\\Console\\\\Command\\\\MappingDescribeCommand\\:\\:formatEntityListeners\\(\\) expects array\\, array\\\\>\\> given\\.$#" + message: '#^Method Doctrine\\ORM\\EntityManager\:\:getReference\(\) should return \(T of object\)\|null but returns object\|null\.$#' + identifier: return.type count: 1 - path: src/Tools/Console/Command/MappingDescribeCommand.php + path: src/EntityManager.php - - message: "#^Else branch is unreachable because ternary operator condition is always true\\.$#" + message: '#^Method Doctrine\\ORM\\EntityManager\:\:isUninitializedObject\(\) has parameter \$value with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: src/Tools/SchemaTool.php + path: src/EntityManager.php - - message: "#^Negated boolean expression is always false\\.$#" + message: '#^Parameter \#1 \$className of method Doctrine\\Persistence\\Mapping\\AbstractClassMetadataFactory\\:\:getMetadataFor\(\) expects class\-string, string given\.$#' + identifier: argument.type count: 1 - path: src/Tools/SchemaTool.php + path: src/EntityManager.php - - message: "#^Parameter \\#3 \\$changeSet of class Doctrine\\\\ORM\\\\Event\\\\PreUpdateEventArgs constructor is passed by reference, so it expects variables only$#" + message: '#^Property Doctrine\\ORM\\EntityManager\:\:\$metadataFactory \(Doctrine\\ORM\\Mapping\\ClassMetadataFactory\) does not accept object\.$#' + identifier: assign.propertyType count: 1 - path: src/UnitOfWork.php + path: src/EntityManager.php - - message: "#^Access to an undefined property Doctrine\\\\Persistence\\\\Mapping\\\\ClassMetadata\\:\\:\\$name\\.$#" + message: '#^Return type \(Doctrine\\ORM\\Mapping\\ClassMetadataFactory\) of method Doctrine\\ORM\\EntityManager\:\:getMetadataFactory\(\) should be compatible with return type \(Doctrine\\Persistence\\Mapping\\ClassMetadataFactory\\>\) of method Doctrine\\Persistence\\ObjectManager\:\:getMetadataFactory\(\)$#' + identifier: method.childReturnType count: 1 - path: src/Utility/HierarchyDiscriminatorResolver.php + path: src/EntityManager.php - - message: "#^Access to an undefined property Doctrine\\\\Persistence\\\\Mapping\\\\ClassMetadata\\:\\:\\$subClasses\\.$#" + message: '#^Return type \(Doctrine\\ORM\\Mapping\\ClassMetadataFactory\) of method Doctrine\\ORM\\EntityManagerInterface\:\:getMetadataFactory\(\) should be compatible with return type \(Doctrine\\Persistence\\Mapping\\ClassMetadataFactory\\>\) of method Doctrine\\Persistence\\ObjectManager\:\:getMetadataFactory\(\)$#' + identifier: method.childReturnType count: 1 - path: src/Utility/HierarchyDiscriminatorResolver.php + path: src/EntityManagerInterface.php + + - + message: '#^Method Doctrine\\ORM\\EntityRepository\:\:findBy\(\) should return list\ but returns array\\.$#' + identifier: return.type + count: 1 + path: src/EntityRepository.php + + - + message: '#^Method Doctrine\\ORM\\EntityRepository\:\:findOneBy\(\) should return \(T of object\)\|null but returns object\|null\.$#' + identifier: return.type + count: 1 + path: src/EntityRepository.php + + - + message: '#^Method Doctrine\\ORM\\EntityRepository\:\:matching\(\) should return Doctrine\\Common\\Collections\\AbstractLazyCollection\&Doctrine\\Common\\Collections\\Selectable\ but returns Doctrine\\ORM\\LazyCriteriaCollection\<\(int\|string\), object\>\.$#' + identifier: return.type + count: 1 + path: src/EntityRepository.php + + - + message: '#^Method Doctrine\\ORM\\Event\\ListenersInvoker\:\:getSubscribedSystems\(\) has parameter \$metadata with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Event/ListenersInvoker.php + + - + message: '#^Method Doctrine\\ORM\\Event\\ListenersInvoker\:\:invoke\(\) has parameter \$metadata with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Event/ListenersInvoker.php + + - + message: '#^Method Doctrine\\ORM\\Event\\OnClassMetadataNotFoundEventArgs\:\:getFoundMetadata\(\) return type with generic interface Doctrine\\Persistence\\Mapping\\ClassMetadata does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Event/OnClassMetadataNotFoundEventArgs.php + + - + message: '#^Method Doctrine\\ORM\\Event\\OnClassMetadataNotFoundEventArgs\:\:setFoundMetadata\(\) has parameter \$classMetadata with generic interface Doctrine\\Persistence\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Event/OnClassMetadataNotFoundEventArgs.php + + - + message: '#^Property Doctrine\\ORM\\Event\\OnClassMetadataNotFoundEventArgs\:\:\$foundMetadata with generic interface Doctrine\\Persistence\\Mapping\\ClassMetadata does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Event/OnClassMetadataNotFoundEventArgs.php + + - + message: '#^Method Doctrine\\ORM\\Event\\PreUpdateEventArgs\:\:__construct\(\) has parameter \$changeSet with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Event/PreUpdateEventArgs.php + + - + message: '#^Method Doctrine\\ORM\\Event\\PreUpdateEventArgs\:\:getEntityChangeSet\(\) return type with generic class Doctrine\\ORM\\PersistentCollection does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Event/PreUpdateEventArgs.php + + - + message: '#^Property Doctrine\\ORM\\Event\\PreUpdateEventArgs\:\:\$entityChangeSet with generic class Doctrine\\ORM\\PersistentCollection does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Event/PreUpdateEventArgs.php + + - + message: '#^Method Doctrine\\ORM\\Id\\AssignedGenerator\:\:generateId\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Id/AssignedGenerator.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$joinColumns\.$#' + identifier: property.notFound + count: 2 + path: src/Internal/Hydration/AbstractHydrator.php + + - + message: '#^Method Doctrine\\ORM\\Internal\\Hydration\\AbstractHydrator\:\:gatherRowData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 3 + path: src/Internal/Hydration/AbstractHydrator.php + + - + message: '#^Method Doctrine\\ORM\\Internal\\Hydration\\AbstractHydrator\:\:gatherRowData\(\) return type with generic class ReflectionClass does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Internal/Hydration/AbstractHydrator.php + + - + message: '#^Method Doctrine\\ORM\\Internal\\Hydration\\AbstractHydrator\:\:getClassMetadata\(\) return type with generic class Doctrine\\ORM\\Mapping\\ClassMetadata does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Internal/Hydration/AbstractHydrator.php + + - + message: '#^Method Doctrine\\ORM\\Internal\\Hydration\\AbstractHydrator\:\:getDiscriminatorValues\(\) has parameter \$classMetadata with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Internal/Hydration/AbstractHydrator.php + + - + message: '#^Method Doctrine\\ORM\\Internal\\Hydration\\AbstractHydrator\:\:registerManaged\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Internal/Hydration/AbstractHydrator.php + + - + message: '#^Parameter &\$id by\-ref type of method Doctrine\\ORM\\Internal\\Hydration\\AbstractHydrator\:\:gatherRowData\(\) expects array\, array\ given\.$#' + identifier: parameterByRef.type + count: 1 + path: src/Internal/Hydration/AbstractHydrator.php + + - + message: '#^Parameter &\$nonemptyComponents by\-ref type of method Doctrine\\ORM\\Internal\\Hydration\\AbstractHydrator\:\:gatherRowData\(\) expects array\, array\ given\.$#' + identifier: parameterByRef.type + count: 1 + path: src/Internal/Hydration/AbstractHydrator.php + + - + message: '#^Method Doctrine\\ORM\\Internal\\Hydration\\ArrayHydrator\:\:hydrateAllData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Internal/Hydration/ArrayHydrator.php + + - + message: '#^Parameter &\$result by\-ref type of method Doctrine\\ORM\\Internal\\Hydration\\ArrayHydrator\:\:hydrateRowData\(\) expects array\, array\\|null given\.$#' + identifier: parameterByRef.type + count: 1 + path: src/Internal/Hydration/ArrayHydrator.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$inversedBy\.$#' + identifier: property.notFound + count: 2 + path: src/Internal/Hydration/ObjectHydrator.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$joinColumns\.$#' + identifier: property.notFound + count: 2 + path: src/Internal/Hydration/ObjectHydrator.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$mappedBy\.$#' + identifier: property.notFound + count: 3 + path: src/Internal/Hydration/ObjectHydrator.php + + - + message: '#^Method Doctrine\\ORM\\Internal\\Hydration\\ObjectHydrator\:\:hydrateAllData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Internal/Hydration/ObjectHydrator.php + + - + message: '#^Method Doctrine\\ORM\\Internal\\Hydration\\ObjectHydrator\:\:initRelatedCollection\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Internal/Hydration/ObjectHydrator.php + + - + message: '#^Method Doctrine\\ORM\\Internal\\Hydration\\ObjectHydrator\:\:initRelatedCollection\(\) return type with generic class Doctrine\\ORM\\PersistentCollection does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Internal/Hydration/ObjectHydrator.php + + - + message: '#^Parameter \#2 \$assoc of method Doctrine\\ORM\\PersistentCollection\<\(int\|string\),mixed\>\:\:setOwner\(\) expects Doctrine\\ORM\\Mapping\\AssociationMapping&Doctrine\\ORM\\Mapping\\ToManyAssociationMapping, Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping given\.$#' + identifier: argument.type + count: 1 + path: src/Internal/Hydration/ObjectHydrator.php + + - + message: '#^Property Doctrine\\ORM\\Internal\\Hydration\\ObjectHydrator\:\:\$uninitializedCollections with generic class Doctrine\\ORM\\PersistentCollection does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Internal/Hydration/ObjectHydrator.php + + - + message: '#^Method Doctrine\\ORM\\Internal\\Hydration\\ScalarColumnHydrator\:\:hydrateAllData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Internal/Hydration/ScalarColumnHydrator.php + + - + message: '#^Method Doctrine\\ORM\\Internal\\Hydration\\ScalarHydrator\:\:hydrateAllData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Internal/Hydration/ScalarHydrator.php + + - + message: '#^Method Doctrine\\ORM\\Internal\\Hydration\\SimpleObjectHydrator\:\:hydrateAllData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Internal/Hydration/SimpleObjectHydrator.php + + - + message: '#^Property Doctrine\\ORM\\Internal\\Hydration\\SimpleObjectHydrator\:\:\$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Internal/Hydration/SimpleObjectHydrator.php + + - + message: '#^Method Doctrine\\ORM\\Internal\\HydrationCompleteHandler\:\:deferPostLoadInvoking\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Internal/HydrationCompleteHandler.php + + - + message: '#^Property Doctrine\\ORM\\Internal\\StronglyConnectedComponents\:\:\$representingNodes \(array\\) does not accept array\\.$#' + identifier: assign.propertyType + count: 1 + path: src/Internal/StronglyConnectedComponents.php + + - + message: '#^Property Doctrine\\ORM\\Internal\\StronglyConnectedComponents\:\:\$states \(array\\) does not accept non\-empty\-array\<''''\|int, 1\|2\|3\>\.$#' + identifier: assign.propertyType + count: 1 + path: src/Internal/StronglyConnectedComponents.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\AnsiQuoteStrategy\:\:getColumnAlias\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/AnsiQuoteStrategy.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\AnsiQuoteStrategy\:\:getColumnName\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/AnsiQuoteStrategy.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\AnsiQuoteStrategy\:\:getIdentifierColumnNames\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/AnsiQuoteStrategy.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\AnsiQuoteStrategy\:\:getJoinColumnName\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/AnsiQuoteStrategy.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\AnsiQuoteStrategy\:\:getJoinTableName\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/AnsiQuoteStrategy.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\AnsiQuoteStrategy\:\:getReferencedJoinColumnName\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/AnsiQuoteStrategy.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\AnsiQuoteStrategy\:\:getSequenceName\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/AnsiQuoteStrategy.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\AnsiQuoteStrategy\:\:getTableName\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/AnsiQuoteStrategy.php + + - + message: '#^Parameter \#1 \$mappingArray of static method Doctrine\\ORM\\Mapping\\JoinTableMapping\:\:fromMappingArray\(\) expects array\{name\: string, quoted\?\: bool\|null, joinColumns\?\: array\, inverseJoinColumns\?\: array\, schema\?\: string\|null, options\?\: array\\}, non\-empty\-array\ given\.$#' + identifier: argument.type + count: 1 + path: src/Mapping/AssociationMapping.php + + - + message: '#^Property Doctrine\\ORM\\Mapping\\AssociationMapping\:\:\$cache type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Mapping/AssociationMapping.php + + - + message: '#^Instanceof between Doctrine\\ORM\\Mapping\\AssociationOverride and Doctrine\\ORM\\Mapping\\AssociationOverride will always evaluate to true\.$#' + identifier: instanceof.alwaysTrue + count: 1 + path: src/Mapping/AssociationOverrides.php + + - + message: '#^Instanceof between Doctrine\\ORM\\Mapping\\AttributeOverride and Doctrine\\ORM\\Mapping\\AttributeOverride will always evaluate to true\.$#' + identifier: instanceof.alwaysTrue + count: 1 + path: src/Mapping/AttributeOverrides.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\Builder\\ClassMetadataBuilder\:\:__construct\(\) has parameter \$cm with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/Builder/ClassMetadataBuilder.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\Builder\\ClassMetadataBuilder\:\:getClassMetadata\(\) return type with generic class Doctrine\\ORM\\Mapping\\ClassMetadata does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/Builder/ClassMetadataBuilder.php + + - + message: '#^Parameter \#1 \$repositoryClassName of method Doctrine\\ORM\\Mapping\\ClassMetadata\\:\:setCustomRepositoryClass\(\) expects class\-string\\|null, string given\.$#' + identifier: argument.type + count: 1 + path: src/Mapping/Builder/ClassMetadataBuilder.php + + - + message: '#^Parameter \#1 \$mapping of method Doctrine\\ORM\\Mapping\\ClassMetadata\\:\:mapEmbedded\(\) expects array\{fieldName\: string, class\?\: class\-string, declaredField\?\: string, columnPrefix\?\: string\|false\|null, originalField\?\: string\}, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/Mapping/Builder/EmbeddedBuilder.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\Builder\\EntityListenerBuilder\:\:bindEntityListener\(\) has parameter \$metadata with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/Builder/EntityListenerBuilder.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$joinColumns\.$#' + identifier: property.notFound + count: 4 + path: src/Mapping/ClassMetadata.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ClassMetadata\:\:inlineEmbeddable\(\) has parameter \$embeddable with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/ClassMetadata.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ClassMetadata\:\:setAssociationOverride\(\) has parameter \$overrideMapping with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 2 + path: src/Mapping/ClassMetadata.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ClassMetadata\:\:setCustomRepositoryClass\(\) has parameter \$repositoryClassName with generic class Doctrine\\ORM\\EntityRepository but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/ClassMetadata.php + + - + message: '#^Parameter \#1 \$array \(list\\) of array_values is already a list, call has no effect\.$#' + identifier: arrayValues.list + count: 1 + path: src/Mapping/ClassMetadata.php + + - + message: '#^Parameter \#1 \$class of method Doctrine\\Persistence\\Mapping\\ReflectionService\:\:getAccessibleProperty\(\) expects class\-string, string given\.$#' + identifier: argument.type + count: 1 + path: src/Mapping/ClassMetadata.php + + - + message: '#^Parameter \#1 \$mapping of method Doctrine\\ORM\\Mapping\\ClassMetadata\\:\:validateAndCompleteTypedAssociationMapping\(\) expects array\{type\: 1\|2\|4\|8, fieldName\: string, targetEntity\?\: class\-string\}, non\-empty\-array\ given\.$#' + identifier: argument.type + count: 1 + path: src/Mapping/ClassMetadata.php + + - + message: '#^Parameter \#1 \$mappingArray of static method Doctrine\\ORM\\Mapping\\AssociationMapping\:\:fromMappingArray\(\) expects array\{fieldName\: string, sourceEntity\: class\-string, targetEntity\: class\-string, cascade\?\: list\<''all''\|''detach''\|''persist''\|''refresh''\|''remove''\>, fetch\?\: 2\|3\|4\|null, inherited\?\: class\-string\|null, declared\?\: class\-string\|null, cache\?\: array\\|null, \.\.\.\}, non\-empty\-array given\.$#' + identifier: argument.type + count: 1 + path: src/Mapping/ClassMetadata.php + + - + message: '#^Parameter \#1 \$mappingArray of static method Doctrine\\ORM\\Mapping\\EmbeddedClassMapping\:\:fromMappingArray\(\) expects array\{class\: class\-string, columnPrefix\?\: string\|false\|null, declaredField\?\: string\|null, originalField\?\: string\|null, inherited\?\: class\-string\|null, declared\?\: class\-string\|null\}, array\{class\: string, columnPrefix\: string\|false\|null, declaredField\: string\|null, originalField\: string\|null\} given\.$#' + identifier: argument.type + count: 1 + path: src/Mapping/ClassMetadata.php + + - + message: '#^Parameter \#1 \$mappingArray of static method Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\:\:fromMappingArrayAndNamingStrategy\(\) expects array\{fieldName\: string, sourceEntity\: class\-string, targetEntity\: class\-string, cascade\?\: list\<''all''\|''detach''\|''persist''\|''refresh''\|''remove''\>, fetch\?\: 2\|3\|4\|null, inherited\?\: class\-string\|null, declared\?\: class\-string\|null, cache\?\: array\\|null, \.\.\.\}, non\-empty\-array given\.$#' + identifier: argument.type + count: 1 + path: src/Mapping/ClassMetadata.php + + - + message: '#^Parameter \#1 \$mappingArray of static method Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\:\:fromMappingArrayAndName\(\) expects array\{fieldName\: string, sourceEntity\: class\-string, targetEntity\: class\-string, cascade\?\: list\<''all''\|''detach''\|''persist''\|''refresh''\|''remove''\>, fetch\?\: 2\|3\|4\|null, inherited\?\: class\-string\|null, declared\?\: class\-string\|null, cache\?\: array\\|null, \.\.\.\}, non\-empty\-array given\.$#' + identifier: argument.type + count: 1 + path: src/Mapping/ClassMetadata.php + + - + message: '#^Parameter \#1 \$mappingArray of static method Doctrine\\ORM\\Mapping\\ToOneInverseSideMapping\:\:fromMappingArrayAndName\(\) expects array\{fieldName\: string, sourceEntity\: class\-string, targetEntity\: class\-string, cascade\?\: list\<''all''\|''detach''\|''persist''\|''refresh''\|''remove''\>, fetch\?\: 2\|3\|4\|null, inherited\?\: class\-string\|null, declared\?\: class\-string\|null, cache\?\: array\\|null, \.\.\.\}, non\-empty\-array given\.$#' + identifier: argument.type + count: 1 + path: src/Mapping/ClassMetadata.php + + - + message: '#^Parameter \#1 \$mappingArray of static method Doctrine\\ORM\\Mapping\\ToOneOwningSideMapping\:\:fromMappingArrayAndName\(\) expects array\{fieldName\: string, sourceEntity\: class\-string, targetEntity\: class\-string, cascade\?\: list\<''all''\|''detach''\|''persist''\|''refresh''\|''remove''\>, fetch\?\: 2\|3\|4\|null, inherited\?\: class\-string\|null, declared\?\: class\-string\|null, cache\?\: array\\|null, \.\.\.\}, non\-empty\-array given\.$#' + identifier: argument.type + count: 2 + path: src/Mapping/ClassMetadata.php + + - + message: '#^Parameter \#2 \$class of method Doctrine\\ORM\\Mapping\\ClassMetadata\\:\:getAccessibleProperty\(\) expects class\-string, string given\.$#' + identifier: argument.type + count: 1 + path: src/Mapping/ClassMetadata.php + + - + message: '#^Parameter \#3 \$embeddedClass of class Doctrine\\ORM\\Mapping\\ReflectionEmbeddedProperty constructor expects class\-string, string given\.$#' + identifier: argument.type + count: 1 + path: src/Mapping/ClassMetadata.php + + - + message: '#^Property Doctrine\\ORM\\Mapping\\ClassMetadata\:\:\$customRepositoryClassName with generic class Doctrine\\ORM\\EntityRepository does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/ClassMetadata.php + + - + message: '#^Property Doctrine\\ORM\\Mapping\\ClassMetadata\:\:\$table type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 2 + path: src/Mapping/ClassMetadata.php + + - + message: '#^Property Doctrine\\ORM\\Mapping\\ClassMetadata\\:\:\$customRepositoryClassName \(class\-string\\|null\) does not accept class\-string\.$#' + identifier: assign.propertyType + count: 1 + path: src/Mapping/ClassMetadata.php + + - + message: '#^Property Doctrine\\ORM\\Mapping\\ClassMetadata\\:\:\$discriminatorMap \(array\\) does not accept array\\.$#' + identifier: assign.propertyType + count: 1 + path: src/Mapping/ClassMetadata.php + + - + message: '#^Property Doctrine\\ORM\\Mapping\\ClassMetadata\\:\:\$entityListeners \(array\\>\) does not accept non\-empty\-array\\>\.$#' + identifier: assign.propertyType + count: 1 + path: src/Mapping/ClassMetadata.php + + - + message: '#^Property Doctrine\\ORM\\Mapping\\ClassMetadata\\:\:\$subClasses \(list\\) does not accept non\-empty\-list\\.$#' + identifier: assign.propertyType + count: 1 + path: src/Mapping/ClassMetadata.php + + - + message: '#^Strict comparison using \!\=\= between Doctrine\\ORM\\Mapping\\FieldMapping and false will always evaluate to true\.$#' + identifier: notIdentical.alwaysTrue + count: 2 + path: src/Mapping/ClassMetadata.php + + - + message: '#^Template type T is declared as covariant, but occurs in invariant position in property Doctrine\\ORM\\Mapping\\ClassMetadata\:\:\$name\.$#' + identifier: generics.variance + count: 1 + path: src/Mapping/ClassMetadata.php + + - + message: '#^Template type T is declared as covariant, but occurs in invariant position in property Doctrine\\ORM\\Mapping\\ClassMetadata\:\:\$reflClass\.$#' + identifier: generics.variance + count: 1 + path: src/Mapping/ClassMetadata.php + + - + message: '#^Unable to resolve the template type C in call to method Doctrine\\ORM\\Mapping\\ClassMetadata\\:\:fullyQualifiedClassName\(\)$#' + identifier: argument.templateType + count: 1 + path: src/Mapping/ClassMetadata.php + + - + message: '#^If condition is always true\.$#' + identifier: if.alwaysTrue + count: 1 + path: src/Mapping/ClassMetadataFactory.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ClassMetadataFactory\:\:addDefaultDiscriminatorMap\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/ClassMetadataFactory.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ClassMetadataFactory\:\:addInheritedEmbeddedClasses\(\) has parameter \$parentClass with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/ClassMetadataFactory.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ClassMetadataFactory\:\:addInheritedEmbeddedClasses\(\) has parameter \$subClass with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/ClassMetadataFactory.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ClassMetadataFactory\:\:addInheritedFields\(\) has parameter \$parentClass with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/ClassMetadataFactory.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ClassMetadataFactory\:\:addInheritedFields\(\) has parameter \$subClass with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/ClassMetadataFactory.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ClassMetadataFactory\:\:addInheritedIndexes\(\) has parameter \$parentClass with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/ClassMetadataFactory.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ClassMetadataFactory\:\:addInheritedIndexes\(\) has parameter \$subClass with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/ClassMetadataFactory.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ClassMetadataFactory\:\:addInheritedRelations\(\) has parameter \$parentClass with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/ClassMetadataFactory.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ClassMetadataFactory\:\:addInheritedRelations\(\) has parameter \$subClass with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/ClassMetadataFactory.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ClassMetadataFactory\:\:addMappingInheritanceInformation\(\) has parameter \$parentClass with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/ClassMetadataFactory.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ClassMetadataFactory\:\:addNestedEmbeddedClasses\(\) has parameter \$parentClass with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/ClassMetadataFactory.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ClassMetadataFactory\:\:addNestedEmbeddedClasses\(\) has parameter \$subClass with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/ClassMetadataFactory.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ClassMetadataFactory\:\:completeIdGeneratorMapping\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/ClassMetadataFactory.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ClassMetadataFactory\:\:doLoadMetadata\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/ClassMetadataFactory.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ClassMetadataFactory\:\:doLoadMetadata\(\) has parameter \$parent with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/ClassMetadataFactory.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ClassMetadataFactory\:\:findAbstractEntityClassesNotListedInDiscriminatorMap\(\) has parameter \$rootEntityClass with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/ClassMetadataFactory.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ClassMetadataFactory\:\:inheritIdGeneratorMapping\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/ClassMetadataFactory.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ClassMetadataFactory\:\:inheritIdGeneratorMapping\(\) has parameter \$parent with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/ClassMetadataFactory.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ClassMetadataFactory\:\:initializeReflection\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/ClassMetadataFactory.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ClassMetadataFactory\:\:isEntity\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/ClassMetadataFactory.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ClassMetadataFactory\:\:newClassMetadataInstance\(\) return type with generic class Doctrine\\ORM\\Mapping\\ClassMetadata does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/ClassMetadataFactory.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ClassMetadataFactory\:\:onNotFoundMetadata\(\) return type with generic class Doctrine\\ORM\\Mapping\\ClassMetadata does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/ClassMetadataFactory.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ClassMetadataFactory\:\:validateRuntimeMetadata\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/ClassMetadataFactory.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ClassMetadataFactory\:\:validateRuntimeMetadata\(\) has parameter \$parent with generic interface Doctrine\\Persistence\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/ClassMetadataFactory.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ClassMetadataFactory\:\:wakeupReflection\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/ClassMetadataFactory.php + + - + message: '#^Parameter \#1 \$generator of method Doctrine\\ORM\\Mapping\\ClassMetadata\\:\:setIdGenerator\(\) expects Doctrine\\ORM\\Id\\AbstractIdGenerator, object given\.$#' + identifier: argument.type + count: 1 + path: src/Mapping/ClassMetadataFactory.php + + - + message: '#^Parameter \#1 \$rootEntityClass of static method Doctrine\\ORM\\Mapping\\MappingException\:\:missingInheritanceTypeDeclaration\(\) expects class\-string, class\-string\|false given\.$#' + identifier: argument.type + count: 1 + path: src/Mapping/ClassMetadataFactory.php + + - + message: '#^Property Doctrine\\ORM\\Mapping\\DefaultEntityListenerResolver\:\:\$instances \(array\\) does not accept array\\.$#' + identifier: assign.propertyType + count: 1 + path: src/Mapping/DefaultEntityListenerResolver.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$joinColumns\.$#' + identifier: property.notFound + count: 1 + path: src/Mapping/DefaultQuoteStrategy.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\DefaultQuoteStrategy\:\:getColumnAlias\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/DefaultQuoteStrategy.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\DefaultQuoteStrategy\:\:getColumnName\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/DefaultQuoteStrategy.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\DefaultQuoteStrategy\:\:getIdentifierColumnNames\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/DefaultQuoteStrategy.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\DefaultQuoteStrategy\:\:getJoinColumnName\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/DefaultQuoteStrategy.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\DefaultQuoteStrategy\:\:getJoinTableName\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/DefaultQuoteStrategy.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\DefaultQuoteStrategy\:\:getReferencedJoinColumnName\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/DefaultQuoteStrategy.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\DefaultQuoteStrategy\:\:getSequenceName\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/DefaultQuoteStrategy.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\DefaultQuoteStrategy\:\:getTableName\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/DefaultQuoteStrategy.php + + - + message: '#^Expression on left side of \?\? is not nullable\.$#' + identifier: nullCoalesce.expr + count: 1 + path: src/Mapping/Driver/AttributeDriver.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\Driver\\AttributeDriver\:\:isRepeatedPropertyDeclaration\(\) has parameter \$metadata with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/Driver/AttributeDriver.php + + - + message: '#^Parameter \#1 \$mapping of method Doctrine\\ORM\\Mapping\\ClassMetadata\\:\:mapEmbedded\(\) expects array\{fieldName\: string, class\?\: class\-string, declaredField\?\: string, columnPrefix\?\: string\|false\|null, originalField\?\: string\}, array\{fieldName\: string, cache\?\: array\{usage\: int, region\: string\|null\}, class\: string\|null, columnPrefix\: bool\|string\|null\} given\.$#' + identifier: argument.type + count: 1 + path: src/Mapping/Driver/AttributeDriver.php + + - + message: '#^Unable to resolve the template type C in call to method Doctrine\\ORM\\Mapping\\ClassMetadata\\:\:fullyQualifiedClassName\(\)$#' + identifier: argument.templateType + count: 1 + path: src/Mapping/Driver/AttributeDriver.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\Driver\\SimplifiedXmlDriver\:\:__construct\(\) has parameter \$fileExtension with no type specified\.$#' + identifier: missingType.parameter + count: 1 + path: src/Mapping/Driver/SimplifiedXmlDriver.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\Driver\\SimplifiedXmlDriver\:\:__construct\(\) has parameter \$prefixes with no type specified\.$#' + identifier: missingType.parameter + count: 1 + path: src/Mapping/Driver/SimplifiedXmlDriver.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\Driver\\XmlDriver\:\:cacheToArray\(\) should return array\{usage\: int\|null, region\?\: string\} but returns array\{usage\: ''''\|''0''\|int\|null, region\: string\|null\}\.$#' + identifier: return.type + count: 1 + path: src/Mapping/Driver/XmlDriver.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\Driver\\XmlDriver\:\:columnToArray\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Mapping/Driver/XmlDriver.php + + - + message: '#^Parameter \#1 \$columnDef of method Doctrine\\ORM\\Mapping\\ClassMetadata\\:\:setDiscriminatorColumn\(\) expects array\{name\: string\|null, fieldName\?\: string\|null, type\?\: string\|null, length\?\: int\|null, columnDefinition\?\: string\|null, enumType\?\: class\-string\\|null, options\?\: array\\|null\}\|Doctrine\\ORM\\Mapping\\DiscriminatorColumnMapping\|null, array\{name\: string\|null, type\: string, length\: int, columnDefinition\: string\|null, enumType\: string\|null, options\?\: array\\|bool\|string\>\} given\.$#' + identifier: argument.type + count: 1 + path: src/Mapping/Driver/XmlDriver.php + + - + message: '#^Parameter \#1 \$data of function simplexml_load_string expects string, string\|false given\.$#' + identifier: argument.type + count: 1 + path: src/Mapping/Driver/XmlDriver.php + + - + message: '#^Parameter \#1 \$mapping of method Doctrine\\ORM\\Mapping\\ClassMetadata\\:\:mapEmbedded\(\) expects array\{fieldName\: string, class\?\: class\-string, declaredField\?\: string, columnPrefix\?\: string\|false\|null, originalField\?\: string\}, array\{fieldName\: string, class\: string\|null, columnPrefix\: string\|false\|null\} given\.$#' + identifier: argument.type + count: 1 + path: src/Mapping/Driver/XmlDriver.php + + - + message: '#^Parameter \#1 \$repositoryClassName of method Doctrine\\ORM\\Mapping\\ClassMetadata\\:\:setCustomRepositoryClass\(\) expects class\-string\\|null, string given\.$#' + identifier: argument.type + count: 1 + path: src/Mapping/Driver/XmlDriver.php + + - + message: '#^Parameter \#1 \$repositoryClassName of method Doctrine\\ORM\\Mapping\\ClassMetadata\\:\:setCustomRepositoryClass\(\) expects class\-string\\|null, string\|null given\.$#' + identifier: argument.type + count: 1 + path: src/Mapping/Driver/XmlDriver.php + + - + message: '#^Property Doctrine\\ORM\\Mapping\\ClassMetadata\\:\:\$table \(array\{name\: string, schema\?\: string, indexes\?\: array, uniqueConstraints\?\: array, options\?\: array\, quoted\?\: bool\}\) does not accept array\{name\: string, schema\?\: string, indexes\?\: array, uniqueConstraints\?\: array, options\: array\\|bool\|string\>, quoted\?\: bool\}\.$#' + identifier: assign.propertyType + count: 1 + path: src/Mapping/Driver/XmlDriver.php + + - + message: '#^Property Doctrine\\ORM\\Mapping\\FieldMapping\:\:\$declared \(class\-string\|null\) does not accept string\|null\.$#' + identifier: assign.propertyType + count: 1 + path: src/Mapping/FieldMapping.php + + - + message: '#^Property Doctrine\\ORM\\Mapping\\FieldMapping\:\:\$enumType \(class\-string\\|null\) does not accept string\|null\.$#' + identifier: assign.propertyType + count: 1 + path: src/Mapping/FieldMapping.php + + - + message: '#^Property Doctrine\\ORM\\Mapping\\FieldMapping\:\:\$inherited \(class\-string\|null\) does not accept string\|null\.$#' + identifier: assign.propertyType + count: 1 + path: src/Mapping/FieldMapping.php + + - + message: '#^Property Doctrine\\ORM\\Mapping\\FieldMapping\:\:\$options type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Mapping/FieldMapping.php + + - + message: '#^Property Doctrine\\ORM\\Mapping\\JoinTableMapping\:\:\$options \(array\\) does not accept array\\|bool\|string\.$#' + identifier: assign.propertyType + count: 1 + path: src/Mapping/JoinTableMapping.php + + - + message: '#^Property Doctrine\\ORM\\Mapping\\JoinTableMapping\:\:\$quoted \(bool\|null\) does not accept array\\|bool\|string\.$#' + identifier: assign.propertyType + count: 1 + path: src/Mapping/JoinTableMapping.php + + - + message: '#^Property Doctrine\\ORM\\Mapping\\JoinTableMapping\:\:\$schema \(string\|null\) does not accept array\\|bool\|string\.$#' + identifier: assign.propertyType + count: 1 + path: src/Mapping/JoinTableMapping.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\MappedSuperclass\:\:__construct\(\) has parameter \$repositoryClass with generic class Doctrine\\ORM\\EntityRepository but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/MappedSuperclass.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\QuoteStrategy\:\:getColumnAlias\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/QuoteStrategy.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\QuoteStrategy\:\:getColumnName\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/QuoteStrategy.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\QuoteStrategy\:\:getIdentifierColumnNames\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/QuoteStrategy.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\QuoteStrategy\:\:getJoinColumnName\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/QuoteStrategy.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\QuoteStrategy\:\:getJoinTableName\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/QuoteStrategy.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\QuoteStrategy\:\:getReferencedJoinColumnName\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/QuoteStrategy.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\QuoteStrategy\:\:getSequenceName\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/QuoteStrategy.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\QuoteStrategy\:\:getTableName\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Mapping/QuoteStrategy.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ToOneOwningSideMapping\:\:fromMappingArray\(\) should return static\(Doctrine\\ORM\\Mapping\\ToOneOwningSideMapping\) but returns Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\.$#' + identifier: return.type + count: 1 + path: src/Mapping/ToOneOwningSideMapping.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ToOneOwningSideMapping\:\:fromMappingArrayAndName\(\) has parameter \$table with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Mapping/ToOneOwningSideMapping.php + + - + message: '#^Method Doctrine\\ORM\\Mapping\\ToOneOwningSideMapping\:\:fromMappingArrayAndName\(\) should return static\(Doctrine\\ORM\\Mapping\\ToOneOwningSideMapping\) but returns Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\.$#' + identifier: return.type + count: 1 + path: src/Mapping/ToOneOwningSideMapping.php + + - + message: '#^Call to function is_int\(\) with string will always evaluate to false\.$#' + identifier: function.impossibleType + count: 1 + path: src/NativeQuery.php + + - + message: '#^Method Doctrine\\ORM\\NativeQuery\:\:_doExecute\(\) never returns int so it can be removed from the return type\.$#' + identifier: return.unusedType + count: 1 + path: src/NativeQuery.php + + - + message: '#^Result of && is always false\.$#' + identifier: booleanAnd.alwaysFalse + count: 1 + path: src/NativeQuery.php + + - + message: '#^Method Doctrine\\ORM\\ORMInvalidArgumentException\:\:invalidAssociation\(\) has parameter \$targetClass with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/ORMInvalidArgumentException.php + + - + message: '#^Call to method Doctrine\\ORM\\Mapping\\AssociationMapping\:\:isToMany\(\) will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: src/PersistentCollection.php + + - + message: '#^Method Doctrine\\ORM\\PersistentCollection\:\:__construct\(\) has parameter \$typeClass with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/PersistentCollection.php + + - + message: '#^Method Doctrine\\ORM\\PersistentCollection\:\:get\(\) should return T\|null but returns object\|null\.$#' + identifier: return.type + count: 1 + path: src/PersistentCollection.php + + - + message: '#^Method Doctrine\\ORM\\PersistentCollection\:\:getTypeClass\(\) return type with generic class Doctrine\\ORM\\Mapping\\ClassMetadata does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/PersistentCollection.php + + - + message: '#^Method Doctrine\\ORM\\PersistentCollection\:\:matching\(\) should return Doctrine\\Common\\Collections\\Collection\ but returns Doctrine\\Common\\Collections\\ArrayCollection\<\(int\|string\), mixed\>\|Doctrine\\ORM\\LazyCriteriaCollection\<\(int\|string\), object\>\.$#' + identifier: return.type + count: 1 + path: src/PersistentCollection.php + + - + message: '#^Method Doctrine\\ORM\\PersistentCollection\:\:matching\(\) should return Doctrine\\Common\\Collections\\Collection\ but returns Doctrine\\Common\\Collections\\ReadableCollection\&Doctrine\\Common\\Collections\\Selectable\\.$#' + identifier: return.type + count: 1 + path: src/PersistentCollection.php + + - + message: '#^Parameter \#1 \$key of method Doctrine\\ORM\\PersistentCollection\\:\:set\(\) expects TKey of \(int\|string\), int\|string given\.$#' + identifier: argument.type + count: 1 + path: src/PersistentCollection.php + + - + message: '#^Parameter \#2 \$callback of function array_walk expects callable\(object, int\)\: mixed, array\{Doctrine\\Common\\Collections\\Collection\&Doctrine\\Common\\Collections\\Selectable\, ''add''\} given\.$#' + identifier: argument.type + count: 1 + path: src/PersistentCollection.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\CollectionPersister\:\:contains\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/CollectionPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\CollectionPersister\:\:containsKey\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/CollectionPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\CollectionPersister\:\:count\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/CollectionPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\CollectionPersister\:\:delete\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/CollectionPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\CollectionPersister\:\:get\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/CollectionPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\CollectionPersister\:\:loadCriteria\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/CollectionPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\CollectionPersister\:\:slice\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/CollectionPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\CollectionPersister\:\:update\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/CollectionPersister.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$joinTable\.$#' + identifier: property.notFound + count: 1 + path: src/Persisters/Collection/ManyToManyPersister.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$joinTableColumns\.$#' + identifier: property.notFound + count: 1 + path: src/Persisters/Collection/ManyToManyPersister.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$relationToSourceKeyColumns\.$#' + identifier: property.notFound + count: 1 + path: src/Persisters/Collection/ManyToManyPersister.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$relationToTargetKeyColumns\.$#' + identifier: property.notFound + count: 1 + path: src/Persisters/Collection/ManyToManyPersister.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$joinTable\.$#' + identifier: property.notFound + count: 2 + path: src/Persisters/Collection/ManyToManyPersister.php + + - + message: '#^Call to function assert\(\) with true will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 2 + path: src/Persisters/Collection/ManyToManyPersister.php + + - + message: '#^Call to method Doctrine\\ORM\\Mapping\\AssociationMapping\:\:isIndexed\(\) will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 2 + path: src/Persisters/Collection/ManyToManyPersister.php + + - + message: '#^Instanceof between Doctrine\\ORM\\Mapping\\InverseSideMapping&Doctrine\\ORM\\Mapping\\ManyToManyAssociationMapping and Doctrine\\ORM\\Mapping\\InverseSideMapping will always evaluate to true\.$#' + identifier: instanceof.alwaysTrue + count: 2 + path: src/Persisters/Collection/ManyToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\ManyToManyPersister\:\:collectJoinTableColumnParameters\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/ManyToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\ManyToManyPersister\:\:contains\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/ManyToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\ManyToManyPersister\:\:containsKey\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/ManyToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\ManyToManyPersister\:\:count\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/ManyToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\ManyToManyPersister\:\:delete\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/ManyToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\ManyToManyPersister\:\:generateFilterConditionSQL\(\) has parameter \$targetEntity with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/ManyToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\ManyToManyPersister\:\:get\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/ManyToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\ManyToManyPersister\:\:getDeleteRowSQL\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/ManyToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\ManyToManyPersister\:\:getDeleteRowSQLParameters\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/ManyToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\ManyToManyPersister\:\:getDeleteSQL\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/ManyToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\ManyToManyPersister\:\:getDeleteSQLParameters\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/ManyToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\ManyToManyPersister\:\:getInsertRowSQL\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/ManyToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\ManyToManyPersister\:\:getInsertRowSQLParameters\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/ManyToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\ManyToManyPersister\:\:getJoinTableRestrictions\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/ManyToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\ManyToManyPersister\:\:getJoinTableRestrictionsWithKey\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/ManyToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\ManyToManyPersister\:\:getMapping\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/ManyToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\ManyToManyPersister\:\:getOrderingSql\(\) has parameter \$targetClass with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/ManyToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\ManyToManyPersister\:\:loadCriteria\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/ManyToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\ManyToManyPersister\:\:slice\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/ManyToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\ManyToManyPersister\:\:update\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/ManyToManyPersister.php + + - + message: '#^Parameter \#1 \$association of method Doctrine\\ORM\\Mapping\\QuoteStrategy\:\:getJoinTableName\(\) expects Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping, Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping given\.$#' + identifier: argument.type + count: 1 + path: src/Persisters/Collection/ManyToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\OneToManyPersister\:\:contains\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/OneToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\OneToManyPersister\:\:containsKey\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/OneToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\OneToManyPersister\:\:count\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/OneToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\OneToManyPersister\:\:delete\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/OneToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\OneToManyPersister\:\:deleteEntityCollection\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/OneToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\OneToManyPersister\:\:deleteJoinedEntityCollection\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/OneToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\OneToManyPersister\:\:get\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/OneToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\OneToManyPersister\:\:getMapping\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/OneToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\OneToManyPersister\:\:loadCriteria\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/OneToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\OneToManyPersister\:\:slice\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/OneToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Collection\\OneToManyPersister\:\:update\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Collection/OneToManyPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Entity\\AbstractEntityInheritancePersister\:\:getSelectColumnSQL\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Entity/AbstractEntityInheritancePersister.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$joinColumns\.$#' + identifier: property.notFound + count: 5 + path: src/Persisters/Entity/BasicEntityPersister.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$mappedBy\.$#' + identifier: property.notFound + count: 1 + path: src/Persisters/Entity/BasicEntityPersister.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$targetToSourceKeyColumns\.$#' + identifier: property.notFound + count: 1 + path: src/Persisters/Entity/BasicEntityPersister.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$joinTable\.$#' + identifier: property.notFound + count: 4 + path: src/Persisters/Entity/BasicEntityPersister.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$relationToTargetKeyColumns\.$#' + identifier: property.notFound + count: 1 + path: src/Persisters/Entity/BasicEntityPersister.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$sourceToTargetKeyColumns\.$#' + identifier: property.notFound + count: 1 + path: src/Persisters/Entity/BasicEntityPersister.php + + - + message: '#^Call to an undefined method Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:indexBy\(\)\.$#' + identifier: method.notFound + count: 1 + path: src/Persisters/Entity/BasicEntityPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Entity\\BasicEntityPersister\:\:__construct\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Entity/BasicEntityPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Entity\\BasicEntityPersister\:\:expandCriteriaParameters\(\) should return array\{list\, list\\} but returns array\{array\, list\\}\.$#' + identifier: return.type + count: 1 + path: src/Persisters/Entity/BasicEntityPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Entity\\BasicEntityPersister\:\:expandParameters\(\) should return array\{list\, list\\} but returns array\{array\, list\\}\.$#' + identifier: return.type + count: 1 + path: src/Persisters/Entity/BasicEntityPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Entity\\BasicEntityPersister\:\:expandToManyParameters\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Persisters/Entity/BasicEntityPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Entity\\BasicEntityPersister\:\:extractIdentifierTypes\(\) has parameter \$versionedClass with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Entity/BasicEntityPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Entity\\BasicEntityPersister\:\:fetchVersionAndNotUpsertableValues\(\) has parameter \$versionedClass with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Entity/BasicEntityPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Entity\\BasicEntityPersister\:\:generateFilterConditionSQL\(\) has parameter \$targetEntity with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Entity/BasicEntityPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Entity\\BasicEntityPersister\:\:getClassIdentifiersTypes\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Entity/BasicEntityPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Entity\\BasicEntityPersister\:\:getClassMetadata\(\) return type with generic class Doctrine\\ORM\\Mapping\\ClassMetadata does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Entity/BasicEntityPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Entity\\BasicEntityPersister\:\:getIndividualValue\(\) should return list\ but returns array\\.$#' + identifier: return.type + count: 1 + path: src/Persisters/Entity/BasicEntityPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Entity\\BasicEntityPersister\:\:getSelectColumnAssociationSQL\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Entity/BasicEntityPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Entity\\BasicEntityPersister\:\:getSelectColumnSQL\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Entity/BasicEntityPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Entity\\BasicEntityPersister\:\:getTypes\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Entity/BasicEntityPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Entity\\BasicEntityPersister\:\:loadCollectionFromStatement\(\) has parameter \$coll with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Entity/BasicEntityPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Entity\\BasicEntityPersister\:\:loadManyToManyCollection\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Entity/BasicEntityPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Entity\\BasicEntityPersister\:\:loadOneToManyCollection\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Entity/BasicEntityPersister.php + + - + message: '#^Parameter \#1 \$association of method Doctrine\\ORM\\Mapping\\QuoteStrategy\:\:getJoinTableName\(\) expects Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping, Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping given\.$#' + identifier: argument.type + count: 1 + path: src/Persisters/Entity/BasicEntityPersister.php + + - + message: '#^Parameter \#3 \$hints of method Doctrine\\ORM\\Internal\\Hydration\\AbstractHydrator\:\:hydrateAll\(\) expects array\, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/Persisters/Entity/BasicEntityPersister.php + + - + message: '#^Parameter \#3 \$hints of method Doctrine\\ORM\\Internal\\Hydration\\AbstractHydrator\:\:hydrateAll\(\) expects array\, array\ given\.$#' + identifier: argument.type + count: 4 + path: src/Persisters/Entity/BasicEntityPersister.php + + - + message: '#^Property Doctrine\\ORM\\Persisters\\Entity\\CachedPersisterContext\:\:\$sqlTableAliases \(array\\) does not accept array\\.$#' + identifier: assign.propertyType + count: 1 + path: src/Persisters/Entity/BasicEntityPersister.php + + - + message: '#^Strict comparison using \!\=\= between mixed and null will always evaluate to true\.$#' + identifier: notIdentical.alwaysTrue + count: 1 + path: src/Persisters/Entity/BasicEntityPersister.php + + - + message: '#^Strict comparison using \=\=\= between string and null will always evaluate to false\.$#' + identifier: identical.alwaysFalse + count: 1 + path: src/Persisters/Entity/BasicEntityPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Entity\\CachedPersisterContext\:\:__construct\(\) has parameter \$class with generic interface Doctrine\\Persistence\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Entity/CachedPersisterContext.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Entity\\EntityPersister\:\:getClassMetadata\(\) return type with generic class Doctrine\\ORM\\Mapping\\ClassMetadata does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Entity/EntityPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Entity\\EntityPersister\:\:loadManyToManyCollection\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Entity/EntityPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Entity\\EntityPersister\:\:loadOneToManyCollection\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Entity/EntityPersister.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$joinColumns\.$#' + identifier: property.notFound + count: 2 + path: src/Persisters/Entity/JoinedSubclassPersister.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$targetToSourceKeyColumns\.$#' + identifier: property.notFound + count: 1 + path: src/Persisters/Entity/JoinedSubclassPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Entity\\JoinedSubclassPersister\:\:fetchVersionAndNotUpsertableValues\(\) has parameter \$versionedClass with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Entity/JoinedSubclassPersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Entity\\JoinedSubclassPersister\:\:getVersionedClassMetadata\(\) return type with generic class Doctrine\\ORM\\Mapping\\ClassMetadata does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Entity/JoinedSubclassPersister.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$joinColumns\.$#' + identifier: property.notFound + count: 1 + path: src/Persisters/Entity/SingleTablePersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\Entity\\SingleTablePersister\:\:generateFilterConditionSQL\(\) has parameter \$targetEntity with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/Entity/SingleTablePersister.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\SqlExpressionVisitor\:\:__construct\(\) has parameter \$classMetadata with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Persisters/SqlExpressionVisitor.php + + - + message: '#^Method Doctrine\\ORM\\Persisters\\SqlValueVisitor\:\:getParamsAndTypes\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Persisters/SqlValueVisitor.php + + - + message: '#^Parameter \#3 \$className of static method Doctrine\\ORM\\Proxy\\Autoloader\:\:resolveFile\(\) expects class\-string, string given\.$#' + identifier: argument.type + count: 1 + path: src/Proxy/Autoloader.php + + - + message: '#^Parameter \#3 of closure expects class\-string, string given\.$#' + identifier: argument.type + count: 1 + path: src/Proxy/Autoloader.php + + - + message: '#^Method Doctrine\\ORM\\Proxy\\DefaultProxyClassNameResolver\:\:resolveClassName\(\) should return class\-string\ but returns class\-string\\>\|class\-string\\.$#' + identifier: return.type + count: 1 + path: src/Proxy/DefaultProxyClassNameResolver.php + + - + message: '#^Method Doctrine\\ORM\\Proxy\\DefaultProxyClassNameResolver\:\:resolveClassName\(\) should return class\-string\ but returns string\.$#' + identifier: return.type + count: 1 + path: src/Proxy/DefaultProxyClassNameResolver.php + + - + message: '#^Access to an undefined property Doctrine\\Persistence\\Mapping\\ClassMetadata\:\:\$isEmbeddedClass\.$#' + identifier: property.notFound + count: 1 + path: src/Proxy/ProxyFactory.php + + - + message: '#^Access to an undefined property Doctrine\\Persistence\\Mapping\\ClassMetadata\:\:\$isMappedSuperclass\.$#' + identifier: property.notFound + count: 1 + path: src/Proxy/ProxyFactory.php + + - + message: '#^Call to an undefined static method Doctrine\\ORM\\Proxy\\ProxyFactory\:\:createLazyGhost\(\)\.$#' + identifier: staticMethod.notFound + count: 1 + path: src/Proxy/ProxyFactory.php + + - + message: '#^Call to function is_bool\(\) with bool will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 1 + path: src/Proxy/ProxyFactory.php + + - + message: '#^Comparison operation "\<" between 0\|1\|2\|3\|4 and 0 is always false\.$#' + identifier: smaller.alwaysFalse + count: 1 + path: src/Proxy/ProxyFactory.php + + - + message: '#^Comparison operation "\>" between 0\|1\|2\|3\|4 and 4 is always false\.$#' + identifier: greater.alwaysFalse + count: 1 + path: src/Proxy/ProxyFactory.php + + - + message: '#^Method Doctrine\\ORM\\Proxy\\ProxyFactory\:\:createLazyInitializer\(\) has Doctrine\\ORM\\EntityNotFoundException in PHPDoc @throws tag but it''s not thrown\.$#' + identifier: throws.unusedType + count: 1 + path: src/Proxy/ProxyFactory.php + + - + message: '#^Method Doctrine\\ORM\\Proxy\\ProxyFactory\:\:createLazyInitializer\(\) has parameter \$classMetadata with generic interface Doctrine\\Persistence\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Proxy/ProxyFactory.php + + - + message: '#^Method Doctrine\\ORM\\Proxy\\ProxyFactory\:\:createLazyInitializer\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Proxy/ProxyFactory.php + + - + message: '#^Method Doctrine\\ORM\\Proxy\\ProxyFactory\:\:createLazyInitializer\(\) return type with generic interface Doctrine\\ORM\\Proxy\\InternalProxy does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Proxy/ProxyFactory.php + + - + message: '#^Method Doctrine\\ORM\\Proxy\\ProxyFactory\:\:generateProxyClass\(\) has parameter \$class with generic interface Doctrine\\Persistence\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Proxy/ProxyFactory.php + + - + message: '#^Method Doctrine\\ORM\\Proxy\\ProxyFactory\:\:generateProxyClasses\(\) has parameter \$classes with generic interface Doctrine\\Persistence\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Proxy/ProxyFactory.php + + - + message: '#^Method Doctrine\\ORM\\Proxy\\ProxyFactory\:\:generateSerializeImpl\(\) has parameter \$class with generic interface Doctrine\\Persistence\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Proxy/ProxyFactory.php + + - + message: '#^Method Doctrine\\ORM\\Proxy\\ProxyFactory\:\:generateUseLazyGhostTrait\(\) has parameter \$class with generic interface Doctrine\\Persistence\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Proxy/ProxyFactory.php + + - + message: '#^Method Doctrine\\ORM\\Proxy\\ProxyFactory\:\:getProxy\(\) return type with generic interface Doctrine\\ORM\\Proxy\\InternalProxy does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Proxy/ProxyFactory.php + + - + message: '#^Method Doctrine\\ORM\\Proxy\\ProxyFactory\:\:loadProxyClass\(\) has parameter \$class with generic interface Doctrine\\Persistence\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Proxy/ProxyFactory.php + + - + message: '#^Method Doctrine\\ORM\\Proxy\\ProxyFactory\:\:skipClass\(\) has parameter \$metadata with generic interface Doctrine\\Persistence\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Proxy/ProxyFactory.php + + - + message: '#^Parameter \#1 \$class of method Doctrine\\ORM\\Utility\\IdentifierFlattener\:\:flattenIdentifier\(\) expects Doctrine\\ORM\\Mapping\\ClassMetadata, Doctrine\\Persistence\\Mapping\\ClassMetadata given\.$#' + identifier: argument.type + count: 1 + path: src/Proxy/ProxyFactory.php + + - + message: '#^Parameter \#1 \$filename of function filemtime expects string, string\|false given\.$#' + identifier: argument.type + count: 1 + path: src/Proxy/ProxyFactory.php + + - + message: '#^Parameter \#3 \$length of function substr expects int\|null, int\|false given\.$#' + identifier: argument.type + count: 1 + path: src/Proxy/ProxyFactory.php + + - + message: '#^Parameter \#3 \$newScope of static method Closure\:\:bind\(\) expects ''static''\|class\-string\|object\|null, string given\.$#' + identifier: argument.type + count: 1 + path: src/Proxy/ProxyFactory.php + + - + message: '#^Result of \|\| is always false\.$#' + identifier: booleanOr.alwaysFalse + count: 1 + path: src/Proxy/ProxyFactory.php + + - + message: '#^Method Doctrine\\ORM\\Query\:\:processParameterMappings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Query.php + + - + message: '#^Parameter \#1 \$parameters of method Doctrine\\ORM\\AbstractQuery\:\:toIterable\(\) expects array\\|Doctrine\\Common\\Collections\\ArrayCollection\, iterable\<\(int\|string\), mixed\> given\.$#' + identifier: argument.type + count: 1 + path: src/Query.php + + - + message: '#^Parameter \#2 \$sqlParams of method Doctrine\\ORM\\Query\:\:evictResultSetCache\(\) expects array\, list\ given\.$#' + identifier: argument.type + count: 1 + path: src/Query.php + + - + message: '#^Property Doctrine\\ORM\\Query\\AST\\Functions\\BitAndFunction\:\:\$firstArithmetic \(Doctrine\\ORM\\Query\\AST\\Node\) does not accept Doctrine\\ORM\\Query\\AST\\Node\|string\.$#' + identifier: assign.propertyType + count: 1 + path: src/Query/AST/Functions/BitAndFunction.php + + - + message: '#^Property Doctrine\\ORM\\Query\\AST\\Functions\\BitAndFunction\:\:\$secondArithmetic \(Doctrine\\ORM\\Query\\AST\\Node\) does not accept Doctrine\\ORM\\Query\\AST\\Node\|string\.$#' + identifier: assign.propertyType + count: 1 + path: src/Query/AST/Functions/BitAndFunction.php + + - + message: '#^Property Doctrine\\ORM\\Query\\AST\\Functions\\BitOrFunction\:\:\$firstArithmetic \(Doctrine\\ORM\\Query\\AST\\Node\) does not accept Doctrine\\ORM\\Query\\AST\\Node\|string\.$#' + identifier: assign.propertyType + count: 1 + path: src/Query/AST/Functions/BitOrFunction.php + + - + message: '#^Property Doctrine\\ORM\\Query\\AST\\Functions\\BitOrFunction\:\:\$secondArithmetic \(Doctrine\\ORM\\Query\\AST\\Node\) does not accept Doctrine\\ORM\\Query\\AST\\Node\|string\.$#' + identifier: assign.propertyType + count: 1 + path: src/Query/AST/Functions/BitOrFunction.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Query\\AST\\Node\:\:\$value\.$#' + identifier: property.notFound + count: 1 + path: src/Query/AST/Functions/DateAddFunction.php + + - + message: '#^Property Doctrine\\ORM\\Query\\AST\\Functions\\DateAddFunction\:\:\$firstDateExpression \(Doctrine\\ORM\\Query\\AST\\Node\) does not accept Doctrine\\ORM\\Query\\AST\\Node\|string\.$#' + identifier: assign.propertyType + count: 1 + path: src/Query/AST/Functions/DateAddFunction.php + + - + message: '#^Property Doctrine\\ORM\\Query\\AST\\Functions\\DateAddFunction\:\:\$intervalExpression \(Doctrine\\ORM\\Query\\AST\\Node\) does not accept Doctrine\\ORM\\Query\\AST\\Node\|string\.$#' + identifier: assign.propertyType + count: 1 + path: src/Query/AST/Functions/DateAddFunction.php + + - + message: '#^Property Doctrine\\ORM\\Query\\AST\\Functions\\DateDiffFunction\:\:\$date1 \(Doctrine\\ORM\\Query\\AST\\Node\) does not accept Doctrine\\ORM\\Query\\AST\\Node\|string\.$#' + identifier: assign.propertyType + count: 1 + path: src/Query/AST/Functions/DateDiffFunction.php + + - + message: '#^Property Doctrine\\ORM\\Query\\AST\\Functions\\DateDiffFunction\:\:\$date2 \(Doctrine\\ORM\\Query\\AST\\Node\) does not accept Doctrine\\ORM\\Query\\AST\\Node\|string\.$#' + identifier: assign.propertyType + count: 1 + path: src/Query/AST/Functions/DateDiffFunction.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Query\\AST\\Node\:\:\$value\.$#' + identifier: property.notFound + count: 1 + path: src/Query/AST/Functions/DateSubFunction.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$joinColumns\.$#' + identifier: property.notFound + count: 2 + path: src/Query/AST/Functions/IdentityFunction.php + + - + message: '#^Parameter \#1 \$joinColumn of method Doctrine\\ORM\\Mapping\\QuoteStrategy\:\:getJoinColumnName\(\) expects Doctrine\\ORM\\Mapping\\JoinColumnMapping, Doctrine\\ORM\\Mapping\\JoinColumnMapping\|false given\.$#' + identifier: argument.type + count: 1 + path: src/Query/AST/Functions/IdentityFunction.php + + - + message: '#^Parameter \#1 \$simpleArithmeticExpr of method Doctrine\\ORM\\Query\\SqlWalker\:\:walkSimpleArithmeticExpression\(\) expects Doctrine\\ORM\\Query\\AST\\Node\|string, Doctrine\\ORM\\Query\\AST\\Node\|string\|true given\.$#' + identifier: argument.type + count: 1 + path: src/Query/AST/Functions/LocateFunction.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$mappedBy\.$#' + identifier: property.notFound + count: 1 + path: src/Query/AST/Functions/SizeFunction.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$targetToSourceKeyColumns\.$#' + identifier: property.notFound + count: 1 + path: src/Query/AST/Functions/SizeFunction.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$joinTable\.$#' + identifier: property.notFound + count: 1 + path: src/Query/AST/Functions/SizeFunction.php + + - + message: '#^Parameter \#1 \$association of method Doctrine\\ORM\\Mapping\\QuoteStrategy\:\:getJoinTableName\(\) expects Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping, Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping given\.$#' + identifier: argument.type + count: 1 + path: src/Query/AST/Functions/SizeFunction.php + + - + message: '#^Call to an undefined method Doctrine\\ORM\\Query\\SqlWalker\:\:walkJoinPathExpression\(\)\.$#' + identifier: method.notFound + count: 1 + path: src/Query/AST/JoinClassPathExpression.php + + - + message: '#^Call to an undefined method Doctrine\\ORM\\Query\\SqlWalker\:\:walkJoinVariableDeclaration\(\)\.$#' + identifier: method.notFound + count: 1 + path: src/Query/AST/JoinVariableDeclaration.php + + - + message: '#^Call to an undefined method Doctrine\\ORM\\Query\\SqlWalker\:\:walkWhenClauseExpression\(\)\.$#' + identifier: method.notFound + count: 1 + path: src/Query/AST/SimpleWhenClause.php + + - + message: '#^Call to an undefined method Doctrine\\ORM\\Query\\SqlWalker\:\:walkWhenClauseExpression\(\)\.$#' + identifier: method.notFound + count: 1 + path: src/Query/AST/WhenClause.php + + - + message: '#^Argument of an invalid type list\\|string supplied for foreach, only iterables are supported\.$#' + identifier: foreach.nonIterable + count: 1 + path: src/Query/Exec/MultiTableDeleteExecutor.php + + - + message: '#^Cannot assign new offset to list\\|string\.$#' + identifier: offsetAssign.dimType + count: 1 + path: src/Query/Exec/MultiTableDeleteExecutor.php + + - + message: '#^Method Doctrine\\ORM\\Query\\Exec\\MultiTableDeleteExecutor\:\:execute\(\) should return int but returns int\|string\.$#' + identifier: return.type + count: 1 + path: src/Query/Exec/MultiTableDeleteExecutor.php + + - + message: '#^Argument of an invalid type list\\|string supplied for foreach, only iterables are supported\.$#' + identifier: foreach.nonIterable + count: 1 + path: src/Query/Exec/MultiTableUpdateExecutor.php + + - + message: '#^Method Doctrine\\ORM\\Query\\Exec\\MultiTableUpdateExecutor\:\:execute\(\) should return int but returns int\|string\.$#' + identifier: return.type + count: 1 + path: src/Query/Exec/MultiTableUpdateExecutor.php + + - + message: '#^Parameter \#1 \$sql of method Doctrine\\DBAL\\Connection\:\:executeQuery\(\) expects string, list\\|string given\.$#' + identifier: argument.type + count: 1 + path: src/Query/Exec/SingleSelectExecutor.php + + - + message: '#^Method Doctrine\\ORM\\Query\\Exec\\SingleTableDeleteUpdateExecutor\:\:execute\(\) should return int but returns int\|string\.$#' + identifier: return.type + count: 1 + path: src/Query/Exec/SingleTableDeleteUpdateExecutor.php + + - + message: '#^Parameter \#1 \$sql of method Doctrine\\DBAL\\Connection\:\:executeStatement\(\) expects string, list\\|string given\.$#' + identifier: argument.type + count: 1 + path: src/Query/Exec/SingleTableDeleteUpdateExecutor.php + + - + message: '#^PHPDoc type array\ of property Doctrine\\ORM\\Query\\Expr\\Andx\:\:\$allowedClasses is not covariant with PHPDoc type list\ of overridden property Doctrine\\ORM\\Query\\Expr\\Base\:\:\$allowedClasses\.$#' + identifier: property.phpDocType + count: 1 + path: src/Query/Expr/Andx.php + + - + message: '#^Method Doctrine\\ORM\\Query\\Expr\\Func\:\:getArguments\(\) should return list\ but returns array\\.$#' + identifier: return.type + count: 1 + path: src/Query/Expr/Func.php + + - + message: '#^PHPDoc type array\ of property Doctrine\\ORM\\Query\\Expr\\Orx\:\:\$allowedClasses is not covariant with PHPDoc type list\ of overridden property Doctrine\\ORM\\Query\\Expr\\Base\:\:\$allowedClasses\.$#' + identifier: property.phpDocType + count: 1 + path: src/Query/Expr/Orx.php + + - + message: '#^PHPDoc type array\ of property Doctrine\\ORM\\Query\\Expr\\Select\:\:\$allowedClasses is not covariant with PHPDoc type list\ of overridden property Doctrine\\ORM\\Query\\Expr\\Base\:\:\$allowedClasses\.$#' + identifier: property.phpDocType + count: 1 + path: src/Query/Expr/Select.php + + - + message: '#^Property Doctrine\\ORM\\Query\\Filter\\SQLFilter\:\:\$parameters \(array\\) does not accept non\-empty\-array\\.$#' + identifier: assign.propertyType + count: 1 + path: src/Query/Filter/SQLFilter.php + + - + message: '#^@readonly property cannot have a default value\.$#' + identifier: property.readOnlyByPhpDocDefaultValue + count: 3 + path: src/Query/Parser.php + + - + message: '#^Call to an undefined method object\:\:parse\(\)\.$#' + identifier: method.notFound + count: 1 + path: src/Query/Parser.php + + - + message: '#^Method Doctrine\\ORM\\Query\\Parser\:\:CustomFunctionsReturningStrings\(\) should return Doctrine\\ORM\\Query\\AST\\Functions\\FunctionNode but returns object\.$#' + identifier: return.type + count: 1 + path: src/Query/Parser.php + + - + message: '#^Method Doctrine\\ORM\\Query\\Parser\:\:getMetadataForDqlAlias\(\) return type with generic class Doctrine\\ORM\\Mapping\\ClassMetadata does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Query/Parser.php + + - + message: '#^Parameter \#1 \$AST of method Doctrine\\ORM\\Query\\Parser\:\:processDeferredNewObjectExpressions\(\) expects Doctrine\\ORM\\Query\\AST\\SelectStatement, Doctrine\\ORM\\Query\\AST\\DeleteStatement\|Doctrine\\ORM\\Query\\AST\\SelectStatement\|Doctrine\\ORM\\Query\\AST\\UpdateStatement given\.$#' + identifier: argument.type + count: 1 + path: src/Query/Parser.php + + - + message: '#^Parameter \#1 \$expected of method Doctrine\\ORM\\Query\\Parser\:\:syntaxError\(\) expects string, int\|string given\.$#' + identifier: argument.type + count: 3 + path: src/Query/Parser.php + + - + message: '#^Parameter \#1 \$expression of class Doctrine\\ORM\\Query\\AST\\ParenthesisExpression constructor expects Doctrine\\ORM\\Query\\AST\\Node, Doctrine\\ORM\\Query\\AST\\Node\|string given\.$#' + identifier: argument.type + count: 1 + path: src/Query/Parser.php + + - + message: '#^Parameter \#2 \$stringPattern of class Doctrine\\ORM\\Query\\AST\\LikeExpression constructor expects Doctrine\\ORM\\Query\\AST\\Functions\\FunctionNode\|Doctrine\\ORM\\Query\\AST\\InputParameter\|Doctrine\\ORM\\Query\\AST\\Literal\|Doctrine\\ORM\\Query\\AST\\PathExpression, Doctrine\\ORM\\Query\\AST\\Node given\.$#' + identifier: argument.type + count: 1 + path: src/Query/Parser.php + + - + message: '#^Parameter \#3 \$length of function substr expects int\|null, int\|false given\.$#' + identifier: argument.type + count: 1 + path: src/Query/Parser.php + + - + message: '#^Strict comparison using \=\=\= between 102 and 102 will always evaluate to true\.$#' + identifier: identical.alwaysTrue + count: 1 + path: src/Query/Parser.php + + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 2 + path: src/Query/Parser.php + + - + message: '#^Using nullsafe property access "\?\-\>position" on left side of \?\? is unnecessary\. Use \-\> instead\.$#' + identifier: nullsafe.neverNull + count: 1 + path: src/Query/Parser.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$joinColumns\.$#' + identifier: property.notFound + count: 2 + path: src/Query/ResultSetMappingBuilder.php + + - + message: '#^Method Doctrine\\ORM\\Query\\ResultSetMappingBuilder\:\:isInheritanceSupported\(\) has parameter \$classMetadata with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Query/ResultSetMappingBuilder.php + + - + message: '#^Instanceof between Doctrine\\ORM\\Query\\AST\\DeleteStatement and Doctrine\\ORM\\Query\\AST\\DeleteStatement will always evaluate to true\.$#' + identifier: instanceof.alwaysTrue + count: 1 + path: src/Query/SqlOutputWalker.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$joinColumns\.$#' + identifier: property.notFound + count: 2 + path: src/Query/SqlWalker.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$mappedBy\.$#' + identifier: property.notFound + count: 1 + path: src/Query/SqlWalker.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$sourceToTargetKeyColumns\.$#' + identifier: property.notFound + count: 2 + path: src/Query/SqlWalker.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$targetToSourceKeyColumns\.$#' + identifier: property.notFound + count: 3 + path: src/Query/SqlWalker.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$joinColumns\.$#' + identifier: property.notFound + count: 1 + path: src/Query/SqlWalker.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$joinTable\.$#' + identifier: property.notFound + count: 6 + path: src/Query/SqlWalker.php + + - + message: '#^Cannot assign new offset to list\\|string\.$#' + identifier: offsetAssign.dimType + count: 2 + path: src/Query/SqlWalker.php + + - + message: '#^Match arm comparison between 3 and 3 is always true\.$#' + identifier: match.alwaysTrue + count: 1 + path: src/Query/SqlWalker.php + + - + message: '#^Method Doctrine\\ORM\\Query\\SqlWalker\:\:generateClassTableInheritanceJoins\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Query/SqlWalker.php + + - + message: '#^Method Doctrine\\ORM\\Query\\SqlWalker\:\:generateFilterConditionSQL\(\) has parameter \$targetEntity with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Query/SqlWalker.php + + - + message: '#^Method Doctrine\\ORM\\Query\\SqlWalker\:\:getChildDiscriminatorsFromClassMetadata\(\) has parameter \$rootClass with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Query/SqlWalker.php + + - + message: '#^Method Doctrine\\ORM\\Query\\SqlWalker\:\:getMetadataForDqlAlias\(\) return type with generic class Doctrine\\ORM\\Mapping\\ClassMetadata does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Query/SqlWalker.php + + - + message: '#^Parameter \#1 \$association of method Doctrine\\ORM\\Mapping\\QuoteStrategy\:\:getJoinTableName\(\) expects Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping, Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping given\.$#' + identifier: argument.type + count: 2 + path: src/Query/SqlWalker.php + + - + message: '#^Parameter \#1 \$condTerm of method Doctrine\\ORM\\Query\\SqlWalker\:\:walkConditionalTerm\(\) expects Doctrine\\ORM\\Query\\AST\\ConditionalFactor\|Doctrine\\ORM\\Query\\AST\\ConditionalPrimary\|Doctrine\\ORM\\Query\\AST\\ConditionalTerm, Doctrine\\ORM\\Query\\AST\\Phase2OptimizableConditional given\.$#' + identifier: argument.type + count: 1 + path: src/Query/SqlWalker.php + + - + message: '#^Parameter \#1 \$identVariable of method Doctrine\\ORM\\Query\\SqlWalker\:\:walkEntityIdentificationVariable\(\) expects string, Doctrine\\ORM\\Query\\AST\\Node\|string given\.$#' + identifier: argument.type + count: 1 + path: src/Query/SqlWalker.php + + - + message: '#^Parameter \#2 \$fieldName of method Doctrine\\ORM\\Query\\ResultSetMapping\:\:addIndexBy\(\) expects string, string\|false given\.$#' + identifier: argument.type + count: 1 + path: src/Query/SqlWalker.php + + - + message: '#^Property Doctrine\\ORM\\Query\\SqlWalker\:\:\$selectedClasses \(array\\) does not accept non\-empty\-array\\.$#' + identifier: assign.propertyType + count: 1 + path: src/Query/SqlWalker.php + + - + message: '#^Property Doctrine\\ORM\\Query\\SqlWalker\:\:\$selectedClasses with generic class Doctrine\\ORM\\Mapping\\ClassMetadata does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Query/SqlWalker.php + + - + message: '#^Method Doctrine\\ORM\\Query\\TreeWalkerAdapter\:\:getMetadataForDqlAlias\(\) return type with generic class Doctrine\\ORM\\Mapping\\ClassMetadata does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Query/TreeWalkerAdapter.php + + - + message: '#^Argument of an invalid type array\\|object\|string\>\|object\|string\|false supplied for foreach, only iterables are supported\.$#' + identifier: foreach.nonIterable + count: 1 + path: src/QueryBuilder.php + + - + message: '#^Method Doctrine\\ORM\\QueryBuilder\:\:getParameter\(\) should return Doctrine\\ORM\\Query\\Parameter\|null but returns Doctrine\\ORM\\Query\\Parameter\|false\|null\.$#' + identifier: return.type + count: 1 + path: src/QueryBuilder.php + + - + message: '#^Parameter \#2 \$dqlPart of method Doctrine\\ORM\\QueryBuilder\:\:add\(\) expects array\<''join''\|int\<0, max\>, array\\|string\>\|object\|string, array\{Doctrine\\ORM\\Query\\Expr\\Andx\|Doctrine\\ORM\\Query\\Expr\\Orx\}\|Doctrine\\ORM\\Query\\Expr\\Andx given\.$#' + identifier: argument.type + count: 1 + path: src/QueryBuilder.php + + - + message: '#^Parameter \#2 \$dqlPart of method Doctrine\\ORM\\QueryBuilder\:\:add\(\) expects array\<''join''\|int\<0, max\>, array\\|string\>\|object\|string, array\{Doctrine\\ORM\\Query\\Expr\\Composite\}\|Doctrine\\ORM\\Query\\Expr\\Andx given\.$#' + identifier: argument.type + count: 1 + path: src/QueryBuilder.php + + - + message: '#^Parameter \#2 \$dqlPart of method Doctrine\\ORM\\QueryBuilder\:\:add\(\) expects array\<''join''\|int\<0, max\>, array\\|string\>\|object\|string, non\-empty\-array\ given\.$#' + identifier: argument.type + count: 2 + path: src/QueryBuilder.php + + - + message: '#^Parameter \#3 \$length of function substr expects int\|null, int\|false given\.$#' + identifier: argument.type + count: 2 + path: src/QueryBuilder.php + + - + message: '#^Parameter \#3 \$type of method Doctrine\\ORM\\QueryBuilder\:\:setParameter\(\) expects Doctrine\\DBAL\\ArrayParameterType\|Doctrine\\DBAL\\ParameterType\|string\|null, Doctrine\\DBAL\\ArrayParameterType\|Doctrine\\DBAL\\ParameterType\|int\|string\|null given\.$#' + identifier: argument.type + count: 1 + path: src/QueryBuilder.php + + - + message: '#^Method Doctrine\\ORM\\Repository\\DefaultRepositoryFactory\:\:createRepository\(\) return type with generic class Doctrine\\ORM\\EntityRepository does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Repository/DefaultRepositoryFactory.php + + - + message: '#^Property Doctrine\\ORM\\Repository\\DefaultRepositoryFactory\:\:\$repositoryList with generic class Doctrine\\ORM\\EntityRepository does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Repository/DefaultRepositoryFactory.php + + - + message: '#^Access to an undefined property Doctrine\\Persistence\\Mapping\\ClassMetadata\:\:\$name\.$#' + identifier: property.notFound + count: 1 + path: src/Tools/Console/Command/GenerateProxiesCommand.php + + - + message: '#^Parameter \#1 \$filename of function file_exists expects string, string\|false given\.$#' + identifier: argument.type + count: 1 + path: src/Tools/Console/Command/GenerateProxiesCommand.php + + - + message: '#^Parameter \#1 \$filename of function is_writable expects string, string\|false given\.$#' + identifier: argument.type + count: 1 + path: src/Tools/Console/Command/GenerateProxiesCommand.php + + - + message: '#^Parameter \#2 \$proxyDir of method Doctrine\\ORM\\Proxy\\ProxyFactory\:\:generateProxyClasses\(\) expects string\|null, string\|false given\.$#' + identifier: argument.type + count: 1 + path: src/Tools/Console/Command/GenerateProxiesCommand.php + + - + message: '#^Method Doctrine\\ORM\\Tools\\Console\\Command\\MappingDescribeCommand\:\:getClassMetadata\(\) return type with generic class Doctrine\\ORM\\Mapping\\ClassMetadata does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Tools/Console/Command/MappingDescribeCommand.php + + - + message: '#^Parameter \#1 \$entityListeners of method Doctrine\\ORM\\Tools\\Console\\Command\\MappingDescribeCommand\:\:formatEntityListeners\(\) expects list\, array\\> given\.$#' + identifier: argument.type + count: 1 + path: src/Tools/Console/Command/MappingDescribeCommand.php + + - + message: '#^Parameter \#2 \$callback of function array_filter expects \(callable\(class\-string\)\: bool\)\|null, Closure\(mixed\)\: \(0\|1\|false\) given\.$#' + identifier: argument.type + count: 1 + path: src/Tools/Console/Command/MappingDescribeCommand.php + + - + message: '#^Parameter \#1 \$classes of method Doctrine\\ORM\\Tools\\SchemaTool\:\:createSchema\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/Tools/Console/Command/SchemaTool/CreateCommand.php + + - + message: '#^Parameter \#1 \$classes of method Doctrine\\ORM\\Tools\\SchemaTool\:\:getCreateSchemaSql\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/Tools/Console/Command/SchemaTool/CreateCommand.php + + - + message: '#^Parameter \#1 \$classes of method Doctrine\\ORM\\Tools\\SchemaTool\:\:dropSchema\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/Tools/Console/Command/SchemaTool/DropCommand.php + + - + message: '#^Parameter \#1 \$classes of method Doctrine\\ORM\\Tools\\SchemaTool\:\:getDropSchemaSQL\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 2 + path: src/Tools/Console/Command/SchemaTool/DropCommand.php + + - + message: '#^Parameter \#1 \$classes of method Doctrine\\ORM\\Tools\\SchemaTool\:\:getUpdateSchemaSql\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/Tools/Console/Command/SchemaTool/UpdateCommand.php + + - + message: '#^Class Doctrine\\ORM\\Tools\\Console\\MetadataFilter extends generic class FilterIterator but does not specify its types\: TKey, TValue, TIterator$#' + identifier: missingType.generics + count: 1 + path: src/Tools/Console/MetadataFilter.php + + - + message: '#^Method Doctrine\\ORM\\Tools\\Console\\MetadataFilter\:\:__construct\(\) has parameter \$metadata with generic class ArrayIterator but does not specify its types\: TKey, TValue$#' + identifier: missingType.generics + count: 1 + path: src/Tools/Console/MetadataFilter.php + + - + message: '#^Method Doctrine\\ORM\\Tools\\Console\\MetadataFilter\:\:filter\(\) has parameter \$metadatas with generic interface Doctrine\\Persistence\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Tools/Console/MetadataFilter.php + + - + message: '#^Method Doctrine\\ORM\\Tools\\Console\\MetadataFilter\:\:filter\(\) return type with generic interface Doctrine\\Persistence\\Mapping\\ClassMetadata does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Tools/Console/MetadataFilter.php + + - + message: '#^Method Doctrine\\ORM\\Tools\\Console\\MetadataFilter\:\:getInnerIterator\(\) return type with generic interface Doctrine\\Persistence\\Mapping\\ClassMetadata does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Tools/Console/MetadataFilter.php + + - + message: '#^Parameter \#1 \$string of function html_entity_decode expects string, string\|false given\.$#' + identifier: argument.type + count: 1 + path: src/Tools/Debug.php + + - + message: '#^Parameter \#1 \$stream of function fclose expects resource, resource\|false given\.$#' + identifier: argument.type + count: 1 + path: src/Tools/DebugUnitOfWorkListener.php + + - + message: '#^Parameter \#1 \$stream of function fwrite expects resource, resource\|false given\.$#' + identifier: argument.type + count: 14 + path: src/Tools/DebugUnitOfWorkListener.php + + - + message: '#^Method Doctrine\\ORM\\Tools\\Event\\GenerateSchemaTableEventArgs\:\:__construct\(\) has parameter \$classMetadata with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Tools/Event/GenerateSchemaTableEventArgs.php + + - + message: '#^Method Doctrine\\ORM\\Tools\\Event\\GenerateSchemaTableEventArgs\:\:getClassMetadata\(\) return type with generic class Doctrine\\ORM\\Mapping\\ClassMetadata does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Tools/Event/GenerateSchemaTableEventArgs.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$joinColumns\.$#' + identifier: property.notFound + count: 1 + path: src/Tools/Pagination/CountOutputWalker.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$joinColumns\.$#' + identifier: property.notFound + count: 1 + path: src/Tools/Pagination/LimitSubqueryOutputWalker.php + + - + message: '#^Method Doctrine\\ORM\\Tools\\Pagination\\LimitSubqueryOutputWalker\:\:walkSelectStatement\(\) should return string but returns list\\|string\.$#' + identifier: return.type + count: 1 + path: src/Tools/Pagination/LimitSubqueryOutputWalker.php + + - + message: '#^Parameter \#3 \$length of function substr expects int\|null, int\|false given\.$#' + identifier: argument.type + count: 1 + path: src/Tools/Pagination/LimitSubqueryOutputWalker.php + + - + message: '#^Method Doctrine\\ORM\\Tools\\Pagination\\Paginator\:\:count\(\) should return int\<0, max\> but returns int\.$#' + identifier: return.type + count: 1 + path: src/Tools/Pagination/Paginator.php + + - + message: '#^PHPDoc tag @var for variable \$parameters contains generic interface Doctrine\\Common\\Collections\\Collection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/Tools/Pagination/Paginator.php + + - + message: '#^Parameter \#1 \$parameters of method Doctrine\\ORM\\AbstractQuery\:\:setParameters\(\) expects array\\|Doctrine\\Common\\Collections\\ArrayCollection\, Doctrine\\Common\\Collections\\Collection&iterable\ given\.$#' + identifier: argument.type + count: 1 + path: src/Tools/Pagination/Paginator.php + + - + message: '#^Method Doctrine\\ORM\\Tools\\ResolveTargetEntityListener\:\:remapAssociation\(\) has parameter \$classMetadata with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Tools/ResolveTargetEntityListener.php + + - + message: '#^Parameter \#1 \$className of method Doctrine\\Persistence\\Mapping\\AbstractClassMetadataFactory\\:\:setMetadataFor\(\) expects class\-string, \(int\|string\) given\.$#' + identifier: argument.type + count: 1 + path: src/Tools/ResolveTargetEntityListener.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$joinColumns\.$#' + identifier: property.notFound + count: 3 + path: src/Tools/SchemaTool.php + + - + message: '#^Call to function is_numeric\(\) with int\<0, max\> will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 1 + path: src/Tools/SchemaTool.php + + - + message: '#^Method Doctrine\\ORM\\Tools\\SchemaTool\:\:addDiscriminatorColumnDefinition\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Tools/SchemaTool.php + + - + message: '#^Method Doctrine\\ORM\\Tools\\SchemaTool\:\:createSchema\(\) has parameter \$classes with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Tools/SchemaTool.php + + - + message: '#^Method Doctrine\\ORM\\Tools\\SchemaTool\:\:dropSchema\(\) has parameter \$classes with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Tools/SchemaTool.php + + - + message: '#^Method Doctrine\\ORM\\Tools\\SchemaTool\:\:gatherColumn\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Tools/SchemaTool.php + + - + message: '#^Method Doctrine\\ORM\\Tools\\SchemaTool\:\:gatherColumns\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Tools/SchemaTool.php + + - + message: '#^Method Doctrine\\ORM\\Tools\\SchemaTool\:\:gatherRelationJoinColumns\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Tools/SchemaTool.php + + - + message: '#^Method Doctrine\\ORM\\Tools\\SchemaTool\:\:gatherRelationsSql\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Tools/SchemaTool.php + + - + message: '#^Method Doctrine\\ORM\\Tools\\SchemaTool\:\:getCreateSchemaSql\(\) has parameter \$classes with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Tools/SchemaTool.php + + - + message: '#^Method Doctrine\\ORM\\Tools\\SchemaTool\:\:getDefiningClass\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Tools/SchemaTool.php + + - + message: '#^Method Doctrine\\ORM\\Tools\\SchemaTool\:\:getDefiningClass\(\) return type with generic class Doctrine\\ORM\\Mapping\\ClassMetadata does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Tools/SchemaTool.php + + - + message: '#^Method Doctrine\\ORM\\Tools\\SchemaTool\:\:getDropSchemaSQL\(\) has parameter \$classes with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Tools/SchemaTool.php + + - + message: '#^Method Doctrine\\ORM\\Tools\\SchemaTool\:\:getIndexColumns\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Tools/SchemaTool.php + + - + message: '#^Method Doctrine\\ORM\\Tools\\SchemaTool\:\:getSchemaFromMetadata\(\) has parameter \$classes with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Tools/SchemaTool.php + + - + message: '#^Method Doctrine\\ORM\\Tools\\SchemaTool\:\:getUpdateSchemaSql\(\) has parameter \$classes with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Tools/SchemaTool.php + + - + message: '#^Method Doctrine\\ORM\\Tools\\SchemaTool\:\:processingNotRequired\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Tools/SchemaTool.php + + - + message: '#^Negated boolean expression is always false\.$#' + identifier: booleanNot.alwaysFalse + count: 1 + path: src/Tools/SchemaTool.php + + - + message: '#^Parameter \#1 \$classes of method Doctrine\\ORM\\Tools\\SchemaTool\:\:getUpdateSchemaSql\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/Tools/SchemaTool.php + + - + message: '#^Property Doctrine\\ORM\\Tools\\SchemaTool\:\:\$schemaManager with generic class Doctrine\\DBAL\\Schema\\AbstractSchemaManager does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Tools/SchemaTool.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$inversedBy\.$#' + identifier: property.notFound + count: 2 + path: src/Tools/SchemaValidator.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$joinColumns\.$#' + identifier: property.notFound + count: 1 + path: src/Tools/SchemaValidator.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$joinTable\.$#' + identifier: property.notFound + count: 6 + path: src/Tools/SchemaValidator.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$mappedBy\.$#' + identifier: property.notFound + count: 9 + path: src/Tools/SchemaValidator.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$relationToSourceKeyColumns\.$#' + identifier: property.notFound + count: 1 + path: src/Tools/SchemaValidator.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$relationToTargetKeyColumns\.$#' + identifier: property.notFound + count: 1 + path: src/Tools/SchemaValidator.php + + - + message: '#^Call to an undefined method Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:orderBy\(\)\.$#' + identifier: method.notFound + count: 1 + path: src/Tools/SchemaValidator.php + + - + message: '#^Method Doctrine\\ORM\\Tools\\SchemaValidator\:\:validateClass\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Tools/SchemaValidator.php + + - + message: '#^Method Doctrine\\ORM\\Tools\\SchemaValidator\:\:validatePropertiesTypes\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Tools/SchemaValidator.php + + - + message: '#^ Parameter \#3 \$changeSet of class Doctrine\\ORM\\Event\\PreUpdateEventArgs constructor is passed by reference, so it expects variables only$#' + identifier: argument.byRef + count: 1 + path: src/UnitOfWork.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$inversedBy\.$#' + identifier: property.notFound + count: 1 + path: src/UnitOfWork.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$joinColumns\.$#' + identifier: property.notFound + count: 3 + path: src/UnitOfWork.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$mappedBy\.$#' + identifier: property.notFound + count: 1 + path: src/UnitOfWork.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$targetToSourceKeyColumns\.$#' + identifier: property.notFound + count: 1 + path: src/UnitOfWork.php + + - + message: '#^Method Doctrine\\ORM\\UnitOfWork\:\:convertSingleFieldIdentifierToPHPValue\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/UnitOfWork.php + + - + message: '#^Method Doctrine\\ORM\\UnitOfWork\:\:eagerLoadCollections\(\) has parameter \$collections with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/UnitOfWork.php + + - + message: '#^Method Doctrine\\ORM\\UnitOfWork\:\:getEntityChangeSet\(\) return type with generic class Doctrine\\ORM\\PersistentCollection does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/UnitOfWork.php + + - + message: '#^Method Doctrine\\ORM\\UnitOfWork\:\:hasMissingIdsWhichAreForeignKeys\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/UnitOfWork.php + + - + message: '#^Method Doctrine\\ORM\\UnitOfWork\:\:isCollectionScheduledForDeletion\(\) has parameter \$coll with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/UnitOfWork.php + + - + message: '#^Method Doctrine\\ORM\\UnitOfWork\:\:loadCollection\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/UnitOfWork.php + + - + message: '#^Method Doctrine\\ORM\\UnitOfWork\:\:normalizeIdentifier\(\) has parameter \$targetClass with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/UnitOfWork.php + + - + message: '#^Method Doctrine\\ORM\\UnitOfWork\:\:scheduleCollectionDeletion\(\) has parameter \$coll with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/UnitOfWork.php + + - + message: '#^Method Doctrine\\ORM\\UnitOfWork\:\:scheduleCollectionForBatchLoading\(\) has parameter \$collection with generic class Doctrine\\ORM\\PersistentCollection but does not specify its types\: TKey, T$#' + identifier: missingType.generics + count: 1 + path: src/UnitOfWork.php + + - + message: '#^Method Doctrine\\ORM\\UnitOfWork\:\:scheduleCollectionForBatchLoading\(\) has parameter \$sourceClass with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/UnitOfWork.php + + - + message: '#^PHPDoc tag @phpstan\-assert\-if\-true for \$obj contains generic interface Doctrine\\ORM\\Proxy\\InternalProxy but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/UnitOfWork.php + + - + message: '#^Parameter \#2 \$assoc of method Doctrine\\ORM\\PersistentCollection\<\(int\|string\),mixed\>\:\:setOwner\(\) expects Doctrine\\ORM\\Mapping\\AssociationMapping&Doctrine\\ORM\\Mapping\\ToManyAssociationMapping, Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping given\.$#' + identifier: argument.type + count: 4 + path: src/UnitOfWork.php + + - + message: '#^Parameter \#2 \$assoc of method Doctrine\\ORM\\PersistentCollection\<\*NEVER\*,\*NEVER\*\>\:\:setOwner\(\) expects Doctrine\\ORM\\Mapping\\AssociationMapping&Doctrine\\ORM\\Mapping\\ToManyAssociationMapping, Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping given\.$#' + identifier: argument.type + count: 1 + path: src/UnitOfWork.php + + - + message: '#^Parameter \#2 \$length of function array_chunk expects int\<1, max\>, int given\.$#' + identifier: argument.type + count: 2 + path: src/UnitOfWork.php + + - + message: '#^Parameter \#3 \$collection of class Doctrine\\ORM\\PersistentCollection constructor expects Doctrine\\Common\\Collections\\Collection\<\(int\|string\), mixed\>&Doctrine\\Common\\Collections\\Selectable\<\(int\|string\), mixed\>, Doctrine\\Common\\Collections\\Collection given\.$#' + identifier: argument.type + count: 1 + path: src/UnitOfWork.php + + - + message: '#^Parameter \#5 \$invoke of method Doctrine\\ORM\\Event\\ListenersInvoker\:\:invoke\(\) expects int\<0, 7\>, int\\|int\<1, max\> given\.$#' + identifier: argument.type + count: 1 + path: src/UnitOfWork.php + + - + message: '#^Parameter &\$visited by\-ref type of method Doctrine\\ORM\\UnitOfWork\:\:cascadeDetach\(\) expects array\, array\ given\.$#' + identifier: parameterByRef.type + count: 2 + path: src/UnitOfWork.php + + - + message: '#^Property Doctrine\\ORM\\UnitOfWork\:\:\$entityChangeSets \(array\\>\) does not accept non\-empty\-array\\>\.$#' + identifier: assign.propertyType + count: 1 + path: src/UnitOfWork.php + + - + message: '#^Access to an undefined property Doctrine\\Persistence\\Mapping\\ClassMetadata\:\:\$name\.$#' + identifier: property.notFound + count: 1 + path: src/Utility/HierarchyDiscriminatorResolver.php + + - + message: '#^Access to an undefined property Doctrine\\Persistence\\Mapping\\ClassMetadata\:\:\$subClasses\.$#' + identifier: property.notFound + count: 1 + path: src/Utility/HierarchyDiscriminatorResolver.php + + - + message: '#^Method Doctrine\\ORM\\Utility\\HierarchyDiscriminatorResolver\:\:resolveDiscriminatorsForClass\(\) has parameter \$rootClassMetadata with generic interface Doctrine\\Persistence\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Utility/HierarchyDiscriminatorResolver.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$joinColumns\.$#' + identifier: property.notFound + count: 1 + path: src/Utility/IdentifierFlattener.php + + - + message: '#^Method Doctrine\\ORM\\Utility\\IdentifierFlattener\:\:__construct\(\) has parameter \$metadataFactory with generic interface Doctrine\\Persistence\\Mapping\\ClassMetadataFactory but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Utility/IdentifierFlattener.php + + - + message: '#^Method Doctrine\\ORM\\Utility\\IdentifierFlattener\:\:flattenIdentifier\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Utility/IdentifierFlattener.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\JoinTableMapping\|Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$joinColumns\.$#' + identifier: property.notFound + count: 1 + path: src/Utility/PersisterHelper.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$joinColumns\.$#' + identifier: property.notFound + count: 1 + path: src/Utility/PersisterHelper.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$joinTable\.$#' + identifier: property.notFound + count: 2 + path: src/Utility/PersisterHelper.php + + - + message: '#^Access to an undefined property Doctrine\\ORM\\Mapping\\ManyToManyInverseSideMapping\|Doctrine\\ORM\\Mapping\\ManyToManyOwningSideMapping\|Doctrine\\ORM\\Mapping\\ManyToOneAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToManyAssociationMapping\|Doctrine\\ORM\\Mapping\\OneToOneInverseSideMapping\|Doctrine\\ORM\\Mapping\\OneToOneOwningSideMapping\:\:\$mappedBy\.$#' + identifier: property.notFound + count: 1 + path: src/Utility/PersisterHelper.php + + - + message: '#^Method Doctrine\\ORM\\Utility\\PersisterHelper\:\:getTypeOfColumn\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Utility/PersisterHelper.php + + - + message: '#^Method Doctrine\\ORM\\Utility\\PersisterHelper\:\:getTypeOfField\(\) has parameter \$class with generic class Doctrine\\ORM\\Mapping\\ClassMetadata but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Utility/PersisterHelper.php diff --git a/phpstan-params.neon b/phpstan-params.neon index a7d3556b84..bff368e711 100644 --- a/phpstan-params.neon +++ b/phpstan-params.neon @@ -1,5 +1,5 @@ parameters: - level: 5 + level: 7 paths: - src - tests/StaticAnalysis @@ -8,4 +8,4 @@ parameters: earlyTerminatingMethodCalls: Doctrine\ORM\Query\Parser: - syntaxError - phpVersion: 80200 + phpVersion: 80400 diff --git a/psalm-baseline.xml b/psalm-baseline.xml deleted file mode 100644 index cb06169f8d..0000000000 --- a/psalm-baseline.xml +++ /dev/null @@ -1,1184 +0,0 @@ - - - - - isEmpty() ? $filteredParameters->first() : null]]> - - - - - - - - - - - - - - - - - - - - - - - - - getConfiguration() - ->getSecondLevelCacheConfiguration() - ->getCacheFactory()]]> - - - - - - - - - - - - - identifiers[$assocIndex]]]> - identifiers[$assocIndex]]]> - identifiers[$index]]]> - identifiers[$index]]]> - - - class]]> - class]]> - - - - - - - - - - - - - - - - - - - - - - identifiers]]> - - - getOwner()]]> - - - - - - - - - getOwner()]]> - getOwner()]]> - - - - - getOwner()]]> - - - - - getOwner()]]> - getOwner()]]> - - - - - - - - - - - - class]]> - - - getOwner()]]> - getOwner()]]> - - - getCache()]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - time]]> - - - - - - - - - - - - - - - - name ? $entity : null]]> - load($sortedId, null, null, [], $lockMode)]]> - loadById($sortedId)]]> - metadataFactory]]> - - - - - - getProxyDir()]]> - getProxyNamespace()]]> - - - - - - - - - - - - - - - load($criteria, null, null, [], null, 1, $orderBy)]]> - - - - &Selectable]]> - - - - loadAll($criteria, $orderBy, $limit, $offset)]]> - - - ]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - resultPointers[$parent]]]> - - - resultPointers[$parent][key($first)]]]> - resultPointers[$dqlAlias] =& $coll[array_key_last($coll)]]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - columnNames]]> - columnNames]]> - columnNames]]> - columnNames]]> - - - - - - - - - - - - - - - - - - - - - declaredField]]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - table]]> - table]]> - - - - - - - - - - - table[$indexType][$indexName]]]> - - - table[$indexType]]]> - - - em]]> - em]]> - - - - - - - - - - - - - generatorType]]> - idGenerator]]> - - - - - - - - - - - instances]]> - - - - - - - - - - - - - - - - - - - - - - - $seqGeneratorAttribute->sequenceName, - 'allocationSize' => $seqGeneratorAttribute->allocationSize, - 'initialValue' => $seqGeneratorAttribute->initialValue, - ]]]> - - - - - - - - - - - - getReflectionClass()]]> - - - - - - - - - name)]]> - - - - - - - - - - - - - - - - - cacheToArray($manyToManyElement->cache)]]> - cacheToArray($manyToOneElement->cache)]]> - cacheToArray($oneToManyElement->cache)]]> - cacheToArray($oneToOneElement->cache)]]> - - - table]]> - - - - $usage, - 'region' => $region, - ]]]> - - - - - - - - - - - - - - - - - - - - - - - - - mappedBy)]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ]]> - - - fetch === ClassMetadata::FETCH_EXTRA_LAZY - ? new LazyCriteriaCollection($persister, $criteria) - : new ArrayCollection($persister->loadCriteria($criteria))]]> - em->find($this->typeClass->name, $key)]]> - - - ]]> - - - unwrap()->matching($criteria)]]> - - - - - - - backRefFieldName]]> - - - - - - - unwrap(), 'add']]]> - - - - - getOwner()]]> - getOwner()]]> - getOwner()]]> - getOwner()]]> - getOwner()]]> - getOwner()]]> - getOwner()]]> - - - - - - - - - - getOwner()]]> - getOwner()]]> - getOwner()]]> - - - - - - - - - - true]]]> - true]]]> - true]]]> - - - - - - - - - - ]]> - - - - - - - - - - - - currentPersisterContext->sqlTableAliases]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - proxyFactories]]> - - - isEmbeddedClass]]> - isMappedSuperclass]]> - - - proxyFactories[$className] = $proxyFactory]]> - - - - - - - - - - 4]]> - - - - - - - - - - - - - - getDQL()]]> - - - - - - - - - - - ArithmeticPrimary()]]> - ArithmeticPrimary()]]> - - - - - ArithmeticPrimary()]]> - ArithmeticPrimary()]]> - - - - - ArithmeticPrimary()]]> - ArithmeticPrimary()]]> - - - unit->value]]> - - - - - ArithmeticPrimary()]]> - ArithmeticPrimary()]]> - - - - - unit->value]]> - - - - - - - - - - simpleArithmeticExpression]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - sqlStatements]]> - - - - - - sqlStatements]]> - - - - - - - - - - - sqlStatements]]> - - - - - sqlStatements]]> - - - - - executeStatement($this->sqlStatements, $params, $types)]]> - - - - - - sqlStatements]]> - - - - - - - - - - - - - - arguments]]> - - - ]]> - - - - - - - - - - conditionType]]> - - - - - - - - - - - - - - - - - - - - - - parameters]]> - - - - - - - - - - - queryComponents]]> - - - - - - - - - - - - - - - - - - - - - lexer->getLiteral($token)]]> - lexer->getLiteral($token)]]> - lexer->getLiteral($token)]]> - - - - query->getDQL()]]> - value]]> - - - value]]> - value]]> - lexer->glimpse()->type]]> - value]]> - value]]> - - - value === TokenType::T_IDENTIFIER->value]]> - - - - - parameters)]]> - - - ]]> - - - - - - - - - - - - - - simpleArithmeticExpression]]> - subselect]]> - - rangeVariableDeclaration]]> - caseOperand]]> - - - scalarResultAliasMap]]> - scalarResultAliasMap]]> - - - - - - - - $join]]]> - $join]]]> - - - - - - - isEmpty() ? $filteredParameters->first() : null]]> - - - - - - - - - - - - - - - - - - - - - - repositoryList[$repositoryHash] ??= $this->createRepository($entityManager, $entityName)]]> - - - - - - - - - - - - - - - - - - - - - name]]> - - - getConfiguration()->getProxyDir()]]> - - - - - - - - - - entityListeners]]> - - - - - - - - - - - - - - - - - - - getName()]]> - getName()]]> - - - - - - - - getName()]]> - getName()]]> - - - - - - - - - - - - - - - - - - getSqlStatements()]]> - - - - - - - - - orderByItems]]> - - - orderByClause]]> - - - orderByItems]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - entityChangeSets]]> - entityChangeSets]]> - - - - - - - - - - identityMap[$rootClassName]]]> - - - getTypeOfField($class->getSingleIdentifierFieldName())]]> - getOwner()]]> - getOwner()]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - name]]> - subClasses]]> - - - diff --git a/psalm.xml b/psalm.xml deleted file mode 100644 index ddb88d51c2..0000000000 --- a/psalm.xml +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/AbstractQuery.php b/src/AbstractQuery.php index f4f3839c53..3143e861fd 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 + * @phpstan-var ArrayCollection */ protected ArrayCollection $parameters; @@ -95,14 +95,14 @@ abstract class AbstractQuery /** * The map of query hints. * - * @psalm-var array + * @phpstan-var array */ 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 + * @phpstan-return ArrayCollection */ 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|mixed[] $parameters + * @phpstan-param ArrayCollection|mixed[] $parameters * * @return $this */ public function setParameters(ArrayCollection|array $parameters): static { if (is_array($parameters)) { - /** @psalm-var ArrayCollection $parameterCollection */ + /** @phpstan-var ArrayCollection $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|mixed[] $parameters - * @psalm-param string|AbstractQuery::HYDRATE_*|null $hydrationMode + * @phpstan-param ArrayCollection|mixed[] $parameters + * @phpstan-param string|AbstractQuery::HYDRATE_*|null $hydrationMode * * @return iterable */ @@ -877,8 +877,8 @@ public function toIterable( /** * Executes the query. * - * @psalm-param ArrayCollection|mixed[]|null $parameters - * @psalm-param string|AbstractQuery::HYDRATE_*|null $hydrationMode + * @phpstan-param ArrayCollection|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|mixed[]|null $parameters - * @psalm-param string|AbstractQuery::HYDRATE_*|null $hydrationMode + * @phpstan-param ArrayCollection|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|mixed[]|null $parameters - * @psalm-param string|AbstractQuery::HYDRATE_*|null $hydrationMode + * @phpstan-param ArrayCollection|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 685181c906..3f947cf773 100644 --- a/src/Cache/DefaultCache.php +++ b/src/Cache/DefaultCache.php @@ -25,7 +25,7 @@ class DefaultCache implements Cache /** * @var QueryCache[] - * @psalm-var array + * @phpstan-var array */ private array $queryCaches = []; diff --git a/src/Cache/DefaultQueryCache.php b/src/Cache/DefaultQueryCache.php index 08e703cd4b..5f280755ec 100644 --- a/src/Cache/DefaultQueryCache.php +++ b/src/Cache/DefaultQueryCache.php @@ -231,7 +231,6 @@ public function put(QueryCacheKey $key, ResultSetMapping $rsm, mixed $result, ar $region = $persister->getCacheRegion(); $cm = $this->em->getClassMetadata($entityName); - assert($cm instanceof ClassMetadata); foreach ($result as $index => $entity) { $identifier = $this->uow->getEntityIdentifier($entity); @@ -297,7 +296,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 +347,7 @@ private function storeAssociationCache(QueryCacheKey $key, AssociationMapping $a ]; } - /** @psalm-return list|object|null */ + /** @phpstan-return list|object|null */ private function getAssociationValue( ResultSetMapping $rsm, string $assocAlias, @@ -374,9 +373,9 @@ private function getAssociationValue( } /** - * @psalm-param array $path + * @phpstan-param array $path * - * @psalm-return list|object|null + * @phpstan-return list|object|null */ private function getAssociationPathValue(mixed $value, array $path): array|object|null { diff --git a/src/Cache/Persister/Entity/AbstractEntityPersister.php b/src/Cache/Persister/Entity/AbstractEntityPersister.php index cbdc50054a..44dd7d888b 100644 --- a/src/Cache/Persister/Entity/AbstractEntityPersister.php +++ b/src/Cache/Persister/Entity/AbstractEntityPersister.php @@ -28,7 +28,6 @@ use Doctrine\ORM\UnitOfWork; use function array_merge; -use function assert; use function serialize; use function sha1; @@ -549,9 +548,10 @@ public function refresh(array $id, object $entity, LockMode|null $lockMode = nul /** @param array $ownerId */ protected function buildCollectionCacheKey(AssociationMapping $association, array $ownerId): CollectionCacheKey { - $metadata = $this->metadataFactory->getMetadataFor($association->sourceEntity); - assert($metadata instanceof ClassMetadata); - - return new CollectionCacheKey($metadata->rootEntityName, $association->fieldName, $ownerId); + return new CollectionCacheKey( + $this->metadataFactory->getMetadataFor($association->sourceEntity)->rootEntityName, + $association->fieldName, + $ownerId, + ); } } diff --git a/src/Configuration.php b/src/Configuration.php index 59ddb214d8..361d146a50 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, ClassMetadata::GENERATOR_TYPE_*> */ + /** @phpstan-var array, ClassMetadata::GENERATOR_TYPE_*> */ private $identityGenerationPreferences = []; - /** @psalm-param array, ClassMetadata::GENERATOR_TYPE_*> $value */ + /** @phpstan-param array, ClassMetadata::GENERATOR_TYPE_*> $value */ public function setIdentityGenerationPreferences(array $value): void { $this->identityGenerationPreferences = $value; } - /** @psalm-return array, ClassMetadata::GENERATOR_TYPE_*> $value */ + /** @phpstan-return array, 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 $entityNamespaces + * @phpstan-param array $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 + * @phpstan-return array */ 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|callable(string):FunctionNode $className + * @phpstan-param class-string|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|callable(string):FunctionNode|null + * @phpstan-return class-string|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|callable(string):FunctionNode> $functions The map of custom + * @phpstan-param array|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|callable(string):FunctionNode $className + * @phpstan-param class-string|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|callable(string):FunctionNode + * @phpstan-return class-string|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|callable(string):FunctionNode $className + * @phpstan-param class-string|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|callable(string):FunctionNode> $functions + * @phpstan-param array|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 + * @phpstan-return array */ 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 $defaultQueryHints + * @phpstan-param array $defaultQueryHints */ public function setDefaultQueryHints(array $defaultQueryHints): void { diff --git a/src/EntityManagerInterface.php b/src/EntityManagerInterface.php index 38295a2f4b..f37aabb1d5 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 */ @@ -116,10 +116,10 @@ public function createQueryBuilder(): QueryBuilder; * should be used during the search. * @param int|null $lockVersion The version of the entity to find when using * optimistic locking. - * @psalm-param class-string $className + * @phpstan-param class-string $className * * @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 @@ -196,7 +196,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 */ @@ -227,9 +227,9 @@ public function hasFilters(): bool; * * @param string|class-string $className * - * @psalm-return ($className is class-string ? Mapping\ClassMetadata : Mapping\ClassMetadata) + * @phpstan-return ($className is class-string ? Mapping\ClassMetadata : Mapping\ClassMetadata) * - * @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 5bfdbc63f3..88699b8bb6 100644 --- a/src/EntityRepository.php +++ b/src/EntityRepository.php @@ -77,7 +77,7 @@ public function createResultSetMappingBuilder(string $alias): ResultSetMappingBu * should be used during the search. * * @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|null $lockMode = null, int|null $lockVersion = null): object|null { @@ -87,7 +87,7 @@ public function find(mixed $id, LockMode|null $lockMode = null, int|null $lockVe /** * Finds all entities in the repository. * - * @psalm-return list The entities. + * @phpstan-return list The entities. */ public function findAll(): array { @@ -99,7 +99,7 @@ public function findAll(): array * * {@inheritDoc} * - * @psalm-return list + * @phpstan-return list */ public function findBy(array $criteria, array|null $orderBy = null, int|null $limit = null, int|null $offset = null): array { @@ -111,10 +111,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 $criteria - * @psalm-param array|null $orderBy + * @phpstan-param array $criteria + * @phpstan-param array|null $orderBy * - * @psalm-return T|null + * @phpstan-return T|null */ public function findOneBy(array $criteria, array|null $orderBy = null): object|null { @@ -126,10 +126,10 @@ public function findOneBy(array $criteria, array|null $orderBy = null): object|n /** * Counts entities by a set of criteria. * - * @psalm-param array $criteria + * @phpstan-param array $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 */ @@ -142,7 +142,7 @@ public function count(array $criteria = []): int * Adds support for magic method calls. * * @param mixed[] $arguments - * @psalm-param list $arguments + * @phpstan-param list $arguments * * @throws BadMethodCallException If the method called is invalid. */ @@ -183,7 +183,7 @@ protected function getEntityManager(): EntityManagerInterface return $this->em; } - /** @psalm-return ClassMetadata */ + /** @phpstan-return ClassMetadata */ protected function getClassMetadata(): ClassMetadata { return $this->class; @@ -193,7 +193,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&Selectable + * @phpstan-return AbstractLazyCollection&Selectable */ public function matching(Criteria $criteria): AbstractLazyCollection&Selectable { @@ -207,7 +207,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 $arguments The arguments to pass at method call + * @phpstan-param list $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 c0c327e5aa..b7e06912fb 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 Bitmask of subscribed event systems. + * @phpstan-return int-mask-of 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 $invoke Bitmask to invoke listeners. + * @phpstan-param int-mask-of $invoke Bitmask to invoke listeners. */ public function invoke( ClassMetadata $metadata, diff --git a/src/Event/PreUpdateEventArgs.php b/src/Event/PreUpdateEventArgs.php index 090487b860..d50033414c 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 $changeSet + * @phpstan-param array $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 + * @phpstan-return array */ public function getEntityChangeSet(): array { diff --git a/src/Internal/Hydration/AbstractHydrator.php b/src/Internal/Hydration/AbstractHydrator.php index 2ccba498e6..0a44d3a02b 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 $hints + * @phpstan-param array $hints * * @return Generator * @@ -153,7 +153,7 @@ final protected function resultSetMapping(): ResultSetMapping /** * Hydrates all rows returned by the passed statement instance at once. * - * @psalm-param array $hints + * @phpstan-param array $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 $id Dql-Alias => ID-Hash. - * @psalm-param array $nonemptyComponents Does this DQL-Alias has at least one non NULL value? + * @phpstan-param array $id Dql-Alias => ID-Hash. + * @phpstan-param array $nonemptyComponents Does this DQL-Alias has at least one non NULL value? * * @return array> 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, * newObjects?: array $data + * @phpstan-param array $data * * @return mixed[] The processed row. - * @psalm-return array + * @phpstan-return array */ 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|null + * @phpstan-return array|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 + * @phpstan-return non-empty-list */ private function getDiscriminatorValues(ClassMetadata $classMetadata): array { diff --git a/src/Internal/Hydration/ObjectHydrator.php b/src/Internal/Hydration/ObjectHydrator.php index fe780e8b89..21383e8c16 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 $data The instance data. + * @phpstan-param array $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 $data + * @phpstan-param array $data */ private function getEntityFromIdentityMap(string $className, array $data): object|bool { diff --git a/src/Internal/NoUnknownNamedArguments.php b/src/Internal/NoUnknownNamedArguments.php index 7584744c16..a3843307f2 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 $parameter + * @phpstan-assert list $parameter */ private static function validateVariadicParameter(array $parameter): void { diff --git a/src/Mapping/AssociationMapping.php b/src/Mapping/AssociationMapping.php index 0538f5202a..1afb808ae7 100644 --- a/src/Mapping/AssociationMapping.php +++ b/src/Mapping/AssociationMapping.php @@ -95,7 +95,7 @@ final public function __construct( /** * @param mixed[] $mappingArray - * @psalm-param array{ + * @phpstan-param array{ * fieldName: string, * sourceEntity: class-string, * targetEntity: class-string, @@ -151,75 +151,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 e0ebc073fd..a10372dbd2 100644 --- a/src/Mapping/AssociationOverride.php +++ b/src/Mapping/AssociationOverride.php @@ -27,7 +27,7 @@ final class AssociationOverride implements MappingAttribute * @param JoinColumn|array $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 48f052c86d..2e9fca1a9d 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 $columns + * @phpstan-param list $columns * * @return $this */ @@ -127,7 +127,7 @@ public function addIndex(array $columns, string $name): static /** * Adds Unique Constraint. * - * @psalm-param list $columns + * @phpstan-param list $columns * * @return $this */ @@ -235,7 +235,7 @@ public function addLifecycleEvent(string $methodName, string $event): static /** * Adds Field. * - * @psalm-param array $mapping + * @phpstan-param array $mapping * * @return $this */ diff --git a/src/Mapping/Builder/OneToManyAssociationBuilder.php b/src/Mapping/Builder/OneToManyAssociationBuilder.php index 077c558cdd..0b0e1aac9e 100644 --- a/src/Mapping/Builder/OneToManyAssociationBuilder.php +++ b/src/Mapping/Builder/OneToManyAssociationBuilder.php @@ -12,7 +12,7 @@ class OneToManyAssociationBuilder extends AssociationBuilder { /** - * @psalm-param array $fieldNames + * @phpstan-param array $fieldNames * * @return $this */ diff --git a/src/Mapping/Cache.php b/src/Mapping/Cache.php index 3161ab3a54..5eda277c90 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 7181d9f6f1..f72fa5c550 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 6ec95bf58e..a3a8237ac3 100644 --- a/src/Mapping/ClassMetadata.php +++ b/src/Mapping/ClassMetadata.php @@ -70,7 +70,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 */ @@ -234,7 +234,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; @@ -258,7 +258,7 @@ class ClassMetadata implements PersistenceClassMetadata, Stringable * The name of the custom repository class used for the entity class. * (Optional). * - * @psalm-var ?class-string + * @phpstan-var ?class-string */ public string|null $customRepositoryClassName = null; @@ -276,7 +276,7 @@ class ClassMetadata implements PersistenceClassMetadata, Stringable * READ-ONLY: The names of the parent entity classes (ancestors), starting with the * nearest one and ending with the root entity class. * - * @psalm-var list + * @phpstan-var list */ public array $parentClasses = []; @@ -303,14 +303,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 + * @phpstan-var list */ public array $subClasses = []; /** * READ-ONLY: The names of all embedded classes based on properties. * - * @psalm-var array + * @phpstan-var array */ public array $embeddedClasses = []; @@ -318,21 +318,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 + * @phpstan-var list */ 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; @@ -348,7 +348,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 + * @phpstan-var array */ public array $fieldNames = []; @@ -383,7 +383,7 @@ class ClassMetadata implements PersistenceClassMetadata, Stringable * * @var array * - * @psalm-var array + * @phpstan-var array */ public array $discriminatorMap = []; @@ -403,7 +403,7 @@ class ClassMetadata implements PersistenceClassMetadata, Stringable * uniqueConstraints => array * * @var mixed[] - * @psalm-var array{ + * @phpstan-var array{ * name: string, * schema?: string, * indexes?: array, @@ -417,14 +417,14 @@ class ClassMetadata implements PersistenceClassMetadata, Stringable /** * READ-ONLY: The registered lifecycle callbacks for entities of this class. * - * @psalm-var array> + * @phpstan-var array> */ public array $lifecycleCallbacks = []; /** * READ-ONLY: The registered entity listeners. * - * @psalm-var array> + * @phpstan-var array> */ public array $entityListeners = []; @@ -440,7 +440,7 @@ class ClassMetadata implements PersistenceClassMetadata, Stringable * ) * * - * @psalm-var array + * @phpstan-var array */ public array $associationMappings = []; @@ -484,7 +484,7 @@ class ClassMetadata implements PersistenceClassMetadata, Stringable * * * @var array|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; @@ -551,7 +551,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 $name + * @phpstan-param class-string $name */ public function __construct(public string $name, NamingStrategy|null $namingStrategy = null, TypedFieldMapper|null $typedFieldMapper = null) { @@ -565,7 +565,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 + * @phpstan-return array */ public function getReflectionProperties(): array { @@ -631,7 +631,7 @@ public function getIdentifierValues(object $entity): array /** * Populates the entity identifier of an entity. * - * @psalm-param array $id + * @phpstan-param array $id * * @todo Rename to assignIdentifier() */ @@ -937,7 +937,7 @@ public function getReflectionClass(): ReflectionClass return $this->reflClass; } - /** @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'])) { @@ -951,17 +951,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 { @@ -1078,7 +1078,7 @@ public function getAssociationMapping(string $fieldName): AssociationMapping /** * Gets all association mappings of the class. * - * @psalm-return array + * @phpstan-return array */ public function getAssociationMappings(): array { @@ -1144,7 +1144,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, @@ -1240,7 +1240,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 $mapping The mapping. + * @phpstan-param array $mapping The mapping. * * @return ConcreteAssociationMapping * @@ -1455,7 +1455,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 $identifier + * @phpstan-param list $identifier */ public function setIdentifier(array $identifier): void { @@ -1479,10 +1479,10 @@ public function hasField(string $fieldName): bool /** * Gets an array containing all the column names. * - * @psalm-param list|null $fieldNames + * @phpstan-param list|null $fieldNames * * @return mixed[] - * @psalm-return list + * @phpstan-return list */ public function getColumnNames(array|null $fieldNames = null): array { @@ -1496,7 +1496,7 @@ public function getColumnNames(array|null $fieldNames = null): array /** * Returns an array with all the identifier column names. * - * @psalm-return list + * @phpstan-return list */ public function getIdentifierColumnNames(): array { @@ -1523,7 +1523,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 { @@ -1576,7 +1576,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 { @@ -1632,7 +1632,7 @@ public function getTemporaryIdTableName(): string /** * Sets the mapped subclasses of this class. * - * @psalm-param list $subclasses The names of all mapped subclasses. + * @phpstan-param list $subclasses The names of all mapped subclasses. */ public function setSubclasses(array $subclasses): void { @@ -1647,7 +1647,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 $classNames + * @phpstan-param list $classNames */ public function setParentClasses(array $classNames): void { @@ -1661,7 +1661,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 */ @@ -1677,7 +1677,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 */ @@ -1735,7 +1735,7 @@ public function setAssociationOverride(string $fieldName, array $overrideMapping /** * Sets the override for a mapped field. * - * @psalm-param array $overrideMapping + * @phpstan-param array $overrideMapping * * @throws MappingException */ @@ -1830,7 +1830,7 @@ public function setTableName(string $tableName): void * * If a key is omitted, the current value is kept. * - * @psalm-param array $table The table description. + * @phpstan-param array $table The table description. */ public function setPrimaryTable(array $table): void { @@ -1882,7 +1882,7 @@ private function isInheritanceType(int $type): bool /** * Adds a mapped field to the class. * - * @psalm-param array $mapping The field mapping. + * @phpstan-param array $mapping The field mapping. * * @throws MappingException */ @@ -1950,7 +1950,7 @@ public function mapOneToOne(array $mapping): void /** * Adds a one-to-many mapping. * - * @psalm-param array $mapping The mapping. + * @phpstan-param array $mapping The mapping. */ public function mapOneToMany(array $mapping): void { @@ -1964,7 +1964,7 @@ public function mapOneToMany(array $mapping): void /** * Adds a many-to-one mapping. * - * @psalm-param array $mapping The mapping. + * @phpstan-param array $mapping The mapping. */ public function mapManyToOne(array $mapping): void { @@ -1978,7 +1978,7 @@ public function mapManyToOne(array $mapping): void /** * Adds a many-to-many mapping. * - * @psalm-param array $mapping The mapping. + * @phpstan-param array $mapping The mapping. */ public function mapManyToMany(array $mapping): void { @@ -2009,7 +2009,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|null $repositoryClassName + * @phpstan-param class-string|null $repositoryClassName */ public function setCustomRepositoryClass(string|null $repositoryClassName): void { @@ -2049,7 +2049,7 @@ public function hasLifecycleCallbacks(string $lifecycleEvent): bool * Gets the registered lifecycle callbacks for an event. * * @return string[] - * @psalm-return list + * @phpstan-return list */ public function getLifecycleCallbacks(string $event): array { @@ -2076,7 +2076,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> $callbacks + * @phpstan-param array> $callbacks */ public function setLifecycleCallbacks(array $callbacks): void { @@ -2122,7 +2122,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, @@ -2344,7 +2344,7 @@ public function setIdGenerator(AbstractIdGenerator $generator): void /** * Sets definition. * - * @psalm-param array $definition + * @phpstan-param array $definition */ public function setCustomGeneratorDefinition(array $definition): void { @@ -2364,7 +2364,7 @@ public function setCustomGeneratorDefinition(array $definition): void * ) * * - * @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 */ @@ -2397,7 +2397,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 $mapping The version field mapping array. + * @phpstan-param array $mapping The version field mapping array. * * @throws MappingException */ @@ -2466,7 +2466,7 @@ public function getAssociationNames(): array /** * {@inheritDoc} * - * @psalm-return class-string + * @phpstan-return class-string * * @throws InvalidArgumentException */ @@ -2510,7 +2510,7 @@ public function getAssociationMappedByTargetField(string $assocName): string /** * @param C $className * - * @psalm-return (C is class-string ? class-string : string) + * @phpstan-return (C is class-string ? class-string : string) * * @template C of string */ @@ -2531,7 +2531,7 @@ public function getMetadataValue(string $name): mixed /** * Map Embedded Class * - * @psalm-param array{ + * @phpstan-param array{ * fieldName: string, * class?: class-string, * declaredField?: string, @@ -2638,7 +2638,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 f2bd3717d0..abd6ef9482 100644 --- a/src/Mapping/ClassMetadataFactory.php +++ b/src/Mapping/ClassMetadataFactory.php @@ -605,7 +605,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 68121e67ec..e044f5e314 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|null $enumType * @param array $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 f2b4437266..f8fe3298a5 100644 --- a/src/Mapping/DefaultTypedFieldMapper.php +++ b/src/Mapping/DefaultTypedFieldMapper.php @@ -19,7 +19,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|string> $typedFieldMappings */ @@ -70,8 +70,6 @@ public function validateAndComplete(array $mapping, ReflectionProperty $field): assert(is_a($type->getName(), BackedEnum::class, true)); $mapping['enumType'] = $type->getName(); $type = $reflection->getBackingType(); - - assert($type instanceof ReflectionNamedType); } if (isset($mapping['type'])) { diff --git a/src/Mapping/DiscriminatorColumnMapping.php b/src/Mapping/DiscriminatorColumnMapping.php index 6ac928662b..1648d4fb12 100644 --- a/src/Mapping/DiscriminatorColumnMapping.php +++ b/src/Mapping/DiscriminatorColumnMapping.php @@ -31,7 +31,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 da125fc394..e337d60ea5 100644 --- a/src/Mapping/Driver/AttributeDriver.php +++ b/src/Mapping/Driver/AttributeDriver.php @@ -15,7 +15,6 @@ use InvalidArgumentException; use ReflectionClass; use ReflectionMethod; -use ReflectionProperty; use function assert; use function class_exists; @@ -273,8 +272,6 @@ public function loadMetadataForClass(string $className, PersistenceClassMetadata } foreach ($reflectionClass->getProperties() as $property) { - assert($property instanceof ReflectionProperty); - if ($this->isRepeatedPropertyDeclaration($property, $metadata)) { continue; } @@ -285,8 +282,6 @@ public function loadMetadataForClass(string $className, PersistenceClassMetadata // Evaluate #[Cache] attribute $cacheAttribute = $this->reader->getPropertyAttribute($property, Mapping\Cache::class); if ($cacheAttribute !== null) { - assert($cacheAttribute instanceof Mapping\Cache); - $mapping['cache'] = $metadata->getAssociationCacheDefaults( $mapping['fieldName'], [ @@ -560,7 +555,6 @@ public function loadMetadataForClass(string $className, PersistenceClassMetadata $listenerClass = new ReflectionClass($listenerClassName); foreach ($listenerClass->getMethods(ReflectionMethod::IS_PUBLIC) as $method) { - assert($method instanceof ReflectionMethod); // find method callbacks. $callbacks = $this->getMethodCallbacks($method); $hasMapping = $hasMapping ?: ! empty($callbacks); @@ -584,7 +578,6 @@ public function loadMetadataForClass(string $className, PersistenceClassMetadata } foreach ($reflectionClass->getMethods(ReflectionMethod::IS_PUBLIC) as $method) { - assert($method instanceof ReflectionMethod); foreach ($this->getMethodCallbacks($method) as $value) { $metadata->addLifecycleCallback($value[0], $value[1]); } @@ -629,7 +622,7 @@ private function getGeneratedMode(string $generatedMode): int * Parses the given method. * * @return list - * @psalm-return list + * @phpstan-return list */ private function getMethodCallbacks(ReflectionMethod $method): array { @@ -677,7 +670,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 +702,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 2de622a07d..fb8a4002b1 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> + * @phpstan-return class-string-map> * * @template T of MappingAttribute */ diff --git a/src/Mapping/Driver/XmlDriver.php b/src/Mapping/Driver/XmlDriver.php index 9ea73869d7..c8707610df 100644 --- a/src/Mapping/Driver/XmlDriver.php +++ b/src/Mapping/Driver/XmlDriver.php @@ -408,7 +408,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 @@ -538,7 +537,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 @@ -666,7 +664,7 @@ public function loadMetadataForClass($className, PersistenceClassMetadata $metad * Parses (nested) option elements. * * @return mixed[] The options array. - * @psalm-return array|bool|string> + * @phpstan-return array|bool|string> */ private function parseOptions(SimpleXMLElement|null $options): array { @@ -701,7 +699,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, @@ -745,7 +743,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, @@ -831,7 +829,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 { @@ -858,7 +856,7 @@ private function cacheToArray(SimpleXMLElement $cacheMapping): array * @param SimpleXMLElement $cascadeElement The cascade element. * * @return string[] The list of cascade options. - * @psalm-return list + * @phpstan-return list */ private function getCascadeMappings(SimpleXMLElement $cascadeElement): array { diff --git a/src/Mapping/EmbeddedClassMapping.php b/src/Mapping/EmbeddedClassMapping.php index e9244c9fed..12574a8a6d 100644 --- a/src/Mapping/EmbeddedClassMapping.php +++ b/src/Mapping/EmbeddedClassMapping.php @@ -43,7 +43,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 0e27913fc5..6466aa065d 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>|null $repositoryClass */ + /** @phpstan-param class-string>|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 425f7763f2..48595ecc16 100644 --- a/src/Mapping/FieldMapping.php +++ b/src/Mapping/FieldMapping.php @@ -22,7 +22,7 @@ final class FieldMapping 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|null */ public string|null $enumType = null; @@ -81,7 +81,7 @@ public function __construct( /** * @param array $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 aca5f4b14c..385b2c0eb0 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 c042ee79b6..b33afd8608 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 036ae834e5..3d5a5db7e1 100644 --- a/src/Mapping/JoinColumnMapping.php +++ b/src/Mapping/JoinColumnMapping.php @@ -26,7 +26,7 @@ public function __construct( /** * @param array $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 d625dc5be5..dd1f75fb39 100644 --- a/src/Mapping/JoinTableMapping.php +++ b/src/Mapping/JoinTableMapping.php @@ -28,7 +28,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 d90a762fa6..60d2e761a7 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 b09d56c7e3..d8abaedaee 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 8fccff3e45..b02d9333ff 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 d71c4f9341..ac73e6e094 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 786e981277..139c1d9ef0 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 1ddf21c8fe..80c2392aca 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|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 9eb3e53635..7b78d12a81 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 + * @phpstan-return list */ public function getIdentifierColumnNames(ClassMetadata $class, AbstractPlatform $platform): array; diff --git a/src/Mapping/ReflectionEmbeddedProperty.php b/src/Mapping/ReflectionEmbeddedProperty.php index da3d09749b..27aabadec2 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 2e4969c47c..fb1fdf3fe8 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 306880dd51..d2ad759537 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 5be89e6db5..64a2301943 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 cb85afbde1..ed3d596f80 100644 --- a/src/Mapping/ToOneOwningSideMapping.php +++ b/src/Mapping/ToOneOwningSideMapping.php @@ -27,7 +27,7 @@ abstract class ToOneOwningSideMapping extends OwningSideMapping implements ToOne /** * @param array $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 876a92a261..e83e246d7d 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 * @template-implements Selectable */ @@ -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 + * @phpstan-var array */ 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&Selectable $collection The collection elements. + * @phpstan-param Collection&Selectable $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 The last snapshot of the elements. + * @phpstan-return array 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 + * @phpstan-return array */ 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 + * @phpstan-return Collection * * @throws RuntimeException */ diff --git a/src/Persisters/Collection/ManyToManyPersister.php b/src/Persisters/Collection/ManyToManyPersister.php index 7cf993d599..893e0644e6 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 + * @phpstan-return list */ 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} + * @phpstan-return array{0: string, 1: list} */ 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 + * @phpstan-return list */ 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} + * @phpstan-return array{0: string, 1: list} */ 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 + * @phpstan-return list */ 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 + * @phpstan-return list */ 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, 2: list, 3: list} + * @phpstan-return array{0: string, 1: list, 2: list, 3: list} */ 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, 2: list, 3: list} + * @phpstan-return array{0: string, 1: list, 2: list, 3: list} */ private function getJoinTableRestrictions( PersistentCollection $collection, diff --git a/src/Persisters/Entity/BasicEntityPersister.php b/src/Persisters/Entity/BasicEntityPersister.php index c7c68bf8da..0906d39152 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 + * @phpstan-var array */ protected array $queuedInserts = []; @@ -585,7 +585,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> + * @phpstan-return array> */ protected function prepareUpdateData(object $entity, bool $isInsert = false): array { @@ -704,7 +704,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 + * @phpstan-return array */ protected function prepareInsertData(object $entity): array { @@ -1165,7 +1165,7 @@ public function getCountSQL(array|Criteria $criteria = []): string /** * Gets the ORDER BY SQL snippet for ordered collections. * - * @psalm-param array $orderBy + * @phpstan-param array $orderBy * * @throws InvalidOrientation * @throws InvalidFindByCall @@ -1447,7 +1447,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 + * @phpstan-return list */ protected function getInsertColumnList(): array { @@ -1662,7 +1662,7 @@ public function getSelectConditionStatementSQL( * Builds the left-hand-side of a where condition statement. * * @return string[] - * @psalm-return list + * @phpstan-return list * * @throws InvalidFindByCall * @throws UnrecognizedField @@ -1737,7 +1737,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 $criteria + * @phpstan-param array $criteria */ protected function getSelectConditionSQL(array $criteria, AssociationMapping|null $assoc = null): string { @@ -1861,7 +1861,7 @@ public function expandParameters(array $criteria): array * - class to which the field belongs to * * @return mixed[][] - * @psalm-return array{0: array, 1: list} + * @phpstan-return array{0: array, 1: list} */ private function expandToManyParameters(array $criteria): array { @@ -1961,7 +1961,7 @@ private function getValues(mixed $value): array /** * Retrieves an individual parameter value. * - * @psalm-return list + * @phpstan-return list */ private function getIndividualValue(mixed $value): array { @@ -2092,7 +2092,7 @@ protected function switchPersisterContext(int|null $offset, int|null $limit): vo /** * @return string[] - * @psalm-return list + * @phpstan-return list */ protected function getClassIdentifiersTypes(ClassMetadata $class): array { diff --git a/src/Persisters/Entity/EntityPersister.php b/src/Persisters/Entity/EntityPersister.php index 58df298e43..b0d29fe063 100644 --- a/src/Persisters/Entity/EntityPersister.php +++ b/src/Persisters/Entity/EntityPersister.php @@ -47,7 +47,7 @@ public function getInsertSQL(): string; * * @param mixed[]|Criteria $criteria * @param mixed[]|null $orderBy - * @psalm-param AssociationMapping|null $assoc + * @phpstan-param AssociationMapping|null $assoc */ public function getSelectSQL( array|Criteria $criteria, @@ -70,14 +70,14 @@ public function getCountSQL(array|Criteria $criteria = []): string; * * @param string[] $criteria * - * @psalm-return array{list, list} + * @phpstan-return array{list, list} */ 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, list} + * @phpstan-return array{list, list} */ public function expandCriteriaParameters(Criteria $criteria): array; @@ -125,7 +125,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; @@ -151,9 +151,9 @@ public function getOwningTable(string $fieldName): string; * should be used for loading the entity. * @param int|null $limit Limit number of results. * @param string[]|null $orderBy Criteria to order by. - * @psalm-param array $criteria - * @psalm-param array $hints - * @psalm-param array|null $orderBy + * @phpstan-param array $criteria + * @phpstan-param array $hints + * @phpstan-param array|null $orderBy * * @return object|null The loaded and managed entity instance or NULL if the entity can not be found. * @@ -173,7 +173,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 $identifier The entity identifier. + * @phpstan-param array $identifier The entity identifier. * * @return object|null The loaded and managed entity instance or NULL if the entity can not be found. * @@ -187,7 +187,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 $identifier The identifier of the entity to load. Must be provided if + * @phpstan-param array $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. * @@ -202,7 +202,7 @@ public function loadOneToOneEntity(AssociationMapping $assoc, object $sourceEnti * * @param LockMode|null $lockMode The lock mode or NULL if no specific lock mode * should be used for refreshing the managed entity. - * @psalm-param array $id The identifier of the entity as an + * @phpstan-param array $id The identifier of the entity as an * associative array from column or * field names to values. */ @@ -218,8 +218,8 @@ public function loadCriteria(Criteria $criteria): array; /** * Loads a list of entities by a list of field criteria. * - * @psalm-param array|null $orderBy - * @psalm-param array $criteria + * @phpstan-param array|null $orderBy + * @phpstan-param array $criteria * * @return mixed[] */ @@ -271,7 +271,7 @@ public function loadOneToManyCollection( /** * Locks all rows of this entity matching the given criteria with the specified pessimistic lock mode. * - * @psalm-param array $criteria + * @phpstan-param array $criteria */ public function lock(array $criteria, LockMode $lockMode): void; diff --git a/src/Persisters/Entity/JoinedSubclassPersister.php b/src/Persisters/Entity/JoinedSubclassPersister.php index f42d4533ab..6b21f68d68 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 + * @phpstan-var array */ private array $owningTableMap = []; /** * Map of table to quoted table names. * - * @psalm-var array + * @phpstan-var array */ private array $quotedTableMap = []; diff --git a/src/Persisters/SqlValueVisitor.php b/src/Persisters/SqlValueVisitor.php index 7f987ad981..b346ec9447 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>} + * @phpstan-return array{0: array, 1: array>} */ public function getParamsAndTypes(): array { diff --git a/src/Proxy/Autoloader.php b/src/Proxy/Autoloader.php index 1013e735d3..a16d6fb360 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 b7dae94d10..2411e6ea51 100644 --- a/src/Query.php +++ b/src/Query.php @@ -113,7 +113,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; @@ -343,7 +343,7 @@ private function evictEntityCacheRegion(): void * @param array> $paramMappings * * @return mixed[][] - * @psalm-return array{0: list, 1: array} + * @phpstan-return array{0: list, 1: array} * * @throws Query\QueryException */ @@ -394,7 +394,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 { @@ -527,7 +527,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 { diff --git a/src/Query/AST/Functions/ConcatFunction.php b/src/Query/AST/Functions/ConcatFunction.php index 5b8d69605d..7a7d04cd84 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 */ + /** @phpstan-var list */ 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 4cc549e7cd..e49ddba6b3 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/Join.php b/src/Query/AST/Join.php index 34ce83088d..67833096f8 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 9ec20366c0..a7b4aae065 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 4a56fcdf36..15a3abfd02 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 $expectedType */ + /** @phpstan-param int-mask-of $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 276f8f8d94..d838f12378 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 e7baf3721a..6a1d0f19e1 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, WrapperParameterType>|array + * @phpstan-type WrapperParameterType = string|Type|ParameterType|ArrayParameterType + * @phpstan-type WrapperParameterTypeArray = array, WrapperParameterType>|array */ 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|array $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 ac31c0cde3..bbaab2b636 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 a20bcef098..a5dd03fef3 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 */ + /** @phpstan-var list */ protected array $parts = []; - /** @psalm-return list */ + /** @phpstan-return list */ public function getParts(): array { return $this->parts; diff --git a/src/Query/Expr/Base.php b/src/Query/Expr/Base.php index e0f257277d..62a89737d4 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 $args + * @phpstan-param list|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 cd9e8e012a..41bc79bfee 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 $arguments + * @phpstan-param list|mixed $arguments */ public function __construct( protected string $name, @@ -35,7 +35,7 @@ public function getName(): string return $this->name; } - /** @psalm-return list */ + /** @phpstan-return list */ public function getArguments(): array { return $this->arguments; diff --git a/src/Query/Expr/GroupBy.php b/src/Query/Expr/GroupBy.php index fa4625a635..2585196f48 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 */ + /** @phpstan-var list */ protected array $parts = []; - /** @psalm-return list */ + /** @phpstan-return list */ public function getParts(): array { return $this->parts; diff --git a/src/Query/Expr/Join.php b/src/Query/Expr/Join.php index c3b6dc9dd0..80a1acaa4d 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 0c130309c4..4e2618b1a7 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 */ + /** @phpstan-var list */ protected array $parts = []; - /** @psalm-return list */ + /** @phpstan-return list */ public function getParts(): array { return $this->parts; diff --git a/src/Query/Expr/OrderBy.php b/src/Query/Expr/OrderBy.php index ac9e160156..bbaa7f9ec3 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 */ + /** @phpstan-var list */ 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 */ + /** @phpstan-return list */ public function getParts(): array { return $this->parts; diff --git a/src/Query/Expr/Orx.php b/src/Query/Expr/Orx.php index 2ae2332016..0945e26522 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 */ + /** @phpstan-var list */ protected array $parts = []; - /** @psalm-return list */ + /** @phpstan-return list */ public function getParts(): array { return $this->parts; diff --git a/src/Query/Expr/Select.php b/src/Query/Expr/Select.php index 91b0b60094..beedcd3ac8 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 */ + /** @phpstan-var list */ protected array $parts = []; - /** @psalm-return list */ + /** @phpstan-return list */ public function getParts(): array { return $this->parts; diff --git a/src/Query/Filter/SQLFilter.php b/src/Query/Filter/SQLFilter.php index 29f37756eb..4be63539ca 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 + * @phpstan-var array */ 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 $targetEntity + * @phpstan-param ClassMetadata $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 3d3c576d7c..818f76d94b 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 + * @phpstan-var array */ 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 + * @phpstan-return array */ public function getSuspendedFilters(): array { diff --git a/src/Query/Parser.php b/src/Query/Parser.php index 65abf6ca90..c0f11b2462 100644 --- a/src/Query/Parser.php +++ b/src/Query/Parser.php @@ -38,8 +38,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 - * @psalm-type QueryComponent = array{ + * @phpstan-type DqlToken = Token + * @phpstan-type QueryComponent = array{ * metadata?: ClassMetadata, * parent?: string|null, * relation?: AssociationMapping|null, @@ -104,19 +104,19 @@ final class Parser * and still need to be validated. */ - /** @psalm-var list */ + /** @phpstan-var list */ private array $deferredIdentificationVariables = []; - /** @psalm-var list */ + /** @phpstan-var list */ private array $deferredPartialObjectExpressions = []; - /** @psalm-var list */ + /** @phpstan-var list */ private array $deferredPathExpressions = []; - /** @psalm-var list */ + /** @phpstan-var list */ private array $deferredResultVariables = []; - /** @psalm-var list */ + /** @phpstan-var list */ private array $deferredNewObjectExpressions = []; /** @@ -137,7 +137,7 @@ final class Parser /** * Map of declared query components in the parsed query. * - * @psalm-var array + * @phpstan-var array */ private array $queryComponents = []; @@ -160,7 +160,7 @@ final class Parser */ private $customOutputWalker; - /** @psalm-var array */ + /** @phpstan-var array */ private array $identVariableExpressions = []; /** @@ -400,7 +400,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 */ @@ -434,7 +434,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 { @@ -468,7 +468,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 { @@ -990,7 +990,7 @@ public function JoinAssociationPathExpression(): AST\JoinAssociationPathExpressi * * PathExpression ::= IdentificationVariable {"." identifier}* * - * @psalm-param int-mask-of $expectedTypes + * @phpstan-param int-mask-of $expectedTypes */ public function PathExpression(int $expectedTypes): AST\PathExpression { @@ -3325,9 +3325,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 7539e999ac..34225e046e 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> + * @phpstan-var array> */ 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> The parameter mappings. + * @phpstan-return array> 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 + * @phpstan-return list */ public function getSqlParameterPositions(string|int $dqlPosition): array { diff --git a/src/Query/QueryException.php b/src/Query/QueryException.php index 5c82b20a7a..4b8efaeff7 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 $assoc + * @phpstan-param array $assoc */ public static function overwritingJoinConditionsNotYetSupported(array $assoc): self { diff --git a/src/Query/ResultSetMapping.php b/src/Query/ResultSetMapping.php index 920461b53d..430db10fec 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 + * @phpstan-var array */ public array $relationMap = []; @@ -54,7 +54,7 @@ class ResultSetMapping * Maps alias names to parent alias names. * * @ignore - * @psalm-var array + * @phpstan-var array */ 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 + * @phpstan-var array */ 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 + * @phpstan-var array */ public array $scalarMappings = []; @@ -78,7 +78,7 @@ class ResultSetMapping * Maps scalar columns to enums * * @ignore - * @psalm-var array + * @phpstan-var array */ 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 + * @phpstan-var array */ 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 + * @phpstan-var array */ 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 + * @phpstan-var array */ 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 + * @phpstan-var array */ 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 + * @phpstan-var array */ 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 + * @phpstan-var array */ public array $indexByMap = []; @@ -141,35 +141,35 @@ class ResultSetMapping /** * This is necessary to hydrate derivate foreign keys correctly. * - * @psalm-var array> + * @phpstan-var array> */ public array $isIdentifierColumn = []; /** * Maps column names in the result set to field names for each new object expression. * - * @psalm-var array> + * @phpstan-var array> */ public array $newObjectMappings = []; /** * Maps last argument for new objects in order to initiate object construction * - * @psalm-var array + * @phpstan-var array */ public array $nestedNewObjectArguments = []; /** * Maps metadata parameter names to the metadata attribute. * - * @psalm-var array + * @phpstan-var array */ public array $metadataParameterMapping = []; /** * Contains query parameter names to be resolved as discriminator values * - * @psalm-var array + * @phpstan-var array */ 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 f74763c138..726564a3f1 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 $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 $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 $columnAliasMap + * @phpstan-param array $columnAliasMap * * @throws InvalidArgumentException */ @@ -174,9 +174,9 @@ private function isInheritanceSupported(ClassMetadata $classMetadata): bool /** * Gets column alias for a given column. * - * @psalm-param array $customRenameColumns + * @phpstan-param array $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 $customRenameColumns + * @phpstan-param self::COLUMN_RENAMING_* $mode + * @phpstan-param array $customRenameColumns * * @return string[] */ @@ -234,7 +234,7 @@ private function getColumnAliasMap( * expressions have to be written manually. * * @param string[] $tableAliases - * @psalm-param array $tableAliases + * @phpstan-param array $tableAliases */ public function generateSelectClause(array $tableAliases = []): string { diff --git a/src/Query/SqlWalker.php b/src/Query/SqlWalker.php index c8797e736b..58164b4f81 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 + * @phpstan-var array */ private array $newObjectStack = []; @@ -100,7 +100,7 @@ class SqlWalker /** * Map from result variable names to their SQL column alias names. * - * @psalm-var array> + * @phpstan-var array> */ private array $scalarResultAliasMap = []; @@ -121,14 +121,14 @@ class SqlWalker /** * A list of classes that appear in non-scalar SelectExpressions. * - * @psalm-var array + * @phpstan-var array */ private array $selectedClasses = []; /** * The DQL alias of the root class of the currently traversed query. * - * @psalm-var list + * @phpstan-var list */ private array $rootAliases = []; @@ -148,7 +148,7 @@ class SqlWalker */ private readonly QuoteStrategy $quoteStrategy; - /** @psalm-param array $queryComponents The query components (symbol table). */ + /** @phpstan-param array $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 { @@ -240,7 +240,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); @@ -382,7 +381,7 @@ private function generateOrderedCollectionOrderByItems(): string /** * Generates a discriminator column SQL condition for the class with the given DQL alias. * - * @psalm-param list $dqlAliases List of root DQL aliases to inspect for discriminator restrictions. + * @phpstan-param list $dqlAliases List of root DQL aliases to inspect for discriminator restrictions. */ private function generateDiscriminatorColumnConditionSQL(array $dqlAliases): string { @@ -893,7 +892,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 6c215773d4..964762d825 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 $queryComponents The query components (symbol table). + * @phpstan-param array $queryComponents The query components (symbol table). */ public function __construct(AbstractQuery $query, ParserResult $parserResult, array $queryComponents); /** * Returns internal queryComponents array. * - * @psalm-return array + * @phpstan-return array */ public function getQueryComponents(): array; diff --git a/src/Query/TreeWalkerAdapter.php b/src/Query/TreeWalkerAdapter.php index a7948db5c6..dc838a9590 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 7b40ea1778..ac21aaa7c8 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 */ + /** @phpstan-return Generator */ private function getWalkers(): Generator { foreach ($this->walkers as $walkerClass) { diff --git a/src/QueryBuilder.php b/src/QueryBuilder.php index 5a6a6e8db8..1ffc69f7b2 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 + * @phpstan-var array */ private array $dqlParts = [ 'distinct' => false, @@ -70,7 +70,7 @@ class QueryBuilder implements Stringable /** * The query parameters. * - * @psalm-var ArrayCollection + * @phpstan-var ArrayCollection */ private ArrayCollection $parameters; @@ -87,7 +87,7 @@ class QueryBuilder implements Stringable /** * Keeps root entity alias names for join entities. * - * @psalm-var array + * @phpstan-var array */ 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 * * * @return string[] - * @psalm-return list + * @phpstan-return list */ 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 * * * @return string[] - * @psalm-return list + * @phpstan-return list */ public function getAllAliases(): array { @@ -407,7 +407,7 @@ public function getAllAliases(): array * * * @return string[] - * @psalm-return list + * @phpstan-return list */ 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 * ))); * * - * @psalm-param ArrayCollection $parameters + * @phpstan-param ArrayCollection $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 + * @phpstan-return ArrayCollection */ 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|array{join: array} $dqlPart + * @phpstan-param string|object|list|array{join: array} $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'); * * - * @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'); * * - * @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 $dqlParts + * @phpstan-return array $dqlParts */ public function getDQLParts(): array { @@ -1297,7 +1297,7 @@ private function getDQLForSelect(): string return $dql; } - /** @psalm-param array $options */ + /** @phpstan-param array $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|null $parts + * @phpstan-param list|null $parts * * @return $this */ diff --git a/src/Repository/DefaultRepositoryFactory.php b/src/Repository/DefaultRepositoryFactory.php index 5c408fb17f..59a5afdf48 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 + * @phpstan-var array */ private array $repositoryList = []; diff --git a/src/Tools/Console/Command/MappingDescribeCommand.php b/src/Tools/Console/Command/MappingDescribeCommand.php index 26b9b4f382..a0c6953534 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 $propertyMappings + * @phpstan-param array $propertyMappings * * @return string[][] - * @psalm-return list + * @phpstan-return list */ private function formatMappings(array $propertyMappings): array { @@ -266,10 +266,10 @@ private function formatMappings(array $propertyMappings): array /** * Format the entity listeners * - * @psalm-param list $entityListeners + * @phpstan-param list $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 583d90908a..46e842ce97 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 $knownManagers */ + /** @phpstan-param list $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 35f7d051ec..b42123907f 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 5cb65e7a99..b57b2e2940 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, 1: list} + * @phpstan-return array{0: list, 1: list} */ private function generateSqlAliasReplacements(): array { diff --git a/src/Tools/Pagination/Paginator.php b/src/Tools/Pagination/Paginator.php index 1bbb72972d..d74ab6c63f 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 + * @phpstan-return Traversable */ public function getIterator(): Traversable { diff --git a/src/Tools/ResolveTargetEntityListener.php b/src/Tools/ResolveTargetEntityListener.php index 9e485214ea..9760abf00c 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 $mapping + * @phpstan-param array $mapping */ public function addResolveTargetEntity(string $originalEntity, string $newEntity, array $mapping): void { diff --git a/src/Tools/SchemaTool.php b/src/Tools/SchemaTool.php index d68f700466..b87cabac82 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 $classes + * @phpstan-param list $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 $classes + * @phpstan-param list $classes * * @return list 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 $processedClasses + * @phpstan-param array $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 $classes + * @phpstan-param list $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 * }> $addedFks - * @psalm-param array $blacklistedFks + * @phpstan-param array $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 $joinColumns - * @psalm-param list $primaryKeyColumns - * @psalm-param array $joinColumns + * @phpstan-param list $primaryKeyColumns + * @phpstan-param array * }> $addedFks - * @psalm-param array $blacklistedFks + * @phpstan-param array $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 $classes + * @phpstan-param list $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 $classes + * @phpstan-param list $classes * * @return list */ diff --git a/src/Tools/SchemaValidator.php b/src/Tools/SchemaValidator.php index f47563f728..b2f56c6c04 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> + * @phpstan-return array> */ public function validateMapping(): array { @@ -104,7 +104,7 @@ public function validateMapping(): array * Validates a single class of the current. * * @return string[] - * @psalm-return list + * @phpstan-return list */ public function validateClass(ClassMetadata $class): array { diff --git a/src/UnitOfWork.php b/src/UnitOfWork.php index c960b1edd1..5647c972cb 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> + * @phpstan-var array> */ 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> + * @phpstan-var array> */ 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> + * @phpstan-var array> */ 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 + * @phpstan-var array */ private array $entityStates = []; @@ -171,28 +171,28 @@ class UnitOfWork implements PropertyChangedListener /** * A list of all pending entity insertions. * - * @psalm-var array + * @phpstan-var array */ private array $entityInsertions = []; /** * A list of all pending entity updates. * - * @psalm-var array + * @phpstan-var array */ private array $entityUpdates = []; /** * Any pending extra updates that have been scheduled by persisters. * - * @psalm-var array}> + * @phpstan-var array}> */ private array $extraUpdates = []; /** * A list of all pending entity deletions. * - * @psalm-var array + * @phpstan-var array */ private array $entityDeletions = []; @@ -212,14 +212,14 @@ class UnitOfWork implements PropertyChangedListener /** * All pending collection deletions. * - * @psalm-var array> + * @phpstan-var array> */ private array $collectionDeletions = []; /** * All pending collection updates. * - * @psalm-var array> + * @phpstan-var array> */ 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> + * @phpstan-var array> */ 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> + * @phpstan-var array> */ private array $pendingCollectionElementRemovals = []; /** * The entity persister instances used to persist entity instances. * - * @psalm-var array + * @phpstan-var array */ private array $persisters = []; /** * The collection persister instances used to persist collections. * - * @psalm-var array + * @phpstan-var array */ private array $collectionPersisters = []; @@ -275,7 +275,7 @@ class UnitOfWork implements PropertyChangedListener /** * Orphaned entities that are scheduled for removal. * - * @psalm-var array + * @phpstan-var array */ private array $orphanRemovals = []; @@ -510,7 +510,7 @@ private function executeExtraUpdates(): void * Gets the changeset for an entity. * * @return mixed[][] - * @psalm-return array + * @phpstan-return array */ public function & getEntityChangeSet(object $entity): array { @@ -551,8 +551,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 $class - * @psalm-param T $entity + * @phpstan-param ClassMetadata $class + * @phpstan-param T $entity * * @template T of object * @@ -891,8 +891,8 @@ private function computeAssociationChanges(AssociationMapping $assoc, mixed $val } /** - * @psalm-param ClassMetadata $class - * @psalm-param T $entity + * @phpstan-param ClassMetadata $class + * @phpstan-param T $entity * * @template T of object */ @@ -951,8 +951,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 $class - * @psalm-param T $entity + * @phpstan-param ClassMetadata $class + * @phpstan-param T $entity * * @throws ORMInvalidArgumentException If the passed entity is not MANAGED. * @@ -1070,8 +1070,8 @@ private function executeInserts(): void } /** - * @psalm-param ClassMetadata $class - * @psalm-param T $entity + * @phpstan-param ClassMetadata $class + * @phpstan-param T $entity * * @template T of object */ @@ -1422,7 +1422,7 @@ public function scheduleForUpdate(object $entity): void * * Extra updates for entities are stored as (entity, changeset) tuples. * - * @psalm-param array $changeset The changeset of the entity (what to update). + * @phpstan-param array $changeset The changeset of the entity (what to update). * * @ignore */ @@ -1592,9 +1592,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 { @@ -1762,7 +1762,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 $visited The already visited entities. + * @phpstan-param array $visited The already visited entities. * * @throws ORMInvalidArgumentException * @throws UnexpectedValueException @@ -1842,7 +1842,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 $visited The map of the already visited entities. + * @phpstan-param array $visited The map of the already visited entities. * * @throws ORMInvalidArgumentException If the instance is a detached entity. * @throws UnexpectedValueException @@ -1964,7 +1964,7 @@ public function refresh(object $entity, LockMode|null $lockMode = null): void /** * Executes a refresh operation on an entity. * - * @psalm-param array $visited The already visited entities during cascades. + * @phpstan-param array $visited The already visited entities during cascades. * * @throws ORMInvalidArgumentException If the entity is not MANAGED. * @throws TransactionRequiredException @@ -2005,7 +2005,7 @@ private function doRefresh(object $entity, array &$visited, LockMode|null $lockM /** * Cascades a refresh operation to associated entities. * - * @psalm-param array $visited + * @phpstan-param array $visited */ private function cascadeRefresh(object $entity, array &$visited, LockMode|null $lockMode = null): void { @@ -2087,7 +2087,7 @@ private function cascadeDetach(object $entity, array &$visited): void /** * Cascades the save operation to associated entities. * - * @psalm-param array $visited + * @phpstan-param array $visited */ private function cascadePersist(object $entity, array &$visited): void { @@ -2149,7 +2149,7 @@ private function cascadePersist(object $entity, array &$visited): void /** * Cascades the delete operation to associated entities. * - * @psalm-param array $visited + * @phpstan-param array $visited */ private function cascadeRemove(object $entity, array &$visited): void { @@ -2742,7 +2742,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 + * @phpstan-return array */ public function getOriginalEntityData(object $entity): array { @@ -2960,7 +2960,7 @@ public function propertyChanged(object $sender, string $propertyName, mixed $old /** * Gets the currently scheduled entity insertions in this UnitOfWork. * - * @psalm-return array + * @phpstan-return array */ public function getScheduledEntityInsertions(): array { @@ -2970,7 +2970,7 @@ public function getScheduledEntityInsertions(): array /** * Gets the currently scheduled entity updates in this UnitOfWork. * - * @psalm-return array + * @phpstan-return array */ public function getScheduledEntityUpdates(): array { @@ -2980,7 +2980,7 @@ public function getScheduledEntityUpdates(): array /** * Gets the currently scheduled entity deletions in this UnitOfWork. * - * @psalm-return array + * @phpstan-return array */ public function getScheduledEntityDeletions(): array { @@ -2990,7 +2990,7 @@ public function getScheduledEntityDeletions(): array /** * Gets the currently scheduled complete collection deletions * - * @psalm-return array> + * @phpstan-return array> */ public function getScheduledCollectionDeletions(): array { @@ -3000,7 +3000,7 @@ public function getScheduledCollectionDeletions(): array /** * Gets the currently scheduled collection inserts, updates and deletes. * - * @psalm-return array> + * @phpstan-return array> */ public function getScheduledCollectionUpdates(): array { @@ -3026,7 +3026,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 b682125d02..0949f7b12b 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 + * @phpstan-return array */ public static function resolveDiscriminatorsForClass( ClassMetadata $rootClassMetadata, diff --git a/src/Utility/IdentifierFlattener.php b/src/Utility/IdentifierFlattener.php index 3792d334bb..2f16e56e4a 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 + * @phpstan-return array */ 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 ec0b88fd20..0211a60503 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 */ + /** @phpstan-return Paginator */ abstract public function createPaginator(): Paginator; } diff --git a/tests/Tests/Mocks/ConcurrentRegionMock.php b/tests/Tests/Mocks/ConcurrentRegionMock.php index a1e9ac4365..2d5ff97b14 100644 --- a/tests/Tests/Mocks/ConcurrentRegionMock.php +++ b/tests/Tests/Mocks/ConcurrentRegionMock.php @@ -22,13 +22,13 @@ */ class ConcurrentRegionMock implements ConcurrentRegion { - /** @psalm-var array>> */ + /** @phpstan-var array>> */ public array $calls = []; - /** @psalm-var array> */ + /** @phpstan-var array> */ public array $exceptions = []; - /** @psalm-var array */ + /** @phpstan-var array */ public array $locks = []; public function __construct( diff --git a/tests/Tests/Mocks/EntityPersisterMock.php b/tests/Tests/Mocks/EntityPersisterMock.php index fbc8d072d1..e7e5ce8543 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 */ + /** @phpstan-var list */ private array $postInsertIds = []; private bool $existsCalled = false; diff --git a/tests/Tests/Models/CMS/CmsAddressListener.php b/tests/Tests/Models/CMS/CmsAddressListener.php index ce50a28cd0..e06019e541 100644 --- a/tests/Tests/Models/CMS/CmsAddressListener.php +++ b/tests/Tests/Models/CMS/CmsAddressListener.php @@ -10,7 +10,7 @@ class CmsAddressListener { - /** @psalm-var array>> */ + /** @phpstan-var array>> */ public $calls; public function prePersist(): void diff --git a/tests/Tests/Models/CMS/CmsGroup.php b/tests/Tests/Models/CMS/CmsGroup.php index d419b46ba4..d3b9329b51 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 */ + /** @phpstan-var Collection */ #[ManyToMany(targetEntity: 'CmsUser', mappedBy: 'groups')] public $users; @@ -55,7 +55,7 @@ public function addUser(CmsUser $user): void $this->users[] = $user; } - /** @psalm-return Collection */ + /** @phpstan-return Collection */ public function getUsers(): Collection { return $this->users; diff --git a/tests/Tests/Models/CMS/CmsTag.php b/tests/Tests/Models/CMS/CmsTag.php index aef3dc132c..b59f67cead 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 */ + /** @phpstan-var Collection */ #[ManyToMany(targetEntity: 'CmsUser', mappedBy: 'tags')] public $users; @@ -48,7 +48,7 @@ public function addUser(CmsUser $user): void $this->users[] = $user; } - /** @psalm-return Collection */ + /** @phpstan-return Collection */ public function getUsers(): Collection { return $this->users; diff --git a/tests/Tests/Models/CMS/CmsUser.php b/tests/Tests/Models/CMS/CmsUser.php index c0fa4bb76b..d94fa20adc 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 */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'CmsPhonenumber', mappedBy: 'user', cascade: ['persist'], orphanRemoval: true)] public $phonenumbers; - /** @psalm-var Collection */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-return Collection */ public function getPhonenumbers(): Collection { return $this->phonenumbers; @@ -133,7 +133,7 @@ public function addGroup(CmsGroup $group): void $group->addUser($this); } - /** @psalm-return Collection */ + /** @phpstan-return Collection */ public function getGroups(): Collection { return $this->groups; diff --git a/tests/Tests/Models/Cache/Action.php b/tests/Tests/Models/Cache/Action.php index 95495b8df7..88d8dfd349 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 */ + /** @phpstan-var Collection */ #[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 385dc65adc..04d9358ce3 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 */ + /** @phpstan-var Collection */ #[Cache] #[OneToMany(targetEntity: 'AttractionInfo', mappedBy: 'attraction')] protected $infos; @@ -77,7 +77,7 @@ public function setCity(City $city): void $this->city = $city; } - /** @psalm-return Collection */ + /** @phpstan-return Collection */ public function getInfos(): Collection { return $this->infos; diff --git a/tests/Tests/Models/Cache/City.php b/tests/Tests/Models/Cache/City.php index edeec5e77a..834ba0abf0 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 */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-return Collection */ public function getTravels(): Collection { return $this->travels; @@ -88,7 +88,7 @@ public function addAttraction(Attraction $attraction): void $this->attractions[] = $attraction; } - /** @psalm-return Collection */ + /** @phpstan-return Collection */ public function getAttractions(): Collection { return $this->attractions; diff --git a/tests/Tests/Models/Cache/ComplexAction.php b/tests/Tests/Models/Cache/ComplexAction.php index 58eb8513db..7e0da48add 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 */ + /** @phpstan-var Collection */ #[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 d72fbacadf..fafbf3656f 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 */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-return Collection */ public function getCities(): Collection { return $this->cities; } - /** @psalm-param Collection $cities */ + /** @phpstan-param Collection $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 44de9a286f..b38f68ed58 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 */ + /** @phpstan-var Collection */ #[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 784c8ba0b8..167d75817a 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 */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-return Collection */ public function getVisitedCities(): Collection { return $this->visitedCities; diff --git a/tests/Tests/Models/Cache/Traveler.php b/tests/Tests/Models/Cache/Traveler.php index a1f5363785..2e56f0fab8 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 */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-return Collection */ public function getTravels(): Collection { return $this->travels; diff --git a/tests/Tests/Models/Company/CompanyContract.php b/tests/Tests/Models/Company/CompanyContract.php index e52e9e99b5..9f6cc63b32 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 */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-return Collection */ public function getEngineers(): Collection { return $this->engineers; diff --git a/tests/Tests/Models/Company/CompanyContractListener.php b/tests/Tests/Models/Company/CompanyContractListener.php index f3f433fc9b..ea6f37919a 100644 --- a/tests/Tests/Models/Company/CompanyContractListener.php +++ b/tests/Tests/Models/Company/CompanyContractListener.php @@ -10,28 +10,28 @@ class CompanyContractListener { - /** @psalm-var list> */ + /** @phpstan-var list> */ public $postPersistCalls; - /** @psalm-var list> */ + /** @phpstan-var list> */ public $prePersistCalls; - /** @psalm-var list> */ + /** @phpstan-var list> */ public $postUpdateCalls; - /** @psalm-var list> */ + /** @phpstan-var list> */ public $preUpdateCalls; - /** @psalm-var list> */ + /** @phpstan-var list> */ public $postRemoveCalls; - /** @psalm-var list> */ + /** @phpstan-var list> */ public $preRemoveCalls; - /** @psalm-var list> */ + /** @phpstan-var list> */ public $preFlushCalls; - /** @psalm-var list> */ + /** @phpstan-var list> */ public $postLoadCalls; #[ORM\PostPersist] diff --git a/tests/Tests/Models/Company/CompanyEmployee.php b/tests/Tests/Models/Company/CompanyEmployee.php index e48746cab8..6d17eae9d4 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 */ + /** @phpstan-var Collection */ #[ManyToMany(targetEntity: 'CompanyContract', mappedBy: 'engineers', fetch: 'EXTRA_LAZY')] public $contracts; - /** @psalm-var Collection */ + /** @phpstan-var Collection */ #[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 88bdc59b5a..e8c71e1ee1 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 */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-return Collection */ public function getManagers(): Collection { return $this->managers; diff --git a/tests/Tests/Models/Company/CompanyFlexUltraContractListener.php b/tests/Tests/Models/Company/CompanyFlexUltraContractListener.php index e83b68e2a6..70bc525c52 100644 --- a/tests/Tests/Models/Company/CompanyFlexUltraContractListener.php +++ b/tests/Tests/Models/Company/CompanyFlexUltraContractListener.php @@ -11,7 +11,7 @@ class CompanyFlexUltraContractListener { - /** @psalm-var list */ + /** @phpstan-var list */ public $prePersistCalls; #[ORM\PrePersist] diff --git a/tests/Tests/Models/Company/CompanyManager.php b/tests/Tests/Models/Company/CompanyManager.php index c0a12351db..d753bbcdfc 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 */ + /** @phpstan-var Collection */ #[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 3e6de6f503..ecc3e81839 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 */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-return Collection */ public function getEvents(): Collection { return $this->events; diff --git a/tests/Tests/Models/Company/CompanyPerson.php b/tests/Tests/Models/Company/CompanyPerson.php index ad4082a4ea..f6cd16327e 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 */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-return Collection */ public function getFriends(): Collection { return $this->friends; diff --git a/tests/Tests/Models/CustomType/CustomIdObjectTypeParent.php b/tests/Tests/Models/CustomType/CustomIdObjectTypeParent.php index 1df2d4860a..92e6f029ce 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 */ + /** @phpstan-var Collection */ #[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 50107740a2..3771812ed1 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 */ + /** @phpstan-var Collection */ #[ManyToMany(targetEntity: 'Doctrine\Tests\Models\CustomType\CustomTypeParent', mappedBy: 'myFriends')] private $friendsWithMe; - /** @psalm-var Collection */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-return Collection */ public function getMyFriends(): Collection { return $this->myFriends; @@ -69,7 +69,7 @@ public function addFriendWithMe(CustomTypeParent $friend): void $this->getFriendsWithMe()->add($friend); } - /** @psalm-return Collection */ + /** @phpstan-return Collection */ public function getFriendsWithMe() { return $this->friendsWithMe; diff --git a/tests/Tests/Models/DDC117/DDC117Article.php b/tests/Tests/Models/DDC117/DDC117Article.php index 6ab22230e3..b6c2778b0d 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 */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-var Collection */ #[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 adf43398e9..99f8eda98b 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 */ + /** @phpstan-var Collection */ #[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 2a3a27edc5..174483b0c8 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 */ + /** @phpstan-var Collection */ #[ManyToMany(targetEntity: DDC3579Admin::class, mappedBy: 'groups')] private $admins; @@ -46,7 +46,7 @@ public function addAdmin(DDC3579Admin $admin): void $this->admins[] = $admin; } - /** @psalm-return Collection */ + /** @phpstan-return Collection */ public function getAdmins(): Collection { return $this->admins; diff --git a/tests/Tests/Models/DDC3699/DDC3699Child.php b/tests/Tests/Models/DDC3699/DDC3699Child.php index 57a179f8bf..f2b85bb004 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 */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'DDC3699RelationMany', mappedBy: 'child')] public $relations; } diff --git a/tests/Tests/Models/DDC3899/DDC3899User.php b/tests/Tests/Models/DDC3899/DDC3899User.php index 9ae1febb10..32b3de8258 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 */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'DDC3899Contract', mappedBy: 'user')] public $contracts; } diff --git a/tests/Tests/Models/DDC5934/DDC5934BaseContract.php b/tests/Tests/Models/DDC5934/DDC5934BaseContract.php index e1c04ff1f9..61d07001c6 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 */ + /** @phpstan-var Collection */ #[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 b25c5a0f10..9210e097fe 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 */ + /** @phpstan-var ArrayCollection */ #[ManyToMany(targetEntity: 'DDC964User', mappedBy: 'groups')] private $users; @@ -45,7 +45,7 @@ public function addUser(DDC964User $user): void $this->users[] = $user; } - /** @psalm-return ArrayCollection */ + /** @phpstan-return ArrayCollection */ public function getUsers(): ArrayCollection { return $this->users; diff --git a/tests/Tests/Models/DDC964/DDC964User.php b/tests/Tests/Models/DDC964/DDC964User.php index 9adcca23dd..bae9c360d0 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 */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-return Collection */ public function getGroups(): ArrayCollection { return $this->groups; diff --git a/tests/Tests/Models/ECommerce/ECommerceCart.php b/tests/Tests/Models/ECommerce/ECommerceCart.php index 206a409dee..9e494daeea 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 */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-return Collection */ public function getProducts(): Collection { return $this->products; diff --git a/tests/Tests/Models/ECommerce/ECommerceCategory.php b/tests/Tests/Models/ECommerce/ECommerceCategory.php index db64b563f6..959d771af2 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 */ + /** @phpstan-var Collection */ #[ManyToMany(targetEntity: 'ECommerceProduct', mappedBy: 'categories')] private $products; - /** @psalm-var Collection */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'ECommerceCategory', mappedBy: 'parent', cascade: ['persist'])] private $children; @@ -81,7 +81,7 @@ public function removeProduct(ECommerceProduct $product): void } } - /** @psalm-return Collection */ + /** @phpstan-return Collection */ public function getProducts(): Collection { return $this->products; @@ -92,7 +92,7 @@ private function setParent(ECommerceCategory $parent): void $this->parent = $parent; } - /** @psalm-return Collection */ + /** @phpstan-return Collection */ public function getChildren(): Collection { return $this->children; diff --git a/tests/Tests/Models/ECommerce/ECommerceProduct.php b/tests/Tests/Models/ECommerce/ECommerceProduct.php index 8978ab0fad..0a8329e62d 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 */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'ECommerceFeature', mappedBy: 'product', cascade: ['persist'])] private $features; - /** @psalm-var Collection */ + /** @phpstan-var Collection */ #[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 + * @phpstan-var Collection */ #[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 */ + /** @phpstan-return Collection */ public function getFeatures(): Collection { return $this->features; @@ -150,19 +150,19 @@ public function removeCategory(ECommerceCategory $category): void } } - /** @psalm-param Collection $categories */ + /** @phpstan-param Collection $categories */ public function setCategories(Collection $categories): void { $this->categories = $categories; } - /** @psalm-return Collection $categories */ + /** @phpstan-return Collection $categories */ public function getCategories(): Collection { return $this->categories; } - /** @psalm-return Collection $categories */ + /** @phpstan-return Collection $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 7f01b23996..97320be73a 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 f35e88fd5f..5c58328e5e 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 */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'ForumBoard', mappedBy: 'category')] public $boards; diff --git a/tests/Tests/Models/GH7141/GH7141Article.php b/tests/Tests/Models/GH7141/GH7141Article.php index 0e5d448d51..f081131448 100644 --- a/tests/Tests/Models/GH7141/GH7141Article.php +++ b/tests/Tests/Models/GH7141/GH7141Article.php @@ -9,7 +9,7 @@ class GH7141Article { - /** @psalm-var Collection */ + /** @phpstan-var Collection */ private $tags; public function __construct() diff --git a/tests/Tests/Models/GH7316/GH7316Article.php b/tests/Tests/Models/GH7316/GH7316Article.php index 5a582c31b2..9440c4f63a 100644 --- a/tests/Tests/Models/GH7316/GH7316Article.php +++ b/tests/Tests/Models/GH7316/GH7316Article.php @@ -9,7 +9,7 @@ class GH7316Article { - /** @psalm-var Collection */ + /** @phpstan-var Collection */ private $tags; public function __construct() diff --git a/tests/Tests/Models/GeoNames/Admin1.php b/tests/Tests/Models/GeoNames/Admin1.php index f20e365c13..d21290f692 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 */ + /** @phpstan-var Collection */ #[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 eebdf7c20d..5c2e6ebcb6 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 */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-var Collection */ #[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 1c8af8e156..0216cdece8 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 */ + /** @phpstan-var Collection */ #[ManyToMany(targetEntity: SimpleEntity::class)] public $collection = []; } diff --git a/tests/Tests/Models/Legacy/LegacyCar.php b/tests/Tests/Models/Legacy/LegacyCar.php index 5297d6a2e6..42ea5b609f 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 */ + /** @phpstan-var Collection */ #[ManyToMany(targetEntity: 'LegacyUser', mappedBy: 'cars')] public $users; @@ -40,7 +40,7 @@ public function addUser(LegacyUser $user): void $this->users[] = $user; } - /** @psalm-return Collection */ + /** @phpstan-return Collection */ public function getUsers(): Collection { return $this->users; diff --git a/tests/Tests/Models/Legacy/LegacyUser.php b/tests/Tests/Models/Legacy/LegacyUser.php index e43bc6828b..a57ca8f3ab 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 */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'LegacyArticle', mappedBy: 'user')] public $articles; - /** @psalm-var Collection */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'LegacyUserReference', mappedBy: '_source', cascade: ['remove'])] public $references; - /** @psalm-var Collection */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-return Collection */ public function references(): Collection { return $this->references; @@ -90,7 +90,7 @@ public function addCar(LegacyCar $car): void $car->addUser($this); } - /** @psalm-return Collection */ + /** @phpstan-return Collection */ public function getCars(): Collection { return $this->cars; diff --git a/tests/Tests/Models/ManyToManyPersister/ChildClass.php b/tests/Tests/Models/ManyToManyPersister/ChildClass.php index b92cb70ccb..30fb904c02 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 + * @phpstan-var Collection */ #[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 f39cb68a49..bcba7da0fd 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 + * @phpstan-var Collection */ #[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 e9f92dced8..016c2d69f0 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 */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'NavPointOfInterest', mappedBy: 'country')] private $pois; diff --git a/tests/Tests/Models/Navigation/NavPointOfInterest.php b/tests/Tests/Models/Navigation/NavPointOfInterest.php index 711b09514a..7bbec91fb1 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 */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-var Collection */ public function getVisitors(): Collection { return $this->visitors; diff --git a/tests/Tests/Models/Pagination/Company.php b/tests/Tests/Models/Pagination/Company.php index 66f16d874c..f9ee1537dd 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 */ + /** @phpstan-var Collection */ #[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 d9d941def1..c57108b76f 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 */ + /** @phpstan-var Collection */ #[ManyToMany(targetEntity: 'User', mappedBy: 'groups')] public $users; diff --git a/tests/Tests/Models/Quote/User.php b/tests/Tests/Models/Quote/User.php index f58912337c..5a31d9b130 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 */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-return Collection */ public function getPhones(): Collection { return $this->phones; @@ -64,7 +64,7 @@ public function getAddress(): Address|null return $this->address; } - /** @psalm-return Collection */ + /** @phpstan-return Collection */ public function getGroups(): Collection { return $this->groups; diff --git a/tests/Tests/Models/StockExchange/Market.php b/tests/Tests/Models/StockExchange/Market.php index 832afb62ac..ed0902d4ad 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 */ + /** @phpstan-var ArrayCollection */ #[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 1ee808363a..54a0804f7c 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 */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'Ride', mappedBy: 'car')] private $freeCarRides; - /** @psalm-var Collection */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'PaidRide', mappedBy: 'car')] private $carRides; diff --git a/tests/Tests/Models/Taxi/Driver.php b/tests/Tests/Models/Taxi/Driver.php index 58e83efbf6..63353abd7b 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 */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'Ride', mappedBy: 'driver')] private $freeDriverRides; - /** @psalm-var Collection */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'PaidRide', mappedBy: 'driver')] private $driverRides; diff --git a/tests/Tests/Models/Tweet/User.php b/tests/Tests/Models/Tweet/User.php index 38d2e89f8e..649906eb36 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 */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'Tweet', mappedBy: 'author', cascade: ['persist'], fetch: 'EXTRA_LAZY')] public $tweets; - /** @psalm-var Collection */ + /** @phpstan-var Collection */ #[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 fca65f2528..72b57a811e 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 */ + /** @phpstan-var Collection */ #[ManyToMany(targetEntity: 'OwningManyToManyCompositeIdEntity', mappedBy: 'associatedEntities')] public $associatedEntities; diff --git a/tests/Tests/Models/ValueConversionType/InversedManyToManyCompositeIdForeignKeyEntity.php b/tests/Tests/Models/ValueConversionType/InversedManyToManyCompositeIdForeignKeyEntity.php index aeb65dfbc4..456d08b9e1 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 */ + /** @phpstan-var Collection */ #[ManyToMany(targetEntity: 'OwningManyToManyCompositeIdForeignKeyEntity', mappedBy: 'associatedEntities')] public $associatedEntities; diff --git a/tests/Tests/Models/ValueConversionType/InversedManyToManyEntity.php b/tests/Tests/Models/ValueConversionType/InversedManyToManyEntity.php index 01c40b7a57..50e575e3a5 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 */ + /** @phpstan-var Collection */ #[ManyToMany(targetEntity: 'OwningManyToManyEntity', mappedBy: 'associatedEntities')] public $associatedEntities; diff --git a/tests/Tests/Models/ValueConversionType/InversedOneToManyCompositeIdEntity.php b/tests/Tests/Models/ValueConversionType/InversedOneToManyCompositeIdEntity.php index dd297b3908..caecd4dcf2 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 */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'OwningManyToOneCompositeIdEntity', mappedBy: 'associatedEntity')] public $associatedEntities; diff --git a/tests/Tests/Models/ValueConversionType/InversedOneToManyCompositeIdForeignKeyEntity.php b/tests/Tests/Models/ValueConversionType/InversedOneToManyCompositeIdForeignKeyEntity.php index 05f72effcf..b79f1ea400 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 */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'OwningManyToOneCompositeIdForeignKeyEntity', mappedBy: 'associatedEntity')] public $associatedEntities; diff --git a/tests/Tests/Models/ValueConversionType/InversedOneToManyEntity.php b/tests/Tests/Models/ValueConversionType/InversedOneToManyEntity.php index 03795dcbd8..9ffbf32b67 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 */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'OwningManyToOneEntity', mappedBy: 'associatedEntity')] public $associatedEntities; diff --git a/tests/Tests/ORM/Cache/RegionTestCase.php b/tests/Tests/ORM/Cache/RegionTestCase.php index 72102c4b46..110a560aa1 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 */ + /** @phpstan-return list */ public static function dataProviderCacheValues(): array { return [ diff --git a/tests/Tests/ORM/EntityManagerTest.php b/tests/Tests/ORM/EntityManagerTest.php index 9e9f67d1a8..e724d9ac63 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 */ + /** @phpstan-return list */ public static function dataAffectedByErrorIfClosedException(): array { return [ diff --git a/tests/Tests/ORM/Functional/AdvancedAssociationTest.php b/tests/Tests/ORM/Functional/AdvancedAssociationTest.php index b5a1da15a9..a05e7e70ef 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 */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'Phrase', mappedBy: 'type')] private $phrases; diff --git a/tests/Tests/ORM/Functional/CascadeRemoveOrderTest.php b/tests/Tests/ORM/Functional/CascadeRemoveOrderTest.php index d64b398fa8..b151791587 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 */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-return array */ 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 06e5ac7124..4f55a05fb3 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 */ + /** @phpstan-var Collection */ #[ManyToMany(targetEntity: 'CTIChild')] private $ctiChildren; @@ -189,7 +189,7 @@ public function addCTIChild(CTIChild $child): void $this->ctiChildren->add($child); } - /** @psalm-return Collection */ + /** @phpstan-return Collection */ public function getCTIChildren(): Collection { return $this->ctiChildren; diff --git a/tests/Tests/ORM/Functional/EntityRepositoryTest.php b/tests/Tests/ORM/Functional/EntityRepositoryTest.php index 38d78823e2..4ea391669f 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 */ + /** @phpstan-return list */ public function loadFixtureUserEmail(): array { $user1 = new CmsUser(); diff --git a/tests/Tests/ORM/Functional/LifecycleCallbackTest.php b/tests/Tests/ORM/Functional/LifecycleCallbackTest.php index 0a51b15b09..3dcee0e371 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 */ + /** @phpstan-var Collection */ #[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 df2f8f2d72..a2f48df25e 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 */ + /** @phpstan-return list */ 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 */ + /** @phpstan-return list */ 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 */ + /** @phpstan-param list */ 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 */ + /** @phpstan-param list */ 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 2717fb66ad..927af3d3e1 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 $products */ + /** @phpstan-param list $products */ public function assertLoadingOfOwningSide(array $products): void { [$firstProduct, $secondProduct] = $products; @@ -135,7 +135,7 @@ protected function createLoadingFixture(): void $this->_em->clear(); } - /** @psalm-return list */ + /** @phpstan-return list */ 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 5a742c1b3a..2394b6fd88 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 */ + /** @phpstan-return list */ public static function provideDataForHydrationMode(): array { return [ diff --git a/tests/Tests/ORM/Functional/OneToManyUnidirectionalAssociationTest.php b/tests/Tests/ORM/Functional/OneToManyUnidirectionalAssociationTest.php index 8d2af327e6..cefef0e15d 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 */ + /** @phpstan-var array */ protected $locations = []; protected function setUp(): void diff --git a/tests/Tests/ORM/Functional/OneToOneEagerLoadingTest.php b/tests/Tests/ORM/Functional/OneToOneEagerLoadingTest.php index bfeb802de0..e841b8cf64 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 */ + /** @phpstan-var Collection */ #[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 9641314553..72179ee19a 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 */ + /** @phpstan-var array */ protected $locations = []; protected function setUp(): void diff --git a/tests/Tests/ORM/Functional/OrderedJoinedTableInheritanceCollectionTest.php b/tests/Tests/ORM/Functional/OrderedJoinedTableInheritanceCollectionTest.php index bc67df8d17..d93ef14b2c 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 */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'OJTICPet', mappedBy: 'mother')] #[OrderBy(['name' => 'ASC'])] public $children; - /** @psalm-var Collection */ + /** @phpstan-var Collection */ #[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 66cc3f9a9b..b8ea24e7fe 100644 --- a/tests/Tests/ORM/Functional/PaginationTest.php +++ b/tests/Tests/ORM/Functional/PaginationTest.php @@ -767,7 +767,7 @@ public function populate(): void $this->_em->flush(); } - /** @psalm-return list */ + /** @phpstan-return list */ public static function useOutputWalkers(): array { return [ @@ -776,7 +776,7 @@ public static function useOutputWalkers(): array ]; } - /** @psalm-return list */ + /** @phpstan-return list */ public static function fetchJoinCollection(): array { return [ @@ -785,7 +785,7 @@ public static function fetchJoinCollection(): array ]; } - /** @psalm-return list */ + /** @phpstan-return list */ public static function useOutputWalkersAndFetchJoinCollection(): array { return [ diff --git a/tests/Tests/ORM/Functional/QueryDqlFunctionTest.php b/tests/Tests/ORM/Functional/QueryDqlFunctionTest.php index fcc82cf35c..24d1853335 100644 --- a/tests/Tests/ORM/Functional/QueryDqlFunctionTest.php +++ b/tests/Tests/ORM/Functional/QueryDqlFunctionTest.php @@ -427,6 +427,7 @@ public function testInArithmeticExpression1(): void SELECT m, m.name AS m_name FROM Doctrine\Tests\Models\Company\CompanyManager m WHERE m.salary IN (800000 / 8, 100000 * 2) + ORDER BY m.name DESC SQL; $result = $this->_em->createQuery($dql)->getArrayResult(); diff --git a/tests/Tests/ORM/Functional/SecondLevelCacheFunctionalTestCase.php b/tests/Tests/ORM/Functional/SecondLevelCacheFunctionalTestCase.php index 16132c743d..290f965429 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 */ + /** @phpstan-var list */ protected array $people = []; - /** @psalm-var list
*/ + /** @phpstan-var list
*/ protected array $addresses = []; - /** @psalm-var list */ + /** @phpstan-var list */ protected array $countries = []; - /** @psalm-var list */ + /** @phpstan-var list */ protected array $states = []; - /** @psalm-var list */ + /** @phpstan-var list */ protected array $cities = []; - /** @psalm-var list */ + /** @phpstan-var list */ protected array $travels = []; - /** @psalm-var list */ + /** @phpstan-var list */ protected array $travelers = []; - /** @psalm-var list */ + /** @phpstan-var list */ protected array $attractions = []; - /** @psalm-var list */ + /** @phpstan-var list */ protected array $attractionsInfo = []; - /** @psalm-var list */ + /** @phpstan-var list */ protected array $travelersWithProfile = []; protected Cache $cache; diff --git a/tests/Tests/ORM/Functional/SecondLevelCacheTest.php b/tests/Tests/ORM/Functional/SecondLevelCacheTest.php index e23c98a279..145a728616 100644 --- a/tests/Tests/ORM/Functional/SecondLevelCacheTest.php +++ b/tests/Tests/ORM/Functional/SecondLevelCacheTest.php @@ -341,7 +341,7 @@ class ListenerSecondLevelCacheTest { /** * @param array $callbacks - * @psalm-param array $callbacks + * @phpstan-param array $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 fd319b5977..1e8f337e58 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 */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-return Collection */ 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 */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-return Collection */ 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 d126abaa0d..1bb898dc83 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 */ + /** @phpstan-var Collection */ #[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 8efad774b3..69156476c4 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 */ + /** @phpstan-var Collection */ #[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 dd223cceeb..6b5d8002d5 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 */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'DDC1400UserState', mappedBy: 'article', indexBy: 'userId', fetch: 'EXTRA_LAZY')] public $userStates; } @@ -93,7 +93,7 @@ class DDC1400User #[GeneratedValue] public $id; - /** @psalm-var Collection */ + /** @phpstan-var Collection */ #[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 2d44baf338..f3095c2b92 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 */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'DDC1452EntityB', mappedBy: 'entityAFrom')] public $entitiesB; @@ -113,7 +113,7 @@ public function __construct() $this->entitiesB = new ArrayCollection(); } - /** @psalm-return Collection */ + /** @phpstan-return Collection */ 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 0e0a7078e5..a8dac0915e 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 */ + /** @phpstan-var Collection */ #[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 d7cb6e16b5..cad27a4f05 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 */ + /** @phpstan-var Collection */ #[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 8a757b4ba7..e6035ee421 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 */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-return Collection */ 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 49063ad4ee..fdd3b52cb9 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 */ + /** @phpstan-var Collection */ #[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 a6452a5dbf..d6e721d924 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 */ + /** @phpstan-var Collection */ #[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 360ac2bf51..b5b76a5b12 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 $class */ @@ -86,7 +86,7 @@ private function createCars(string $class): array } /** - * @psalm-return array{Driver, Driver} + * @phpstan-return array{Driver, Driver} * * @var class-string $class */ diff --git a/tests/Tests/ORM/Functional/Ticket/DDC1925Test.php b/tests/Tests/ORM/Functional/Ticket/DDC1925Test.php index f64d8555aa..ec3ded3b06 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 */ + /** @phpstan-var Collection */ #[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 ccef0f3242..9cfd9149c9 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 */ + /** @phpstan-var Collection */ #[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 12f6d34e9e..fe9ec893ed 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 */ + /** @phpstan-var list */ #[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> */ + /** @phpstan-var array> */ public static $calls = []; /** diff --git a/tests/Tests/ORM/Functional/Ticket/DDC2106Test.php b/tests/Tests/ORM/Functional/Ticket/DDC2106Test.php index 0107bf8ca6..10043467bb 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 */ + /** @phpstan-var Collection */ #[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 3d6de065d1..7a04f5ee62 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 */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-return Collection */ 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 */ + /** @phpstan-var Collection */ #[ManyToMany(targetEntity: 'DDC211User', mappedBy: 'groups')] protected $users; @@ -119,7 +119,7 @@ public function setName(string $name): void $this->name = $name; } - /** @psalm-return Collection */ + /** @phpstan-return Collection */ 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 0e21c835be..4eed0a25ce 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 */ + /** @phpstan-var list */ private array $privileges = []; protected function setUp(): void @@ -161,7 +161,7 @@ class DDC2252User #[Column(type: 'integer')] protected $uid = 222; - /** @psalm-var Collection */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-return Collection */ public function getMemberships(): Collection { return $this->memberships; @@ -193,7 +193,7 @@ public function addMembership(DDC2252Membership $membership): void #[HasLifecycleCallbacks] class DDC2252Membership { - /** @psalm-var Collection */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-var Collection */ 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 c0b84c905a..49d08d8b80 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 */ + /** @phpstan-var Collection */ #[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 a83be2af1f..4b9be90839 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 */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'DDC2494Campaign', mappedBy: 'currency')] protected $campaigns; @@ -105,7 +105,7 @@ public function getTemp(): int return $this->temp; } - /** @psalm-return Collection */ + /** @phpstan-return Collection */ public function getCampaigns(): Collection { return $this->campaigns; @@ -142,7 +142,7 @@ public function getCurrency(): DDC2494Currency class DDC2494TinyIntType extends Type { - /** @psalm-var array> */ + /** @phpstan-var array> */ public static $calls = []; /** diff --git a/tests/Tests/ORM/Functional/Ticket/DDC2575Test.php b/tests/Tests/ORM/Functional/Ticket/DDC2575Test.php index 6fb5f45e88..ca7f3d8c2f 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 */ + /** @phpstan-var list */ private array $rootsEntities = []; - /** @psalm-var list */ + /** @phpstan-var list */ private array $aEntities = []; - /** @psalm-var list */ + /** @phpstan-var list */ 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 de1efcade6..968b336161 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 */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'DDC2759MetadataCategory', mappedBy: 'category')] public $metadataCategories; } @@ -108,7 +108,7 @@ class DDC2759QualificationMetadata #[GeneratedValue] public $id; - /** @psalm-var Collection */ + /** @phpstan-var Collection */ #[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 47a6f548c6..4a2d76646c 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 */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'Role', mappedBy: 'user', cascade: ['all'], orphanRemoval: true)] public $roles; - /** @psalm-var Collection */ + /** @phpstan-var Collection */ #[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 e91198319a..f1224536c6 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 */ + /** @phpstan-var array */ public $changeSet = []; /** @var int $id */ diff --git a/tests/Tests/ORM/Functional/Ticket/DDC3192Test.php b/tests/Tests/ORM/Functional/Ticket/DDC3192Test.php index 7ed9b8665f..6b1f4a7485 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 */ + /** @phpstan-var array */ 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 5bf7c285f9..20806b0413 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 */ + /** @phpstan-var Collection */ #[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 f78ec2b406..914b0f722c 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 */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-var Collection */ #[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 892d3bed7c..249b21e46b 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 */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'DDC3644Address', mappedBy: 'user', orphanRemoval: true)] public $addresses = []; - /** @psalm-var Collection */ + /** @phpstan-var Collection */ #[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 ed185ad873..0148501f57 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 */ + /** @phpstan-var Collection */ #[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 609e9ad7f2..7fff73d6f8 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 */ + /** @phpstan-var Collection */ #[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 $attributes */ + /** @phpstan-param list $attributes */ public function __construct( #[Id] #[GeneratedValue(strategy: 'NONE')] @@ -94,7 +94,7 @@ public function getId(): DDC3785AssetId return $this->id; } - /** @psalm-return Collection */ + /** @phpstan-return Collection */ 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 b6b1e8bb54..c19f341bd5 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 */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-return Collection */ 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 adb3cbcf35..9be32b0eca 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 */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'DDC531Item', mappedBy: 'parent')] protected $children; @@ -84,7 +84,7 @@ public function getParent(): DDC531Item return $this->parent; } - /** @psalm-return Collection */ + /** @phpstan-return Collection */ 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 5d2adee5bf..e827d3410b 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 */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'DDC599Child', mappedBy: 'parent', cascade: ['remove'])] protected $children; @@ -103,7 +103,7 @@ public function __construct() $this->children = new ArrayCollection(); } - /** @psalm-return Collection */ + /** @phpstan-return Collection */ 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 68a7abf521..4ade4445e1 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 */ + /** @phpstan-var Collection */ #[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 089ac3c16a..6208322be2 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 */ + /** @phpstan-var Collection */ #[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 113da8cae2..7ce3ec1131 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 */ + /** @phpstan-return Collection */ public function getRelations(): Collection { return $this->relations; @@ -303,7 +303,7 @@ public function removeRelation(Relation $relation): void } } - /** @psalm-return Collection */ + /** @phpstan-return Collection */ 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 b73545995b..41bc9879b7 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 */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-var Collection */ #[ManyToMany(targetEntity: 'DDC719Group', mappedBy: 'children')] protected $parents = null; @@ -127,19 +127,19 @@ public function setDescription(string $description): void $this->description = $description; } - /** @psalm-return Collection */ + /** @phpstan-return Collection */ public function getChildren(): Collection { return $this->children; } - /** @psalm-return Collection */ + /** @phpstan-return Collection */ public function getParents(): Collection { return $this->parents; } - /** @psalm-return Collection */ + /** @phpstan-return Collection */ 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 3d69e12f8e..b57d3cc6bb 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 */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-return Collection */ 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 d36e2f520f..319d392576 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 */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-return Collection */ public function getSpecificationValues(): Collection { return $this->specificationValues; @@ -96,7 +96,7 @@ class DDC809SpecificationValue #[Id] protected $specificationValueId; - /** @psalm-var Collection */ + /** @phpstan-var Collection */ #[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 a2e1b2c075..49bacecee1 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 */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'DDC881PhoneCall', mappedBy: 'phonenumber')] private $calls; @@ -163,7 +163,7 @@ public function setPhoneNumber(string $phoneNumber): void $this->phonenumber = $phoneNumber; } - /** @psalm-var Collection */ + /** @phpstan-var Collection */ 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 9649f57343..9648f278f6 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 */ + /** @phpstan-var Collection */ #[ManyToMany(targetEntity: 'DDC992Role', mappedBy: 'extends')] public $extendedBy; - /** @psalm-var Collection */ + /** @phpstan-var Collection */ #[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 5c35dfe86c..f3527afb75 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 522eba50f6..3956e06d57 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 */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'GH5762DriverRide', mappedBy: 'driver')] public $driverRides; @@ -150,7 +150,7 @@ public function __construct( #[Entity] class GH5762Car { - /** @psalm-var Collection */ + /** @phpstan-var Collection */ #[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 fd42ff8b3c..5ac7908cc1 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 */ + /** @phpstan-var Collection */ #[ManyToMany(targetEntity: GH6029Group::class, cascade: ['all'])] public $groups; @@ -134,7 +134,7 @@ class GH6029Product #[GeneratedValue] public $id; - /** @psalm-var Collection */ + /** @phpstan-var Collection */ #[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 11f8f5ec63..ccc734a115 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 */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'GH6362Start', mappedBy: 'bases')] private $starts; } @@ -119,7 +119,7 @@ abstract class GH6362Base #[Entity] class GH6362Child extends GH6362Base { - /** @psalm-var Collection */ + /** @phpstan-var Collection */ #[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 f4a7f30934..27f2a0a8f4 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 */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: GH6531ArticleAttribute::class, mappedBy: 'article', cascade: ['ALL'], indexBy: 'attribute')] public $attributes; @@ -148,7 +148,7 @@ class GH6531Order #[GeneratedValue] public $id; - /** @psalm-var Collection */ + /** @phpstan-var Collection */ #[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 d16c204ba0..b8de944a08 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 + * @phpstan-var Collection */ #[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 f60cfac092..2eb32dd7c9 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&Selectable */ + /** @phpstan-var Collection&Selectable */ #[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&Selectable */ + /** @phpstan-return Collection&Selectable */ 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 0aef74541b..1cdaea018a 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&Selectable */ + /** @phpstan-return Collection&Selectable */ 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 21b4db18ab..6747f5e084 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 */ + /** @phpstan-var Collection */ #[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 8bae1d8cc6..cf32fbf0a5 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 + * @phpstan-var Collection */ #[ManyToMany(targetEntity: 'GH9109User')] private $buyers; @@ -125,7 +125,7 @@ public function getTitle(): string return $this->title; } - /** @psalm-return Collection */ + /** @phpstan-return Collection */ public function getBuyers(): Collection { return $this->buyers; diff --git a/tests/Tests/ORM/Functional/ValueObjectsTest.php b/tests/Tests/ORM/Functional/ValueObjectsTest.php index 3186e71d35..ad77a29b29 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 */ + /** @phpstan-return list */ public static function getInfiniteEmbeddableNestingData(): array { return [ diff --git a/tests/Tests/ORM/Hydration/ArrayHydratorTest.php b/tests/Tests/ORM/Hydration/ArrayHydratorTest.php index 33d08edf7d..db3c5bd465 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 */ + /** @phpstan-return list */ public static function provideDataForUserEntityResult(): array { return [ diff --git a/tests/Tests/ORM/Hydration/ObjectHydratorTest.php b/tests/Tests/ORM/Hydration/ObjectHydratorTest.php index 0a1f369bd1..526817263a 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 */ + /** @phpstan-return list */ public static function provideDataForUserEntityResult(): array { return [ @@ -47,7 +47,7 @@ public static function provideDataForUserEntityResult(): array ]; } - /** @psalm-return list */ + /** @phpstan-return list */ public static function provideDataForMultipleRootEntityResult(): array { return [ @@ -58,7 +58,7 @@ public static function provideDataForMultipleRootEntityResult(): array ]; } - /** @psalm-return list */ + /** @phpstan-return list */ public static function provideDataForProductEntityResult(): array { return [ diff --git a/tests/Tests/ORM/Internal/HydrationCompleteHandlerTest.php b/tests/Tests/ORM/Internal/HydrationCompleteHandlerTest.php index 51cf37e049..2bdeab1949 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 */ + /** @phpstan-return list */ public static function invocationFlagProvider(): array { return [ diff --git a/tests/Tests/ORM/Mapping/XmlMappingDriverTest.php b/tests/Tests/ORM/Mapping/XmlMappingDriverTest.php index 921734dddf..e553b4e55a 100644 --- a/tests/Tests/ORM/Mapping/XmlMappingDriverTest.php +++ b/tests/Tests/ORM/Mapping/XmlMappingDriverTest.php @@ -177,7 +177,7 @@ public function testValidateXmlSchema( $this->assertEquals($metadata->getAssociationNames(), $associationNames); } - /** @psalm-return []array{0: class-string, 1: string, 2: list, 3: list} */ + /** @phpstan-return []array{0: class-string, 1: string, 2: list, 3: list} */ public static function dataValidSchema(): array { return [ diff --git a/tests/Tests/ORM/ORMInvalidArgumentExceptionTest.php b/tests/Tests/ORM/ORMInvalidArgumentExceptionTest.php index a4ce25192d..00536a046b 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 */ + /** @phpstan-return list */ public static function invalidEntityNames(): array { return [ diff --git a/tests/Tests/ORM/Query/LanguageRecognitionTest.php b/tests/Tests/ORM/Query/LanguageRecognitionTest.php index 31181de1a4..02b42fb5ba 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 $hints */ + /** @phpstan-param array $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 */ + /** @phpstan-return list */ public static function invalidDQL(): array { return [ diff --git a/tests/Tests/ORM/Query/LexerTest.php b/tests/Tests/ORM/Query/LexerTest.php index 9ddd2811a2..bfce16ab7b 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 */ + /** @phpstan-return list */ public static function provideTokens(): array { return [ diff --git a/tests/Tests/ORM/Query/ParameterTypeInfererTest.php b/tests/Tests/ORM/Query/ParameterTypeInfererTest.php index 348122c7ed..22e25bc227 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 */ + /** @phpstan-return Generator */ 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 430177b1fc..c260455d71 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 */ + /** @phpstan-return list */ public static function validMatches(): array { /* @@ -83,7 +83,7 @@ public static function validMatches(): array ]; } - /** @psalm-return list */ + /** @phpstan-return list */ public static function invalidMatches(): array { return [ diff --git a/tests/Tests/ORM/Query/QueryExpressionVisitorTest.php b/tests/Tests/ORM/Query/QueryExpressionVisitorTest.php index 54cc54d554..9ece94b5d2 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 listgetParameters()); } - /** @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 */ + /** @phpstan-return list */ public static function provideLockModes(): array { return [ @@ -238,7 +238,7 @@ public function testExplicitCollectionParameters(): void self::assertEquals($cities, $parameter->getValue()); } - /** @psalm-return Generator */ + /** @phpstan-return Generator */ public static function provideProcessParameterValueIterable(): Generator { $baseArray = [ diff --git a/tests/Tests/ORM/Query/SelectSqlGenerationTest.php b/tests/Tests/ORM/Query/SelectSqlGenerationTest.php index 777ca79b43..1124c1da55 100644 --- a/tests/Tests/ORM/Query/SelectSqlGenerationTest.php +++ b/tests/Tests/ORM/Query/SelectSqlGenerationTest.php @@ -2119,7 +2119,7 @@ public function testHavingRegressionUsingVariableWithMathOperatorsExpression($op ); } - /** @psalm-return list */ + /** @phpstan-return list */ public static function mathematicOperatorsProvider(): array { return [['+'], ['-'], ['*'], ['/']]; diff --git a/tests/Tests/ORM/Tools/AttachEntityListenersListenerTest.php b/tests/Tests/ORM/Tools/AttachEntityListenersListenerTest.php index 82068f89ae..26fc5abe8d 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>> */ + /** @phpstan-var array>> */ public $calls; public function prePersist(): void @@ -191,7 +191,7 @@ public function postPersist(): void class AttachEntityListenersListenerTestListener2 { - /** @psalm-var array>> */ + /** @phpstan-var array>> */ public $calls; public function prePersist(): void diff --git a/tests/Tests/ORM/Tools/DebugTest.php b/tests/Tests/ORM/Tools/DebugTest.php index 8cf1a90ac5..abd3730657 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 */ + /** @phpstan-return array */ 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 2532f5fe09..4a5c6e4787 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 */ + /** @phpstan-var Collection */ #[ManyToMany(targetEntity: 'User', mappedBy: 'groups')] public $users; } @@ -160,7 +160,7 @@ class User #[GeneratedValue] public $id; - /** @psalm-var Collection */ + /** @phpstan-var Collection */ #[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 696f7927a1..779a7740ac 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 */ + /** @phpstan-var Collection */ #[ManyToMany(targetEntity: 'Doctrine\Tests\ORM\Tools\Target')] private $manyToMany; #[ManyToOne(targetEntity: 'Doctrine\Tests\ORM\Tools\ResolveTarget', inversedBy: 'oneToMany')] private ResolveTarget $manyToOne; - /** @psalm-var Collection */ + /** @phpstan-var Collection */ #[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 a1f3e77d70..36037fcf56 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 */ + /** @phpstan-var Collection */ #[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 c4e01c6f24..8942380ce5 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 */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'DDC3322ValidEntity1', mappedBy: 'oneValid')] #[OrderBy(['id' => 'ASC'])] private $validAssoc; - /** @psalm-var Collection */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'DDC3322ValidEntity1', mappedBy: 'oneInvalid')] #[OrderBy(['invalidField' => 'ASC'])] private $invalidAssoc; @@ -494,12 +494,12 @@ class DDC3322Two #[GeneratedValue] private int $id; - /** @psalm-var Collection */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'DDC3322ValidEntity1', mappedBy: 'twoValid')] #[OrderBy(['manyToOne' => 'ASC'])] private $validAssoc; - /** @psalm-var Collection */ + /** @phpstan-var Collection */ #[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 */ + /** @phpstan-var Collection */ #[OneToMany(targetEntity: 'DDC3322ValidEntity1', mappedBy: 'threeInvalid')] #[OrderBy(['oneToOneInverse' => 'ASC'])] private $invalidAssoc; @@ -554,7 +554,7 @@ class Issue9095Child extends Issue9095AbstractChild #[MappedSuperclass] class InvalidMappedSuperClass { - /** @psalm-var Collection */ + /** @phpstan-var Collection */ #[ManyToMany(targetEntity: 'InvalidMappedSuperClass', mappedBy: 'invalid')] private $selfWhatever; } diff --git a/tests/Tests/ORM/UnitOfWorkTest.php b/tests/Tests/ORM/UnitOfWorkTest.php index 483fa6b7f4..58014eb94d 100644 --- a/tests/Tests/ORM/UnitOfWorkTest.php +++ b/tests/Tests/ORM/UnitOfWorkTest.php @@ -325,7 +325,7 @@ public function testAddToIdentityMapValidIdentifiers(object $entity, string $idH self::assertSame($entity, $this->_unitOfWork->getByIdHash($idHash, $entity::class)); } - /** @psalm-return array */ + /** @phpstan-return array */ public static function entitiesWithValidIdentifiersProvider(): array { $emptyString = new EntityWithStringIdentifier(); @@ -380,7 +380,7 @@ public function testAddToIdentityMapInvalidIdentifiers(object $entity, array $id $this->_unitOfWork->registerManaged($entity, $identifier, []); } - /** @psalm-return array}> */ + /** @phpstan-return array}> */ public static function entitiesWithInvalidIdentifiersProvider(): array { $firstNullString = new EntityWithCompositeStringIdentifier(); diff --git a/tests/Tests/OrmFunctionalTestCase.php b/tests/Tests/OrmFunctionalTestCase.php index 54bb390afc..bc595b4a1f 100644 --- a/tests/Tests/OrmFunctionalTestCase.php +++ b/tests/Tests/OrmFunctionalTestCase.php @@ -1057,7 +1057,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 7c75fcff99..33869c3b17 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 */ + /** @phpstan-return array */ private static function getTestConnectionParameters(): array { if (! isset($GLOBALS['db_driver'])) {