From df53122381133f9c171c991e85421f7ebdd165cb Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 11 Mar 2021 14:18:34 +0100 Subject: use devel mode to avoid missing proxy files --- php-bartlett-php-compatinfo-db-3-rpm.patch | 12 ++++++++++++ php-bartlett-php-compatinfo-db.spec | 17 +++++++++++------ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/php-bartlett-php-compatinfo-db-3-rpm.patch b/php-bartlett-php-compatinfo-db-3-rpm.patch index 755d971..02033e7 100644 --- a/php-bartlett-php-compatinfo-db-3-rpm.patch +++ b/php-bartlett-php-compatinfo-db-3-rpm.patch @@ -126,3 +126,15 @@ diff -up ./tests/Reference/GenericTest.php.rpm ./tests/Reference/GenericTest.php self::$optionalreleases = []; +diff -up ./src/Infrastructure/Persistence/Doctrine/EntityManagerFactory.php.foo ./src/Infrastructure/Persistence/Doctrine/EntityManagerFactory.php +--- ./src/Infrastructure/Persistence/Doctrine/EntityManagerFactory.php.foo 2021-03-11 14:07:50.842278889 +0100 ++++ ./src/Infrastructure/Persistence/Doctrine/EntityManagerFactory.php 2021-03-11 14:07:53.649268435 +0100 +@@ -28,7 +28,7 @@ final class EntityManagerFactory + public static function create(array $connection, Cache $cache = null): EntityManagerInterface + { + $paths = [implode(DIRECTORY_SEPARATOR, [__DIR__, 'Entity'])]; +- $isDevMode = false; ++ $isDevMode = true; + $proxyDir = null; + $config = Setup::createAnnotationMetadataConfiguration($paths, $isDevMode, $proxyDir, $cache); + diff --git a/php-bartlett-php-compatinfo-db.spec b/php-bartlett-php-compatinfo-db.spec index 81ac7c4..de1dce1 100644 --- a/php-bartlett-php-compatinfo-db.spec +++ b/php-bartlett-php-compatinfo-db.spec @@ -12,8 +12,6 @@ #global gh_date 20151031 %global gh_owner llaville %global gh_project php-compatinfo-db -%global upstream_version 3.3.0 -#global upstream_prever RC1 # Namespace %global ns_vendor Bartlett %global ns_project CompatInfoDb @@ -28,10 +26,12 @@ %bcond_with tests %endif +%global upstream_version 3.3.0 +#global upstream_prever RC1 + Name: php-%{c_vendor}-%{c_project} Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -%global specrel 2 -Release: %{?gh_date:1%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist} +Release: 2%{?dist} Summary: Reference Database to be used with php-compatinfo library License: BSD @@ -41,6 +41,7 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit # Fix autoloader path # Fix sqlite database path # Fix version and avoir composer/package-versions-deprecated (relying on composer.lock) +# Set devel mode to avoid missing proxy files Patch0: %{name}-3-rpm.patch # CURL_SSLVERSION constants have been backported Patch1: %{name}-curltls.patch @@ -172,7 +173,7 @@ EOF grep "%{version}" src/Presentation/Console/ApplicationInterface.php # Cleanup patched files -# find src -name \*rpm -delete -print +find src -name \*rpm -delete -print %build @@ -215,7 +216,8 @@ sed -e "s:%{_datadir}/php/%{ns_vendor}/%{ns_project}:$PWD/src:" \ bin/compatinfo-db >compatinfo-db export DATABASE_URL=sqlite:///${PWD}/compatinfo.sqlite -doctrine orm:generate-proxies +# NOTICE: not needed in devel mode (see patch) +# doctrine orm:generate-proxies doctrine orm:schema-tool:create : Generate the references database @@ -268,6 +270,9 @@ exit $ret %changelog +* Thu Mar 11 2021 Remi Collet - 3.3.0-2 +- use devel mode to avoid missing proxy files + * Wed Mar 10 2021 Remi Collet - 3.3.0-1 - update to 3.3.0 -- cgit