From bb5bf7bd865c97ce0bcc9a3fa2d0e0481c0f4944 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Proch=C3=A1zka?= Date: Tue, 19 Apr 2016 12:47:13 +0200 Subject: [PATCH] Revert "Config: optimize production setup of autogenerating proxies [#237]" This reverts commit 2fbfa9fe0c7aebda9d3e72d89ee8eaaa9ce254a9. --- src/Kdyby/Doctrine/DI/OrmExtension.php | 2 +- tests/KdybyTests/Doctrine/NonLockingUniqueInserter.phpt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Kdyby/Doctrine/DI/OrmExtension.php b/src/Kdyby/Doctrine/DI/OrmExtension.php index 67fda2fb..431a4b2c 100644 --- a/src/Kdyby/Doctrine/DI/OrmExtension.php +++ b/src/Kdyby/Doctrine/DI/OrmExtension.php @@ -312,7 +312,7 @@ protected function processEntityManager($name, array $defaults) Validators::assertField($config['dql'], 'hints', 'array'); $autoGenerateProxyClasses = is_bool($config['autoGenerateProxyClasses']) - ? ($config['autoGenerateProxyClasses'] ? AbstractProxyFactory::AUTOGENERATE_ALWAYS : AbstractProxyFactory::AUTOGENERATE_NEVER) + ? ($config['autoGenerateProxyClasses'] ? AbstractProxyFactory::AUTOGENERATE_ALWAYS : AbstractProxyFactory::AUTOGENERATE_FILE_NOT_EXISTS) : $config['autoGenerateProxyClasses']; $configuration = $builder->addDefinition($this->prefix($name . '.ormConfiguration')) diff --git a/tests/KdybyTests/Doctrine/NonLockingUniqueInserter.phpt b/tests/KdybyTests/Doctrine/NonLockingUniqueInserter.phpt index 748ca127..74a0a657 100644 --- a/tests/KdybyTests/Doctrine/NonLockingUniqueInserter.phpt +++ b/tests/KdybyTests/Doctrine/NonLockingUniqueInserter.phpt @@ -70,7 +70,6 @@ class NonLockingUniqueInserterTest extends KdybyTests\Doctrine\ORMTestCase public function testSavingRelations() { $em = $this->createMemoryManager(); - $em->getProxyFactory()->generateProxyClasses($em->getMetadataFactory()->getAllMetadata()); $user = new CmsUser(); $user->username = 'HosipLan';