From a793fd73c77b82c5baeee33eb0c36a91685c4426 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 25 May 2021 11:52:41 +0200 Subject: update to 2.9.1 lower dependency on PHP 7.1 raise dependency on doctrine/annotations 1.13 raise dependency on doctrine/cache 1.11 and allow v2 raise dependency on doctrine/dbal 2.13 add dependency on doctrine/deprecations add dependency on psr/cache add build dependency on symfony/cache --- composer.json | 14 +++--- php-doctrine-orm-bin.patch | 4 +- php-doctrine-orm-version.patch | 28 ++++++------ php-doctrine-orm.spec | 97 +++++++++++++++++++++++++++++++----------- 4 files changed, 96 insertions(+), 47 deletions(-) diff --git a/composer.json b/composer.json index babcad2..ee0e680 100644 --- a/composer.json +++ b/composer.json @@ -16,30 +16,34 @@ "sort-packages": true }, "require": { - "php": "^7.2|^8.0", + "php": "^7.1|^8.0", "ext-pdo": "*", "composer/package-versions-deprecated": "^1.8", - "doctrine/annotations": "^1.11.1", - "doctrine/cache": "^1.9.1", + "doctrine/annotations": "^1.13", + "doctrine/cache": "^1.11|^2.0", "doctrine/collections": "^1.5", "doctrine/common": "^3.0.3", - "doctrine/dbal": "^2.10.0", + "doctrine/dbal": "^2.13.0", + "doctrine/deprecations": "^0.5.3", "doctrine/event-manager": "^1.1", "doctrine/inflector": "^1.4|^2.0", "doctrine/instantiator": "^1.3", "doctrine/lexer": "^1.0", "doctrine/persistence": "^2.2", + "psr/cache": "^1 || ^2 || ^3", "symfony/console": "^3.0|^4.0|^5.0|^6.0" }, "require-dev": { "doctrine/coding-standard": "^9.0", "phpstan/phpstan": "^0.12.83", - "phpunit/phpunit": "^8.5|^9.4", + "phpunit/phpunit": "^7.5|^8.5|^9.4", "squizlabs/php_codesniffer": "3.6.0", + "symfony/cache": "^4.4|^5.2", "symfony/yaml": "^3.4|^4.0|^5.0|^6.0", "vimeo/psalm": "4.7.0" }, "suggest": { + "symfony/cache": "Provides cache support for Setup Tool with doctrine/cache 2.0", "symfony/yaml": "If you want to use YAML Metadata Mapping Driver" }, "autoload": { diff --git a/php-doctrine-orm-bin.patch b/php-doctrine-orm-bin.patch index 93d6e84..0326446 100644 --- a/php-doctrine-orm-bin.patch +++ b/php-doctrine-orm-bin.patch @@ -28,7 +28,7 @@ diff -up ./bin/doctrine.php.rpm ./bin/doctrine.php diff -up ./lib/Doctrine/ORM/Tools/Setup.php.rpm ./lib/Doctrine/ORM/Tools/Setup.php --- ./lib/Doctrine/ORM/Tools/Setup.php.rpm 2021-02-24 11:43:44.654144234 +0100 +++ ./lib/Doctrine/ORM/Tools/Setup.php 2021-02-24 11:45:51.890721815 +0100 -@@ -54,7 +54,11 @@ class Setup +@@ -62,7 +62,11 @@ class Setup public static function registerAutoloadDirectory($directory) { if (! class_exists('Doctrine\Common\ClassLoader', false)) { @@ -44,7 +44,7 @@ diff -up ./lib/Doctrine/ORM/Tools/Setup.php.rpm ./lib/Doctrine/ORM/Tools/Setup.p diff -up ./tests/Doctrine/Tests/ORM/Tools/SetupTest.php.rpm ./tests/Doctrine/Tests/ORM/Tools/SetupTest.php --- ./tests/Doctrine/Tests/ORM/Tools/SetupTest.php.rpm 2021-02-24 11:43:44.654144234 +0100 +++ ./tests/Doctrine/Tests/ORM/Tools/SetupTest.php 2021-02-24 11:45:10.370859668 +0100 -@@ -55,7 +55,7 @@ class SetupTest extends OrmTestCase +@@ -57,7 +57,7 @@ class SetupTest extends OrmTestCase public function testDirectoryAutoload(): void { diff --git a/php-doctrine-orm-version.patch b/php-doctrine-orm-version.patch index 471edd8..900d653 100644 --- a/php-doctrine-orm-version.patch +++ b/php-doctrine-orm-version.patch @@ -1,35 +1,35 @@ -diff -up ./lib/Doctrine/ORM/Tools/Console/ConsoleRunner.php.rpm ./lib/Doctrine/ORM/Tools/Console/ConsoleRunner.php ---- ./lib/Doctrine/ORM/Tools/Console/ConsoleRunner.php.rpm 2021-02-24 11:46:38.401567397 +0100 -+++ ./lib/Doctrine/ORM/Tools/Console/ConsoleRunner.php 2021-02-24 11:48:56.874107710 +0100 -@@ -24,7 +24,6 @@ use Doctrine\DBAL\Tools\Console as DBALC - use Doctrine\ORM\EntityManagerInterface; +diff -up ./lib/Doctrine/ORM/Tools/Console/ConsoleRunner.php.rpm2 ./lib/Doctrine/ORM/Tools/Console/ConsoleRunner.php +--- ./lib/Doctrine/ORM/Tools/Console/ConsoleRunner.php.rpm2 2021-05-25 11:43:30.755931291 +0200 ++++ ./lib/Doctrine/ORM/Tools/Console/ConsoleRunner.php 2021-05-25 11:43:41.408887703 +0200 +@@ -26,7 +26,6 @@ use Doctrine\ORM\Tools\Console\EntityMan + use Doctrine\ORM\Tools\Console\EntityManagerProvider\HelperSetManagerProvider; use Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper; use OutOfBoundsException; -use PackageVersions\Versions; use Symfony\Component\Console\Application; use Symfony\Component\Console\Command\Command as SymfonyCommand; use Symfony\Component\Console\Helper\HelperSet; -@@ -68,7 +67,7 @@ final class ConsoleRunner +@@ -72,7 +71,7 @@ final class ConsoleRunner */ - public static function createApplication(HelperSet $helperSet, array $commands = []): Application + public static function createApplication($helperSetOrProvider, array $commands = []): Application { - $cli = new Application('Doctrine Command Line Interface', Versions::getVersion('doctrine/orm')); + $cli = new Application('Doctrine Command Line Interface', '@VERSION@'); $cli->setCatchExceptions(true); - $cli->setHelperSet($helperSet); - self::addCommands($cli); -diff -up ./tests/Doctrine/Tests/ORM/Tools/Console/ConsoleRunnerTest.php.rpm ./tests/Doctrine/Tests/ORM/Tools/Console/ConsoleRunnerTest.php ---- ./tests/Doctrine/Tests/ORM/Tools/Console/ConsoleRunnerTest.php.rpm 2021-02-24 11:42:32.000000000 +0100 -+++ ./tests/Doctrine/Tests/ORM/Tools/Console/ConsoleRunnerTest.php 2021-02-24 11:46:38.402567394 +0100 -@@ -6,7 +6,6 @@ namespace Doctrine\Tests\ORM\Tools\Conso + if ($helperSetOrProvider instanceof HelperSet) { +diff -up ./tests/Doctrine/Tests/ORM/Tools/Console/ConsoleRunnerTest.php.rpm2 ./tests/Doctrine/Tests/ORM/Tools/Console/ConsoleRunnerTest.php +--- ./tests/Doctrine/Tests/ORM/Tools/Console/ConsoleRunnerTest.php.rpm2 2021-05-25 11:22:59.000000000 +0200 ++++ ./tests/Doctrine/Tests/ORM/Tools/Console/ConsoleRunnerTest.php 2021-05-25 11:43:50.620850013 +0200 +@@ -8,7 +8,6 @@ use Doctrine\Deprecations\PHPUnit\Verify use Doctrine\ORM\Tools\Console\ConsoleRunner; + use Doctrine\ORM\Tools\Console\EntityManagerProvider; use Doctrine\Tests\DoctrineTestCase; -use PackageVersions\Versions; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\HelperSet; -@@ -22,7 +21,7 @@ final class ConsoleRunnerTest extends Do +@@ -28,7 +27,7 @@ final class ConsoleRunnerTest extends Do $app = ConsoleRunner::createApplication($helperSet); self::assertSame($helperSet, $app->getHelperSet()); diff --git a/php-doctrine-orm.spec b/php-doctrine-orm.spec index 040ecc7..3e33b84 100644 --- a/php-doctrine-orm.spec +++ b/php-doctrine-orm.spec @@ -13,29 +13,32 @@ %global github_owner doctrine %global github_name orm -%global github_version 2.8.5 -%global github_commit a6577b89a2b028b79550ef58d9f272debdd75da4 +%global github_version 2.9.1 +%global github_commit f3e55fae9fdbdbc23897006bdbf016c20e11f6e9 %global composer_vendor doctrine %global composer_project orm -# "php": "^7.2|^8.0" -%global php_min_ver 7.2 -# "doctrine/annotations": "^1.11.1", -%global annotations_min_ver 1.11.1 +# "php": "^7.1|^8.0" +%global php_min_ver 7.1 +# "doctrine/annotations": "^1.13", +%global annotations_min_ver 1.13 %global annotations_max_ver 2 -# "doctrine/cache": "^1.9.1" -%global cache_min_ver 1.9.1 -%global cache_max_ver 2 +# "doctrine/cache": "^1.11|^2.0" +%global cache_min_ver 1.11 +%global cache_max_ver 3 # "doctrine/collections": "^1.5" %global collections_min_ver 1.5 %global collections_max_ver 2 # "doctrine/common": "^3.0.3" %global common_min_ver 3.0.3 %global common_max_ver 4 -# "doctrine/dbal": "^2.10" -%global dbal_min_ver 2.10 +# "doctrine/dbal": "^2.13" +%global dbal_min_ver 2.13 %global dbal_max_ver 3 +# "doctrine/deprecations": "^0.5.3" +%global deprecations_min_ver 0.5.3 +%global deprecations_max_ver 1 # "doctrine/inflector": "^1.4|^2.0" %global inflector_min_ver 1.4 %global inflector_max_ver 3 @@ -54,7 +57,13 @@ # "symfony/console": "^3.0|^4.0|^5.0|^6.0" # "symfony/yaml": "~^3.4|^4.0|^5.0|^6.0" %global symfony_min_ver 3.4 -%global symfony_max_ver 6 +%global symfony_max_ver 7 +# "symfony/cache": "^4.4|^5.2", +%global sym_cache_min_ver 4.4 +%global sym_cache_max_ver 6 +# "psr/cache": "^1 || ^2 || ^3", +%global psr_cache_min_ver 1 +%global psr_cache_max_ver 4 %{!?phpdir: %global phpdir %{_datadir}/php} @@ -92,6 +101,7 @@ 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/deprecations) >= %{deprecations_min_ver} with php-composer(doctrine/deprecations) < %{deprecations_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}) @@ -99,7 +109,9 @@ BuildRequires: (php-composer(doctrine/lexer) >= %{lexer_min_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}) -# remirepo:26 +BuildRequires: (php-composer(symfony/cache) >= %{sym_cache_min_ver} with php-composer(symfony/cache) < %{sym_cache_max_ver}) +BuildRequires: (php-composer(psr/cache) >= %{psr_cache_min_ver} with php-composer(psr/cache) < %{psr_cache_max_ver}) +# remirepo:30 %else BuildRequires: php-composer(doctrine/annotations) < %{annotations_max_ver} BuildRequires: php-composer(doctrine/annotations) >= %{annotations_min_ver} @@ -111,6 +123,8 @@ 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/deprecations) < %{deprecations_max_ver} +BuildRequires: php-composer(doctrine/deprecations) >= %{deprecations_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} @@ -125,14 +139,13 @@ BuildRequires: php-composer(symfony/console) < %{symfony_max_ver} BuildRequires: php-composer(symfony/console) >= %{symfony_min_ver} BuildRequires: php-composer(symfony/yaml) < %{symfony_max_ver} BuildRequires: php-composer(symfony/yaml) >= %{symfony_min_ver} +BuildRequires: php-composer(symfony/cache) < %{sym_cache_max_ver} +BuildRequires: php-composer(symfony/cache) >= %{sym_cache_min_ver} +BuildRequires: php-composer(psr/cache) < %{psr_cache_max_ver} +BuildRequires: php-composer(psr/cache) >= %{psr_cache_min_ver} %endif -%if 0%{?fedora} >= 32 || 0%{?rhel} >= 9 %global phpunit %{_bindir}/phpunit9 BuildRequires: phpunit9 >= 9.4 -%else -%global phpunit %{_bindir}/phpunit8 -BuildRequires: phpunit8 >= 8.5 -%endif BuildRequires: php-pdo # phpcompatinfo (computed from version 2.5.11) BuildRequires: php-ctype @@ -157,15 +170,17 @@ 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/deprecations) >= %{deprecations_min_ver} with php-composer(doctrine/deprecations) < %{deprecations_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}) +Requires: (php-composer(psr/cache) >= %{psr_cache_min_ver} with php-composer(psr/cache) < %{psr_cache_max_ver}) # composer.json: suggest Recommends: (php-composer(symfony/yaml) >= %{symfony_min_ver} with php-composer(symfony/yaml) < %{symfony_max_ver}) -# remirepo:26 +# remirepo:30 %else Requires: php-composer(doctrine/annotations) < %{annotations_max_ver} Requires: php-composer(doctrine/annotations) >= %{annotations_min_ver} @@ -177,6 +192,8 @@ 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/deprecations) < %{deprecations_max_ver} +Requires: php-composer(doctrine/deprecations) >= %{deprecations_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} @@ -191,6 +208,8 @@ Requires: php-composer(symfony/console) < %{symfony_max_ver} Requires: php-composer(symfony/console) >= %{symfony_min_ver} Requires: php-composer(symfony/yaml) < %{symfony_max_ver} Requires: php-composer(symfony/yaml) >= %{symfony_min_ver} +Requires: php-composer(psr/cache) < %{psr_cache_max_ver} +Requires: php-composer(psr/cache) >= %{psr_cache_min_ver} %endif Requires: php-pdo # phpcompatinfo (computed from version 2.5.11) @@ -238,15 +257,15 @@ Autoloader: %{phpdir}/Doctrine/ORM/autoload.php %setup -qn %{github_name}-%{github_commit} : Patch bin script -%patch0 -p1 -b .rpm +%patch0 -p1 -b .rpm1 sed -e 's#__PHPDIR__#%{phpdir}#g' -i \ bin/doctrine.php -%patch1 -p1 -b .rpm +%patch1 -p1 -b .rpm2 sed -e 's/@VERSION@/%{version}/' -i \ lib/Doctrine/ORM/Tools/Console/ConsoleRunner.php \ tests/Doctrine/Tests/ORM/Tools/Console/ConsoleRunnerTest.php -find lib -name \*.rpm -delete +find lib -name \*.rpm\? -delete : Remove empty file rm -f lib/Doctrine/ORM/README.markdown @@ -266,8 +285,12 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php'; \Fedora\Autoloader\Dependencies::required([ '%{phpdir}/Doctrine/Common3/autoload.php', - '%{phpdir}/Doctrine/Common/Cache/autoload.php', + [ + '%{phpdir}/Doctrine/Common/Cache2/autoload.php', + '%{phpdir}/Doctrine/Common/Cache/autoload.php', + ], '%{phpdir}/Doctrine/Common/Collections/autoload.php', + '%{phpdir}/Doctrine/Deprecations/autoload.php', [ '%{phpdir}/Doctrine/Inflector2/autoload.php', '%{phpdir}/Doctrine/Common/Inflector/autoload.php', @@ -278,14 +301,20 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php'; '%{phpdir}/Doctrine/DBAL/autoload.php', '%{phpdir}/Doctrine/Instantiator/autoload.php', [ - '%{phpdir}/Symfony5/Component/Console/autoload.php', - '%{phpdir}/Symfony4/Component/Console/autoload.php', - '%{phpdir}/Symfony3/Component/Console/autoload.php', + '%{phpdir}/Symfony6/Component/Console/autoload.php', + '%{phpdir}/Symfony5/Component/Console/autoload.php', + '%{phpdir}/Symfony4/Component/Console/autoload.php', + '%{phpdir}/Symfony3/Component/Console/autoload.php', + ], [ + '%{phpdir}/Psr/Cache3/autoload.php', + '%{phpdir}/Psr/Cache2/autoload.php', + '%{phpdir}/Psr/Cache/autoload.php', ], ]); \Fedora\Autoloader\Dependencies::optional([ [ + '%{phpdir}/Symfony6/Component/Yaml/autoload.php', '%{phpdir}/Symfony5/Component/Yaml/autoload.php', '%{phpdir}/Symfony4/Component/Yaml/autoload.php', '%{phpdir}/Symfony3Component/Yaml/autoload.php', @@ -319,6 +348,12 @@ sed "/registerFile/s#__DIR__.*/lib#'%{buildroot}%{phpdir}#" \ cat > bootstrap.php <<'BOOTSTRAP' - 2.9.1-1 +- update to 2.9.1 +- lower dependency on PHP 7.1 +- raise dependency on doctrine/annotations 1.13 +- raise dependency on doctrine/cache 1.11 and allow v2 +- raise dependency on doctrine/dbal 2.13 +- add dependency on doctrine/deprecations +- add dependency on psr/cache +- add build dependency on symfony/cache + * Tue May 25 2021 Remi Collet - 2.8.5-1 - update to 2.8.5 - raise dependency on doctrine/persistence 2.2 -- cgit