summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json1
-rw-r--r--php-doctrine-orm-version.patch41
-rw-r--r--php-doctrine-orm.spec18
3 files changed, 57 insertions, 3 deletions
diff --git a/composer.json b/composer.json
index c74e9cf..ed05a26 100644
--- a/composer.json
+++ b/composer.json
@@ -26,6 +26,7 @@
"doctrine/event-manager": "^1.1",
"doctrine/instantiator": "^1.3",
"doctrine/persistence": "^1.2",
+ "ocramius/package-versions": "^1.2",
"symfony/console": "^3.0|^4.0|^5.0"
},
"require-dev": {
diff --git a/php-doctrine-orm-version.patch b/php-doctrine-orm-version.patch
new file mode 100644
index 0000000..3329460
--- /dev/null
+++ b/php-doctrine-orm-version.patch
@@ -0,0 +1,41 @@
+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 2020-02-17 10:57:11.784461836 +0100
++++ ./lib/Doctrine/ORM/Tools/Console/ConsoleRunner.php 2020-02-17 10:58:14.085234990 +0100
+@@ -23,7 +23,6 @@ use Doctrine\DBAL\Tools\Console as DBALC
+ use Doctrine\ORM\EntityManagerInterface;
+ use Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper;
+ use OutOfBoundsException;
+-use PackageVersions\Versions;
+ use Symfony\Component\Console\Application;
+ use Symfony\Component\Console\Helper\HelperSet;
+
+@@ -75,7 +74,7 @@ final class ConsoleRunner
+ */
+ public static function createApplication(HelperSet $helperSet, 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 2020-02-17 11:04:44.126876478 +0100
++++ ./tests/Doctrine/Tests/ORM/Tools/Console/ConsoleRunnerTest.php 2020-02-17 11:04:47.738864467 +0100
+@@ -4,7 +4,6 @@ namespace Doctrine\Tests\ORM\Tools\Conso
+
+ use Doctrine\ORM\Tools\Console\ConsoleRunner;
+ use Doctrine\Tests\DoctrineTestCase;
+-use PackageVersions\Versions;
+ use Symfony\Component\Console\Command\Command;
+ use Symfony\Component\Console\Helper\HelperSet;
+
+@@ -21,7 +20,7 @@ final class ConsoleRunnerTest extends Do
+ $app = ConsoleRunner::createApplication($helperSet);
+
+ self::assertSame($helperSet, $app->getHelperSet());
+- 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'));
+
diff --git a/php-doctrine-orm.spec b/php-doctrine-orm.spec
index d104c2e..2ca75e6 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.0
-%global github_commit 4d763ca4c925f647b248b9fa01b5f47aa3685d62
+%global github_version 2.7.1
+%global github_commit 445796af0e873d9bd04f2502d322a7d5009b6846
%global composer_vendor doctrine
%global composer_project orm
@@ -71,6 +71,8 @@ Source1: %{name}-get-source.sh
# 1) Add she-bang
# 2) Auto-load using Doctrine\Common\ClassLoader
Patch0: %{name}-bin.patch
+# get rid of ocramius/package-versions
+Patch1: %{name}-version.patch
BuildArch: noarch
# Tests
@@ -213,7 +215,14 @@ Autoloader: %{phpdir}/Doctrine/ORM/autoload.php
: Patch bin script
%patch0 -p1 -b .rpm
-sed -i 's#__PHPDIR__#%{phpdir}#g' bin/doctrine.php
+sed -e 's#__PHPDIR__#%{phpdir}#g' -i \
+ bin/doctrine.php
+
+%patch1 -p1 -b .rpm
+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
: Remove empty file
rm -f lib/Doctrine/ORM/README.markdown
@@ -310,6 +319,9 @@ exit $RETURN_CODE
%changelog
+* Mon Feb 17 2020 Remi Collet <remi@remirepo.net> - 2.7.1-1
+- update to 2.7.1
+
* Tue Nov 19 2019 Remi Collet <remi@remirepo.net> - 2.7.0-1
- update to 2.7.0
- add dependency on doctrine/event-manager