From 0d3b5afc728d3776b76b6f2ad00c0c6bc77a722c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 27 May 2020 11:34:07 +0200 Subject: update to 2.7.3 allow doctrine/common v3 allow doctrine/persistence v2 add dependency on doctrine/inflector add dependency on doctrine/lexer --- composer.json | 13 ++++++++--- php-doctrine-orm-bin.patch | 18 ++++++++++++++- php-doctrine-orm.spec | 55 ++++++++++++++++++++++++++++++++++++---------- 3 files changed, 71 insertions(+), 15 deletions(-) diff --git a/composer.json b/composer.json index ed05a26..787210c 100644 --- a/composer.json +++ b/composer.json @@ -13,6 +13,9 @@ {"name": "Marco Pivetta", "email": "ocramius@gmail.com"} ], "config": { + "platform": { + "php": "7.1.3" + }, "sort-packages": true }, "require": { @@ -21,18 +24,22 @@ "doctrine/annotations": "^1.8", "doctrine/cache": "^1.9.1", "doctrine/collections": "^1.5", - "doctrine/common": "^2.11", + "doctrine/common": "^2.11 || ^3.0", "doctrine/dbal": "^2.9.3", "doctrine/event-manager": "^1.1", + "doctrine/inflector": "^1.0", "doctrine/instantiator": "^1.3", - "doctrine/persistence": "^1.2", + "doctrine/lexer": "^1.0", + "doctrine/persistence": "^1.3.3 || ^2.0", "ocramius/package-versions": "^1.2", "symfony/console": "^3.0|^4.0|^5.0" }, "require-dev": { "doctrine/coding-standard": "^5.0", + "phpstan/phpstan": "^0.12.18", "phpunit/phpunit": "^7.5", - "symfony/yaml": "^3.4|^4.0|^5.0" + "symfony/yaml": "^3.4|^4.0|^5.0", + "vimeo/psalm": "^3.11" }, "suggest": { "symfony/yaml": "If you want to use YAML Metadata Mapping Driver" diff --git a/php-doctrine-orm-bin.patch b/php-doctrine-orm-bin.patch index 77992f0..37e0e16 100644 --- a/php-doctrine-orm-bin.patch +++ b/php-doctrine-orm-bin.patch @@ -29,7 +29,7 @@ index 842c5493f..e1ccb7506 100755 diff -up a/tests/Doctrine/Tests/ORM/Tools/SetupTest.php.rpm b/tests/Doctrine/Tests/ORM/Tools/SetupTest.php --- a/tests/Doctrine/Tests/ORM/Tools/SetupTest.php.rpm 2019-09-30 08:35:50.547638239 +0200 +++ b/tests/Doctrine/Tests/ORM/Tools/SetupTest.php 2019-09-30 08:37:02.769360851 +0200 -@@ -45,7 +45,7 @@ class SetupTest extends OrmTestCase +@@ -43,7 +43,7 @@ class SetupTest extends OrmTestCase public function testDirectoryAutoload() { @@ -39,3 +39,19 @@ diff -up a/tests/Doctrine/Tests/ORM/Tools/SetupTest.php.rpm b/tests/Doctrine/Tes $this->assertEquals($this->originalAutoloaderCount + 2, count(spl_autoload_functions())); } +diff -up ./lib/Doctrine/ORM/Tools/Setup.php.rpm ./lib/Doctrine/ORM/Tools/Setup.php +--- ./lib/Doctrine/ORM/Tools/Setup.php.rpm 2020-05-27 11:28:24.144920624 +0200 ++++ ./lib/Doctrine/ORM/Tools/Setup.php 2020-05-27 11:29:14.330733814 +0200 +@@ -45,7 +45,11 @@ class Setup + public static function registerAutoloadDirectory($directory) + { + if (!class_exists('Doctrine\Common\ClassLoader', false)) { +- require_once $directory . "/Doctrine/Common/ClassLoader.php"; ++ if (file_exists($directory . "/Doctrine/Common3/ClassLoader.php")) { ++ require_once $directory . "/Doctrine/Common3/ClassLoader.php"; ++ } else { ++ require_once $directory . "/Doctrine/Common/ClassLoader.php"; ++ } + } + + $loader = new ClassLoader("Doctrine", $directory); diff --git a/php-doctrine-orm.spec b/php-doctrine-orm.spec index cb9ba6f..8088315 100644 --- a/php-doctrine-orm.spec +++ b/php-doctrine-orm.spec @@ -13,8 +13,8 @@ %global github_owner doctrine %global github_name orm -%global github_version 2.7.2 -%global github_commit dafe298ce5d0b995ebe1746670704c0a35868a6a +%global github_version 2.7.3 +%global github_commit d95e03ba660d50d785a9925f41927fef0ee553cf %global composer_vendor doctrine %global composer_project orm @@ -30,18 +30,24 @@ # "doctrine/collections": "^1.5" %global collections_min_ver 1.5 %global collections_max_ver 2 -# "doctrine/common": "^2.11" +# "doctrine/common": "^2.11 || ^3.0" %global common_min_ver 2.11 -%global common_max_ver 3 +%global common_max_ver 4 # "doctrine/dbal": "^2.9.3" %global dbal_min_ver 2.9.3 %global dbal_max_ver 3 +# "doctrine/inflector": "^1.0" +%global inflector_min_ver 1.0 +%global inflector_max_ver 2 # "doctrine/instantiator": "^1.3" %global instantiator_min_ver 1.3 %global instantiator_max_ver 2 -# "doctrine/persistence": "^1.2" -%global persistence_min_ver 1.2 -%global persistence_max_ver 2 +# "doctrine/lexer": "^1.0" +%global lexer_min_ver 1.0 +%global lexer_max_ver 2 +# "doctrine/persistence": "^1.3.3 || ^2.0" +%global persistence_min_ver 1.3.3 +%global persistence_max_ver 3 # "doctrine/event-manager": "^1.1" %global event_min_ver 1.1 %global event_max_ver 2 @@ -86,8 +92,10 @@ BuildRequires: (php-composer(doctrine/cache) >= %{cache_min_ver} BuildRequires: (php-composer(doctrine/collections) >= %{collections_min_ver} with php-composer(doctrine/collections) < %{collections_max_ver}) BuildRequires: (php-composer(doctrine/common) >= %{common_min_ver} with php-composer(doctrine/common) < %{common_max_ver}) BuildRequires: (php-composer(doctrine/dbal) >= %{dbal_min_ver} with php-composer(doctrine/dbal) < %{dbal_max_ver}) +BuildRequires: (php-composer(doctrine/inflector) >= %{inflector_min_ver} with php-composer(doctrine/inflector) < %{inflector_max_ver}) BuildRequires: (php-composer(doctrine/instantiator) >= %{instantiator_min_ver} with php-composer(doctrine/instantiator) < %{instantiator_max_ver}) BuildRequires: (php-composer(doctrine/event-manager) >= %{event_min_ver} with php-composer(doctrine/event-manager) < %{event_max_ver}) +BuildRequires: (php-composer(doctrine/lexer) >= %{lexer_min_ver} with php-composer(doctrine/lexer) < %{lexer_max_ver}) BuildRequires: (php-composer(doctrine/persistence) >= %{persistence_min_ver} with php-composer(doctrine/persistence) < %{persistence_max_ver}) BuildRequires: (php-composer(symfony/console) >= %{symfony_min_ver} with php-composer(symfony/console) < %{symfony_max_ver}) BuildRequires: (php-composer(symfony/yaml) >= %{symfony_min_ver} with php-composer(symfony/yaml) < %{symfony_max_ver}) @@ -103,10 +111,14 @@ BuildRequires: php-composer(doctrine/common) < %{common_max_ver} BuildRequires: php-composer(doctrine/common) >= %{common_min_ver} BuildRequires: php-composer(doctrine/dbal) < %{dbal_max_ver} BuildRequires: php-composer(doctrine/dbal) >= %{dbal_min_ver} +BuildRequires: php-composer(doctrine/inflector) < %{inflector_max_ver} +BuildRequires: php-composer(doctrine/inflector) >= %{inflector_min_ver} BuildRequires: php-composer(doctrine/instantiator) < %{instantiator_max_ver} BuildRequires: php-composer(doctrine/instantiator) >= %{instantiator_min_ver} BuildRequires: php-composer(doctrine/event-manager) < %{event_max_ver} BuildRequires: php-composer(doctrine/event-manager) >= %{event_min_ver} +BuildRequires: php-composer(doctrine/lexer) < %{lexer_max_ver} +BuildRequires: php-composer(doctrine/lexer) >= %{lexer_min_ver} BuildRequires: php-composer(doctrine/persistence) < %{persistence_max_ver} BuildRequires: php-composer(doctrine/persistence) >= %{persistence_min_ver} BuildRequires: php-composer(symfony/console) < %{symfony_max_ver} @@ -139,13 +151,15 @@ Requires: (php-composer(doctrine/cache) >= %{cache_min_ver} Requires: (php-composer(doctrine/collections) >= %{collections_min_ver} with php-composer(doctrine/collections) < %{collections_max_ver}) Requires: (php-composer(doctrine/common) >= %{common_min_ver} with php-composer(doctrine/common) < %{common_max_ver}) Requires: (php-composer(doctrine/dbal) >= %{dbal_min_ver} with php-composer(doctrine/dbal) < %{dbal_max_ver}) +Requires: (php-composer(doctrine/inflector) >= %{inflector_min_ver} with php-composer(doctrine/inflector) < %{inflector_max_ver}) Requires: (php-composer(doctrine/instantiator) >= %{instantiator_min_ver} with php-composer(doctrine/instantiator) < %{instantiator_max_ver}) Requires: (php-composer(doctrine/event-manager) >= %{event_min_ver} with php-composer(doctrine/event-manager) < %{event_max_ver}) +Requires: (php-composer(doctrine/lexer) >= %{lexer_min_ver} with php-composer(doctrine/lexer) < %{lexer_max_ver}) Requires: (php-composer(doctrine/persistence) >= %{persistence_min_ver} with php-composer(doctrine/persistence) < %{persistence_max_ver}) Requires: (php-composer(symfony/console) >= %{symfony_min_ver} with php-composer(symfony/console) < %{symfony_max_ver}) # composer.json: suggest Recommends: (php-composer(symfony/yaml) >= %{symfony_min_ver} with php-composer(symfony/yaml) < %{symfony_max_ver}) -# remirepo:22 +# remirepo:26 %else Requires: php-composer(doctrine/annotations) < %{annotations_max_ver} Requires: php-composer(doctrine/annotations) >= %{annotations_min_ver} @@ -157,10 +171,14 @@ Requires: php-composer(doctrine/common) < %{common_max_ver} Requires: php-composer(doctrine/common) >= %{common_min_ver} Requires: php-composer(doctrine/dbal) < %{dbal_max_ver} Requires: php-composer(doctrine/dbal) >= %{dbal_min_ver} +Requires: php-composer(doctrine/inflector) < %{inflector_max_ver} +Requires: php-composer(doctrine/inflector) >= %{inflector_min_ver} Requires: php-composer(doctrine/instantiator) < %{instantiator_max_ver} Requires: php-composer(doctrine/instantiator) >= %{instantiator_min_ver} Requires: php-composer(doctrine/event-manager) < %{event_max_ver} Requires: php-composer(doctrine/event-manager) >= %{event_min_ver} +Requires: php-composer(doctrine/lexer) < %{lexer_max_ver} +Requires: php-composer(doctrine/lexer) >= %{lexer_min_ver} Requires: php-composer(doctrine/persistence) < %{persistence_max_ver} Requires: php-composer(doctrine/persistence) >= %{persistence_min_ver} Requires: php-composer(symfony/console) < %{symfony_max_ver} @@ -241,11 +259,19 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php'; \Fedora\Autoloader\Autoload::addPsr4('Doctrine\\ORM\\', __DIR__); \Fedora\Autoloader\Dependencies::required([ - '%{phpdir}/Doctrine/Common/autoload.php', + [ + '%{phpdir}/Doctrine/Common3/autoload.php', + '%{phpdir}/Doctrine/Common/autoload.php', + ], '%{phpdir}/Doctrine/Common/Cache/autoload.php', '%{phpdir}/Doctrine/Common/Collections/autoload.php', + '%{phpdir}/Doctrine/Common/Inflector/autoload.php', '%{phpdir}/Doctrine/Common/EventManager/autoload.php', - '%{phpdir}/Doctrine/Common/Persistence/autoload.php', + '%{phpdir}/Doctrine/Common/Lexer/autoload.php', + [ + '%{phpdir}/Doctrine/Persistence2/autoload.php', + '%{phpdir}/Doctrine/Persistence/autoload.php', + ], '%{phpdir}/Doctrine/DBAL/autoload.php', '%{phpdir}/Doctrine/Instantiator/autoload.php', [ @@ -296,7 +322,7 @@ BOOTSTRAP : Upstream tests RETURN_CODE=0 -for PHP_EXEC in "" php71 php72 php73 php74; do +for PHP_EXEC in "" php72 php73 php74; do if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then $PHP_EXEC %{_bindir}/phpunit7 --verbose -d memory_limit="512M" --bootstrap bootstrap.php \ || RETURN_CODE=1 @@ -319,6 +345,13 @@ exit $RETURN_CODE %changelog +* Wed May 27 2020 Remi Collet - 2.7.3-1 +- update to 2.7.3 +- allow doctrine/common v3 +- allow doctrine/persistence v2 +- add dependency on doctrine/inflector +- add dependency on doctrine/lexer + * Wed Mar 25 2020 Remi Collet - 2.7.2-1 - update to 2.7.2 -- cgit