File tree 1 file changed +2
-3
lines changed
1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 10
10
use Doctrine \ORM \Mapping \ClassMetadata ;
11
11
use Doctrine \ORM \Mapping \Driver \AnnotationDriver ;
12
12
use Doctrine \ORM \Mapping \Driver \AttributeDriver ;
13
- use Doctrine \ORM \Proxy \ProxyFactory ;
14
13
use function class_exists ;
15
14
use function count ;
16
15
use const PHP_VERSION_ID ;
@@ -40,15 +39,15 @@ protected function initialize(): void
40
39
41
40
$ config = new Configuration ();
42
41
$ config ->setMetadataDriverImpl (count ($ drivers ) === 1 ? $ drivers [0 ] : new MappingDriverChain ($ drivers ));
43
- $ config ->setAutoGenerateProxyClasses (ProxyFactory:: AUTOGENERATE_FILE_NOT_EXISTS_OR_CHANGED );
42
+ $ config ->setAutoGenerateProxyClasses (true );
44
43
$ config ->setProxyDir ($ this ->tmpDir );
45
44
$ config ->setProxyNamespace ('__PHPStanDoctrine__ \\Proxy ' );
46
45
$ connection = DriverManager::getConnection ([
47
46
'driver ' => 'pdo_sqlite ' ,
48
47
'memory ' => true ,
49
48
], $ config );
50
49
51
- $ em = new EntityManager ($ connection , $ config );
50
+ $ em = EntityManager:: create ($ connection , $ config );
52
51
$ this ->setEntityManager ($ em );
53
52
parent ::initialize ();
54
53
You can’t perform that action at this time.
0 commit comments