diff options
-rw-r--r-- | composer.json | 11 | ||||
-rw-r--r-- | php-doctrine-orm-bin.patch | 30 | ||||
-rw-r--r-- | php-doctrine-orm-version.patch | 14 | ||||
-rw-r--r-- | 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 <?php - /* - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -@@ -20,17 +21,7 @@ + use Symfony\Component\Console\Helper\HelperSet; use Doctrine\ORM\Tools\Console\ConsoleRunner; @@ -25,10 +23,10 @@ diff -up ./bin/doctrine.php.rpm ./bin/doctrine.php $directories = [getcwd(), getcwd() . DIRECTORY_SEPARATOR . 'config']; -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 -@@ -62,7 +62,11 @@ class Setup +diff -up ./lib/Doctrine/ORM/Tools/Setup.php.rpm1 ./lib/Doctrine/ORM/Tools/Setup.php +--- ./lib/Doctrine/ORM/Tools/Setup.php.rpm1 2021-10-04 09:50:51.000000000 +0200 ++++ ./lib/Doctrine/ORM/Tools/Setup.php 2021-10-04 09:59:00.880718552 +0200 +@@ -45,7 +45,11 @@ class Setup public static function registerAutoloadDirectory($directory) { if (! class_exists('Doctrine\Common\ClassLoader', false)) { @@ -41,15 +39,15 @@ diff -up ./lib/Doctrine/ORM/Tools/Setup.php.rpm ./lib/Doctrine/ORM/Tools/Setup.p } $loader = new ClassLoader('Doctrine', $directory); -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 -@@ -57,7 +57,7 @@ class SetupTest extends OrmTestCase +diff -up ./tests/Doctrine/Tests/ORM/Tools/SetupTest.php.rpm1 ./tests/Doctrine/Tests/ORM/Tools/SetupTest.php +--- ./tests/Doctrine/Tests/ORM/Tools/SetupTest.php.rpm1 2021-10-04 09:59:00.880718552 +0200 ++++ ./tests/Doctrine/Tests/ORM/Tools/SetupTest.php 2021-10-04 09:59:52.206542282 +0200 +@@ -52,7 +52,7 @@ class SetupTest extends OrmTestCase public function testDirectoryAutoload(): void { - Setup::registerAutoloadDirectory(__DIR__ . '/../../../../../vendor/doctrine/common/lib'); + Setup::registerAutoloadDirectory("/usr/share/php"); - $this->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' <?php require_once '%{buildroot}%{phpdir}/Doctrine/ORM/autoload.php'; \Fedora\Autoloader\Dependencies::required([ + '%{phpdir}/Doctrine/Common/Annotations/autoload.php', [ '%{phpdir}/Symfony5/Component/Cache/autoload.php', '%{phpdir}/Symfony4/Component/Cache/autoload.php', @@ -361,12 +370,12 @@ BOOTSTRAP : Upstream tests RETURN_CODE=0 -for CMDARG in "php %{phpunit}" php73 php74 php80; do +for CMDARG in "php %{phpunit}" php73 php74 php80 php81; do if which $CMDARG; then set $CMDARG $1 ${2:-%{_bindir}/phpunit9} \ --verbose -d memory_limit="512M" \ - --filter '^((?!(testConfigureCache)).)*$' \ + --filter '^((?!(testConfigureCache|testDecimal)).)*$' \ --bootstrap bootstrap.php \ || RETURN_CODE=1 fi @@ -388,6 +397,11 @@ exit $RETURN_CODE %changelog +* Mon Oct 4 2021 Remi Collet <remi@remirepo.net> - 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 <remi@remirepo.net> - 2.9.6-1 - update to 2.9.6 |