Switch proxies back to Doctrine Persistence and LazyGhostTrait
#1519
static-analysis.yml
on: pull_request
Matrix: Static Analysis with PHPStan
Matrix: Static Analysis with Psalm
Annotations
10 errors
InvalidPropertyAssignmentValue:
lib/Doctrine/ODM/MongoDB/Configuration.php#L282
lib/Doctrine/ODM/MongoDB/Configuration.php:282:9: InvalidPropertyAssignmentValue: $this->attributes with declared type 'array{autoGenerateHydratorClasses?: 0|1|2|3|4, autoGeneratePersistentCollectionClasses?: 0|1|2|3|4, classMetadataFactoryName?: class-string<Doctrine\ODM\MongoDB\Mapping\ClassMetadataFactoryInterface>, defaultCommitOptions?: array{fsync?: bool, safe?: int, w?: int, withTransaction?: bool, writeConcern?: MongoDB\Driver\WriteConcern}, defaultDB?: string, defaultDocumentRepositoryClassName?: class-string<Doctrine\Persistence\ObjectRepository<object>>, defaultGridFSRepositoryClassName?: class-string<Doctrine\ODM\MongoDB\Repository\GridFSRepository<object>>, documentNamespaces?: array<string, string>, filters?: array<string, array{class: class-string, parameters: array<string, mixed>}>, hydratorDir?: string, hydratorNamespace?: string, metadataCacheImpl?: Doctrine\Common\Cache\Cache, metadataDriverImpl?: Doctrine\Persistence\Mapping\Driver\MappingDriver, persistentCollectionDir?: string, persistentCollectionFactory?: Doctrine\ODM\MongoDB\PersistentCollection\PersistentCollectionFactory, persistentCollectionGenerator?: Doctrine\ODM\MongoDB\PersistentCollection\PersistentCollectionGenerator, persistentCollectionNamespace?: string, proxyDir?: string, proxyNamespace?: string, repositoryFactory?: Doctrine\ODM\MongoDB\Repository\RepositoryFactory}' cannot be assigned type 'array{autoGenerateHydratorClasses?: 0|1|2|3|4, autoGeneratePersistentCollectionClasses?: 0|1|2|3|4, autoGenerateProxyClasses: 0|1|2|3|4, classMetadataFactoryName?: class-string<Doctrine\ODM\MongoDB\Mapping\ClassMetadataFactoryInterface>, defaultCommitOptions?: array{fsync?: bool, safe?: int, w?: int, withTransaction?: bool, writeConcern?: MongoDB\Driver\WriteConcern}, defaultDB?: string, defaultDocumentRepositoryClassName?: class-string<Doctrine\Persistence\ObjectRepository<object>>, defaultGridFSRepositoryClassName?: class-string<Doctrine\ODM\MongoDB\Repository\GridFSRepository<object>>, documentNamespaces?: array<string, string>, filters?: array<string, array{class: class-string, parameters: array<string, mixed>}>, hydratorDir?: string, hydratorNamespace?: string, metadataCacheImpl?: Doctrine\Common\Cache\Cache, metadataDriverImpl?: Doctrine\Persistence\Mapping\Driver\MappingDriver, persistentCollectionDir?: string, persistentCollectionFactory?: Doctrine\ODM\MongoDB\PersistentCollection\PersistentCollectionFactory, persistentCollectionGenerator?: Doctrine\ODM\MongoDB\PersistentCollection\PersistentCollectionGenerator, persistentCollectionNamespace?: string, proxyDir?: string, proxyNamespace?: string, repositoryFactory?: Doctrine\ODM\MongoDB\Repository\RepositoryFactory}' (see https://psalm.dev/145)
|
TypeDoesNotContainType:
lib/Doctrine/ODM/MongoDB/Proxy/LazyGhostProxyFactory.php#L147
lib/Doctrine/ODM/MongoDB/Proxy/LazyGhostProxyFactory.php:147:37: TypeDoesNotContainType: Type 0|1|2|3|4 for $autoGenerate is never !<0 (see https://psalm.dev/056)
|
TypeDoesNotContainType:
lib/Doctrine/ODM/MongoDB/Proxy/LazyGhostProxyFactory.php#L147
lib/Doctrine/ODM/MongoDB/Proxy/LazyGhostProxyFactory.php:147:58: TypeDoesNotContainType: Type 0|1|2|3|4 for $autoGenerate is never >4 (see https://psalm.dev/056)
|
MoreSpecificImplementedParamType:
lib/Doctrine/ODM/MongoDB/Proxy/LazyGhostProxyFactory.php#L156
lib/Doctrine/ODM/MongoDB/Proxy/LazyGhostProxyFactory.php:156:55: MoreSpecificImplementedParamType: Argument 2 of Doctrine\ODM\MongoDB\Proxy\LazyGhostProxyFactory::getProxy has the more specific type 'array<array-key, mixed>', expecting 'mixed' as defined by Doctrine\ODM\MongoDB\Proxy\ProxyFactory::getProxy (see https://psalm.dev/140)
|
ImplementedReturnTypeMismatch:
lib/Doctrine/ODM/MongoDB/Proxy/LazyGhostProxyFactory.php#L156
lib/Doctrine/ODM/MongoDB/Proxy/LazyGhostProxyFactory.php:156:69: ImplementedReturnTypeMismatch: The inherited return type '(T:fn-doctrine\odm\mongodb\proxy\proxyfactory::getproxy as object)&Doctrine\ODM\MongoDB\Proxy\InternalProxy<T:fn-doctrine\odm\mongodb\proxy\proxyfactory::getproxy as object>' for Doctrine\ODM\MongoDB\Proxy\ProxyFactory::getProxy is different to the implemented return type for Doctrine\ODM\MongoDB\Proxy\LazyGhostProxyFactory::getproxy 'Doctrine\ODM\MongoDB\Proxy\InternalProxy' (see https://psalm.dev/123)
|
ImplementedParamTypeMismatch:
lib/Doctrine/ODM/MongoDB/Proxy/LazyGhostProxyFactory.php#L175
lib/Doctrine/ODM/MongoDB/Proxy/LazyGhostProxyFactory.php:175:48: ImplementedParamTypeMismatch: Argument 1 of Doctrine\ODM\MongoDB\Proxy\LazyGhostProxyFactory::generateProxyClasses has wrong type 'array<array-key, Doctrine\ODM\MongoDB\Mapping\ClassMetadata>', expecting 'Doctrine\ODM\MongoDB\Mapping\ClassMetadata' as defined by Doctrine\ODM\MongoDB\Proxy\ProxyFactory::generateProxyClasses (see https://psalm.dev/199)
|
InvalidNullableReturnType:
lib/Doctrine/ODM/MongoDB/Proxy/LazyGhostProxyFactory.php#L249
lib/Doctrine/ODM/MongoDB/Proxy/LazyGhostProxyFactory.php:249:58: InvalidNullableReturnType: The declared return type 'Closure' for Doctrine\ODM\MongoDB\Proxy\LazyGhostProxyFactory::getProxyFactory is not nullable, but 'Closure|null' contains null (see https://psalm.dev/144)
|
UndefinedMethod:
lib/Doctrine/ODM/MongoDB/Proxy/LazyGhostProxyFactory.php#L280
lib/Doctrine/ODM/MongoDB/Proxy/LazyGhostProxyFactory.php:280:22: UndefinedMethod: Method Doctrine\ODM\MongoDB\Proxy\LazyGhostProxyFactory::createlazyghost does not exist (see https://psalm.dev/022)
|
InvalidArgument:
lib/Doctrine/ODM/MongoDB/Proxy/LazyGhostProxyFactory.php#L281
lib/Doctrine/ODM/MongoDB/Proxy/LazyGhostProxyFactory.php:281:30: InvalidArgument: Argument 1 expects Doctrine\ODM\MongoDB\Proxy\InternalProxy&(T:fn-doctrine\odm\mongodb\proxy\lazyghostproxyfactory::createlazyinitializer as object), but Doctrine\ODM\MongoDB\Proxy\InternalProxy<object> provided (see https://psalm.dev/004)
|
InvalidPropertyAssignmentValue:
lib/Doctrine/ODM/MongoDB/Proxy/LazyGhostProxyFactory.php#L289
lib/Doctrine/ODM/MongoDB/Proxy/LazyGhostProxyFactory.php:289:16: InvalidPropertyAssignmentValue: $this->proxyFactories with declared type 'array<class-string, Closure>' cannot be assigned type 'non-empty-array<class-string, Closure|null>' (see https://psalm.dev/145)
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
composer-lock-static-analysis-phpstan
|
23 KB |
|
composer-lock-static-analysis-psalm
|
23 KB |
|