File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 1010use Doctrine \ORM \Mapping \ClassMetadata ;
1111use Doctrine \ORM \Mapping \Driver \AnnotationDriver ;
1212use Doctrine \ORM \Mapping \Driver \AttributeDriver ;
13- use Doctrine \ORM \Proxy \ProxyFactory ;
1413use function class_exists ;
1514use function count ;
1615use const PHP_VERSION_ID ;
@@ -40,15 +39,15 @@ protected function initialize(): void
4039
4140 $ config = new Configuration ();
4241 $ config ->setMetadataDriverImpl (count ($ drivers ) === 1 ? $ drivers [0 ] : new MappingDriverChain ($ drivers ));
43- $ config ->setAutoGenerateProxyClasses (ProxyFactory:: AUTOGENERATE_FILE_NOT_EXISTS_OR_CHANGED );
42+ $ config ->setAutoGenerateProxyClasses (true );
4443 $ config ->setProxyDir ($ this ->tmpDir );
4544 $ config ->setProxyNamespace ('__PHPStanDoctrine__ \\Proxy ' );
4645 $ connection = DriverManager::getConnection ([
4746 'driver ' => 'pdo_sqlite ' ,
4847 'memory ' => true ,
4948 ], $ config );
5049
51- $ em = new EntityManager ($ connection , $ config );
50+ $ em = EntityManager:: create ($ connection , $ config );
5251 $ this ->setEntityManager ($ em );
5352 parent ::initialize ();
5453
You can’t perform that action at this time.
0 commit comments