From 7ade3f89bcc4e2ec8828816470fcaf541272eca1 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 4 Oct 2021 10:12:26 +0200 Subject: update to 2.10.0 drop dependency on doctrine/annotations add dependency on symfony/polyfill-php80 --- composer.json | 11 ++++++++--- php-doctrine-orm-bin.patch | 30 ++++++++++++++---------------- php-doctrine-orm-version.patch | 14 +++++++------- php-doctrine-orm.spec | 30 ++++++++++++++++++++++-------- 4 files changed, 51 insertions(+), 34 deletions(-) diff --git a/composer.json b/composer.json index 0e9c649..2a6df9d 100644 --- a/composer.json +++ b/composer.json @@ -20,11 +20,10 @@ "ext-ctype": "*", "ext-pdo": "*", "composer/package-versions-deprecated": "^1.8", - "doctrine/annotations": "^1.13", "doctrine/cache": "^1.12.1 || ^2.1.1", "doctrine/collections": "^1.5", "doctrine/common": "^3.0.3", - "doctrine/dbal": "^2.13.0", + "doctrine/dbal": "^2.13.1 || ^3.1.1", "doctrine/deprecations": "^0.5.3", "doctrine/event-manager": "^1.1", "doctrine/inflector": "^1.4 || ^2.0", @@ -32,9 +31,12 @@ "doctrine/lexer": "^1.0", "doctrine/persistence": "^2.2", "psr/cache": "^1 || ^2 || ^3", - "symfony/console": "^3.0 || ^4.0 || ^5.0 || ^6.0" + "symfony/console": "^3.0 || ^4.0 || ^5.0 || ^6.0", + "symfony/polyfill-php72": "^1.23", + "symfony/polyfill-php80": "^1.15" }, "require-dev": { + "doctrine/annotations": "^1.13", "doctrine/coding-standard": "^9.0", "phpbench/phpbench": "^0.16.10 || ^1.0", "phpstan/phpstan": "0.12.99", @@ -44,6 +46,9 @@ "symfony/yaml": "^3.4 || ^4.0 || ^5.0 || ^6.0", "vimeo/psalm": "4.10.0" }, + "conflict": { + "doctrine/annotations": "<1.13 || >= 2.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" diff --git a/php-doctrine-orm-bin.patch b/php-doctrine-orm-bin.patch index 0326446..f775e0c 100644 --- a/php-doctrine-orm-bin.patch +++ b/php-doctrine-orm-bin.patch @@ -1,12 +1,10 @@ -diff -up ./bin/doctrine.php.rpm ./bin/doctrine.php ---- ./bin/doctrine.php.rpm 2021-02-24 11:42:32.000000000 +0100 -+++ ./bin/doctrine.php 2021-02-24 11:43:44.654144234 +0100 -@@ -1,3 +1,4 @@ +diff -up ./bin/doctrine.php.rpm1 ./bin/doctrine.php +--- ./bin/doctrine.php.rpm1 2021-10-04 09:50:51.000000000 +0200 ++++ ./bin/doctrine.php 2021-10-04 10:01:30.938203159 +0200 +@@ -1,19 +1,10 @@ +#!/usr/bin/env php assertEquals($this->originalAutoloaderCount + 2, count(spl_autoload_functions())); + self::assertCount($this->originalAutoloaderCount + 2, spl_autoload_functions()); } diff --git a/php-doctrine-orm-version.patch b/php-doctrine-orm-version.patch index 900d653..a179212 100644 --- a/php-doctrine-orm-version.patch +++ b/php-doctrine-orm-version.patch @@ -1,7 +1,7 @@ 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 +--- ./lib/Doctrine/ORM/Tools/Console/ConsoleRunner.php.rpm2 2021-10-04 09:50:51.000000000 +0200 ++++ ./lib/Doctrine/ORM/Tools/Console/ConsoleRunner.php 2021-10-04 10:02:19.311037009 +0200 +@@ -10,7 +10,6 @@ use Doctrine\ORM\Tools\Console\EntityMan use Doctrine\ORM\Tools\Console\EntityManagerProvider\HelperSetManagerProvider; use Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper; use OutOfBoundsException; @@ -9,7 +9,7 @@ diff -up ./lib/Doctrine/ORM/Tools/Console/ConsoleRunner.php.rpm2 ./lib/Doctrine/ use Symfony\Component\Console\Application; use Symfony\Component\Console\Command\Command as SymfonyCommand; use Symfony\Component\Console\Helper\HelperSet; -@@ -72,7 +71,7 @@ final class ConsoleRunner +@@ -59,7 +58,7 @@ final class ConsoleRunner */ public static function createApplication($helperSetOrProvider, array $commands = []): Application { @@ -19,8 +19,8 @@ diff -up ./lib/Doctrine/ORM/Tools/Console/ConsoleRunner.php.rpm2 ./lib/Doctrine/ 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 +--- ./tests/Doctrine/Tests/ORM/Tools/Console/ConsoleRunnerTest.php.rpm2 2021-10-04 09:50:51.000000000 +0200 ++++ ./tests/Doctrine/Tests/ORM/Tools/Console/ConsoleRunnerTest.php 2021-10-04 10:03:22.242820863 +0200 @@ -8,7 +8,6 @@ use Doctrine\Deprecations\PHPUnit\Verify use Doctrine\ORM\Tools\Console\ConsoleRunner; use Doctrine\ORM\Tools\Console\EntityManagerProvider; @@ -36,5 +36,5 @@ diff -up ./tests/Doctrine/Tests/ORM/Tools/Console/ConsoleRunnerTest.php.rpm2 ./t - self::assertSame(Versions::getVersion('doctrine/orm'), $app->getVersion()); + self::assertSame('@VERSION@', $app->getVersion()); - self::assertTrue($app->has('dbal:import')); self::assertTrue($app->has('dbal:reserved-words')); + self::assertTrue($app->has('dbal:run-sql')); diff --git a/php-doctrine-orm.spec b/php-doctrine-orm.spec index 7f9cfb8..7001f5a 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.9.6 -%global github_commit 5f768742a0461327bebe0fd11012bbd69e29a311 +%global github_version 2.10.0 +%global github_commit 07e15a00382982dc8088093669108d2174e456ea %global composer_vendor doctrine %global composer_project orm @@ -61,6 +61,10 @@ # "symfony/cache": "^4.4 || ^5.2", %global sym_cache_min_ver 4.4 %global sym_cache_max_ver 6 +# "symfony/polyfill-php72": "^1.23", +# "symfony/polyfill-php80": "^1.15" +%global sym_poly_min_ver 1.23 +%global sym_poly_max_ver 2 # "psr/cache": "^1 || ^2 || ^3", %global psr_cache_min_ver 1 %global psr_cache_max_ver 4 @@ -110,8 +114,9 @@ BuildRequires: (php-composer(doctrine/persistence) >= %{persistence_min_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}) BuildRequires: (php-composer(symfony/cache) >= %{sym_cache_min_ver} with php-composer(symfony/cache) < %{sym_cache_max_ver}) +BuildRequires: (php-composer(symfony/polyfill-php80) >= %{sym_poly_min_ver} with php-composer(symfony/polyfill-php80) < %{sym_poly_max_ver}) BuildRequires: (php-composer(psr/cache) >= %{psr_cache_min_ver} with php-composer(psr/cache) < %{psr_cache_max_ver}) -# remirepo:32 +# remirepo:34 %else BuildRequires: php-composer(doctrine/annotations) < %{annotations_max_ver} BuildRequires: php-composer(doctrine/annotations) >= %{annotations_min_ver} @@ -141,6 +146,8 @@ 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(symfony/polyfill-php80) < %{sym_poly_max_ver} +BuildRequires: php-composer(symfony/polyfill-php80) >= %{sym_poly_min_ver} BuildRequires: php-composer(psr/cache) < %{psr_cache_max_ver} BuildRequires: php-composer(psr/cache) >= %{psr_cache_min_ver} %endif @@ -165,7 +172,6 @@ BuildRequires: php-composer(fedora/autoloader) Requires: php(language) >= %{php_min_ver} # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -Requires: (php-composer(doctrine/annotations) >= %{annotations_min_ver} with php-composer(doctrine/annotations) < %{annotations_max_ver}) Requires: (php-composer(doctrine/cache) >= %{cache_min_ver} with php-composer(doctrine/cache) < %{cache_max_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}) @@ -177,13 +183,12 @@ Requires: (php-composer(doctrine/event-manager) >= %{event_min_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(symfony/polyfill-php80) >= %{sym_poly_min_ver} with php-composer(symfony/polyfill-php80) < %{sym_poly_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:30 %else -Requires: php-composer(doctrine/annotations) < %{annotations_max_ver} -Requires: php-composer(doctrine/annotations) >= %{annotations_min_ver} Requires: php-composer(doctrine/cache) < %{cache_max_ver} Requires: php-composer(doctrine/cache) >= %{cache_min_ver} Requires: php-composer(doctrine/collections) < %{collections_max_ver} @@ -208,6 +213,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(symfony/polyfill-php80) < %{sym_poly_max_ver} +Requires: php-composer(symfony/polyfill-php80) >= %{sym_poly_min_ver} Requires: php-composer(psr/cache) < %{psr_cache_max_ver} Requires: php-composer(psr/cache) >= %{psr_cache_min_ver} %endif @@ -310,6 +317,7 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php'; '%{phpdir}/Psr/Cache2/autoload.php', '%{phpdir}/Psr/Cache/autoload.php', ], + '%{phpdir}/Symfony/Polyfill/autoload.php', ]); \Fedora\Autoloader\Dependencies::optional([ @@ -349,6 +357,7 @@ cat > bootstrap.php <<'BOOTSTRAP' - 2.10.0-1 +- update to 2.10.0 +- drop dependency on doctrine/annotations +- add dependency on symfony/polyfill-php80 + * Mon Oct 4 2021 Remi Collet - 2.9.6-1 - update to 2.9.6 -- cgit