summaryrefslogtreecommitdiffstats
path: root/php-bartlett-php-compatinfo-db-3.4-rpm.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-03-17 08:32:51 +0100
committerRemi Collet <remi@remirepo.net>2021-03-17 08:32:51 +0100
commit4f5aeaa392ffb6a41595f235ce499bcf8facd0e9 (patch)
treeacc37ff74fd107cafd30858808fbe9346ab7a799 /php-bartlett-php-compatinfo-db-3.4-rpm.patch
parent30935455acf468492dadd19b9584e581f365d728 (diff)
use static proxy files to fix multi-users issue
https://github.com/llaville/php-compatinfo-db/issues/71
Diffstat (limited to 'php-bartlett-php-compatinfo-db-3.4-rpm.patch')
-rw-r--r--php-bartlett-php-compatinfo-db-3.4-rpm.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/php-bartlett-php-compatinfo-db-3.4-rpm.patch b/php-bartlett-php-compatinfo-db-3.4-rpm.patch
index a91bdb7..b6553ad 100644
--- a/php-bartlett-php-compatinfo-db-3.4-rpm.patch
+++ b/php-bartlett-php-compatinfo-db-3.4-rpm.patch
@@ -128,3 +128,25 @@ diff -up ./tests/Reference/GenericTest.php.rpm ./tests/Reference/GenericTest.php
self::$optionalreleases = [];
+diff -up ./src/Infrastructure/Persistence/Doctrine/EntityManagerFactory.php.rpm ./src/Infrastructure/Persistence/Doctrine/EntityManagerFactory.php
+--- ./src/Infrastructure/Persistence/Doctrine/EntityManagerFactory.php.rpm 2021-03-17 08:18:49.451918156 +0100
++++ ./src/Infrastructure/Persistence/Doctrine/EntityManagerFactory.php 2021-03-17 08:20:26.733494710 +0100
+@@ -31,6 +31,9 @@ final class EntityManagerFactory
+ public static function create(array $connection, bool $isDevMode, string $proxyDir, Cache $cache = null): EntityManagerInterface
+ {
+ $paths = [implode(DIRECTORY_SEPARATOR, [__DIR__, 'Entity'])];
++ // Static files in RPM mode
++ $isDevMode = false;
++ $proxyDir = dirname(__DIR__, 3) . '/proxies';
+ $config = Setup::createAnnotationMetadataConfiguration($paths, $isDevMode, $proxyDir, $cache);
+ if ($isDevMode) {
+ // suggested for DEV mode: see Doctrine ORM documentation
+@@ -38,7 +41,7 @@ final class EntityManagerFactory
+ $config->setAutogenerateProxyClasses(AbstractProxyFactory::AUTOGENERATE_ALWAYS);
+ } else {
+ // lazy generation on PROD or TEST modes (i.e: CI)
+- $config->setAutogenerateProxyClasses(AbstractProxyFactory::AUTOGENERATE_FILE_NOT_EXISTS);
++ $config->setAutogenerateProxyClasses(AbstractProxyFactory::AUTOGENERATE_NEVER);
+ }
+
+ return EntityManager::create(self::connection($connection), $config);