Skip to content

Switch proxies back to Doctrine Persistence and LazyGhostTrait #1520

Switch proxies back to Doctrine Persistence and LazyGhostTrait

Switch proxies back to Doctrine Persistence and LazyGhostTrait #1520

Triggered via pull request October 19, 2024 01:15
Status Failure
Total duration 55s
Artifacts 2

static-analysis.yml

on: pull_request
Matrix: Static Analysis with PHPStan
Matrix: Static Analysis with Psalm
Fit to window
Zoom out
Zoom in

Annotations

14 errors
Static Analysis with PHPStan (8.2): lib/Doctrine/ODM/MongoDB/Proxy/Autoloader.php#L39
PHPDoc tag @throws with type Doctrine\ODM\MongoDB\InvalidArgumentException is not subtype of Throwable
Static Analysis with PHPStan (8.2): lib/Doctrine/ODM/MongoDB/Proxy/Autoloader.php#L42
Instantiated class Doctrine\ODM\MongoDB\InvalidArgumentException not found.
Static Analysis with PHPStan (8.2): lib/Doctrine/ODM/MongoDB/Proxy/Autoloader.php#L42
Throwing object of an unknown class Doctrine\ODM\MongoDB\InvalidArgumentException.
Static Analysis with PHPStan (8.2)
Process completed with exit code 1.
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)
UndefinedDocblockClass: lib/Doctrine/ODM/MongoDB/Proxy/Autoloader.php#L37
lib/Doctrine/ODM/MongoDB/Proxy/Autoloader.php:37:16: UndefinedDocblockClass: Docblock-defined class, interface or enum named Doctrine\ODM\MongoDB\InvalidArgumentException does not exist (see https://psalm.dev/200)
UndefinedClass: lib/Doctrine/ODM/MongoDB/Proxy/Autoloader.php#L42
lib/Doctrine/ODM/MongoDB/Proxy/Autoloader.php:42:23: UndefinedClass: Class, interface or enum named Doctrine\ODM\MongoDB\InvalidArgumentException does not exist (see https://psalm.dev/019)
TypeDoesNotContainType: lib/Doctrine/ODM/MongoDB/Proxy/LazyGhostProxyFactory.php#L150
lib/Doctrine/ODM/MongoDB/Proxy/LazyGhostProxyFactory.php:150: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#L150
lib/Doctrine/ODM/MongoDB/Proxy/LazyGhostProxyFactory.php:150: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#L159
lib/Doctrine/ODM/MongoDB/Proxy/LazyGhostProxyFactory.php:159: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#L159
lib/Doctrine/ODM/MongoDB/Proxy/LazyGhostProxyFactory.php:159: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#L178
lib/Doctrine/ODM/MongoDB/Proxy/LazyGhostProxyFactory.php:178: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#L252
lib/Doctrine/ODM/MongoDB/Proxy/LazyGhostProxyFactory.php:252: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#L283
lib/Doctrine/ODM/MongoDB/Proxy/LazyGhostProxyFactory.php:283:22: UndefinedMethod: Method Doctrine\ODM\MongoDB\Proxy\LazyGhostProxyFactory::createlazyghost does not exist (see https://psalm.dev/022)

Artifacts

Produced during runtime
Name Size
composer-lock-static-analysis-phpstan
23 KB
composer-lock-static-analysis-psalm
23 KB