diff options
-rw-r--r-- | php-bartlett-php-compatinfo-db-3-rpm.patch | 20 | ||||
-rw-r--r-- | php-bartlett-php-compatinfo-db.spec | 10 |
2 files changed, 13 insertions, 17 deletions
diff --git a/php-bartlett-php-compatinfo-db-3-rpm.patch b/php-bartlett-php-compatinfo-db-3-rpm.patch index 9806619..b577ac1 100644 --- a/php-bartlett-php-compatinfo-db-3-rpm.patch +++ b/php-bartlett-php-compatinfo-db-3-rpm.patch @@ -127,23 +127,15 @@ diff -up ./tests/Reference/GenericTest.php.rpm ./tests/Reference/GenericTest.php self::$optionalreleases = []; diff --git a/src/Infrastructure/Persistence/Doctrine/EntityManagerFactory.php b/src/Infrastructure/Persistence/Doctrine/EntityManagerFactory.php -index 3bf905d..850956c 100644 +index 9cc1f15..89e557b 100644 --- a/src/Infrastructure/Persistence/Doctrine/EntityManagerFactory.php +++ b/src/Infrastructure/Persistence/Doctrine/EntityManagerFactory.php -@@ -3,6 +3,7 @@ - namespace Bartlett\CompatInfoDb\Infrastructure\Persistence\Doctrine; - - use Doctrine\Common\Cache\Cache; -+use Doctrine\Common\Proxy\AbstractProxyFactory; - use Doctrine\ORM\EntityManager; - use Doctrine\ORM\EntityManagerInterface; - use Doctrine\ORM\ORMException; -@@ -28,7 +29,7 @@ final class EntityManagerFactory - public static function create(array $connection, Cache $cache = null): EntityManagerInterface +@@ -29,7 +29,7 @@ final class EntityManagerFactory { $paths = [implode(DIRECTORY_SEPARATOR, [__DIR__, 'Entity'])]; -- $isDevMode = false; -+ $isDevMode = AbstractProxyFactory::AUTOGENERATE_FILE_NOT_EXISTS; - $proxyDir = null; + $isDevMode = false; +- $proxyDir = null; ++ $proxyDir = dirname(__DIR__, 3) . '/proxies'; $config = Setup::createAnnotationMetadataConfiguration($paths, $isDevMode, $proxyDir, $cache); + return EntityManager::create(self::connection($connection), $config); diff --git a/php-bartlett-php-compatinfo-db.spec b/php-bartlett-php-compatinfo-db.spec index de1dce1..8d612f9 100644 --- a/php-bartlett-php-compatinfo-db.spec +++ b/php-bartlett-php-compatinfo-db.spec @@ -31,7 +31,7 @@ Name: php-%{c_vendor}-%{c_project} Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Reference Database to be used with php-compatinfo library License: BSD @@ -145,6 +145,7 @@ Conflicts: php-bartlett-PHP-CompatInfo < 5 : relocate mv config src/config +mkdir src/proxies cat << 'EOF' | tee src/autoload.php <?php @@ -216,8 +217,7 @@ sed -e "s:%{_datadir}/php/%{ns_vendor}/%{ns_project}:$PWD/src:" \ bin/compatinfo-db >compatinfo-db export DATABASE_URL=sqlite:///${PWD}/compatinfo.sqlite -# NOTICE: not needed in devel mode (see patch) -# doctrine orm:generate-proxies +doctrine orm:generate-proxies doctrine orm:schema-tool:create : Generate the references database @@ -270,6 +270,10 @@ exit $ret %changelog +* Thu Mar 11 2021 Remi Collet <remi@remirepo.net> - 3.3.0-3 +- switch back in production mode, and add a proxies directory + from https://github.com/llaville/php-compatinfo-db/pull/67 + * Thu Mar 11 2021 Remi Collet <remi@remirepo.net> - 3.3.0-2 - use devel mode to avoid missing proxy files |