diff options
author | Remi Collet <remi@remirepo.net> | 2019-03-28 14:39:04 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2019-03-28 14:39:04 +0100 |
commit | beeb177c2a327815be90829d95de56950bf5aa47 (patch) | |
tree | 7f849fa0554c9d1dd17cc87335d4f466482f8038 | |
parent | 7d999305ce794d67557192574a53d286627bc357 (diff) |
add patch for 32-bit from https://github.com/doctrine/migrations/pull/803
-rw-r--r-- | php-doctrine-migrations-tests.patch | 39 | ||||
-rw-r--r-- | php-doctrine-migrations.spec | 6 |
2 files changed, 23 insertions, 22 deletions
diff --git a/php-doctrine-migrations-tests.patch b/php-doctrine-migrations-tests.patch index ffee870..6b412ef 100644 --- a/php-doctrine-migrations-tests.patch +++ b/php-doctrine-migrations-tests.patch @@ -1,25 +1,22 @@ -From 7c92da024352261c0c5a9cfef59b9785eb5bd2d2 Mon Sep 17 00:00:00 2001 +From f641baab3de3b03e6c86448b5d9b5ad916f20fff Mon Sep 17 00:00:00 2001 From: Remi Collet <remi@remirepo.net> -Date: Wed, 27 Mar 2019 12:53:04 +0100 -Subject: [PATCH] don't run with 64-bit data on 32-bit build +Date: Wed, 27 Mar 2019 13:46:06 +0100 +Subject: [PATCH] allow "float" in formatBytes to work on 32-bit computers --- - .../Doctrine/Migrations/Tests/Tools/BytesFormatterTest.php | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) + lib/Doctrine/Migrations/Tools/BytesFormatter.php | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/tests/Doctrine/Migrations/Tests/Tools/BytesFormatterTest.php b/tests/Doctrine/Migrations/Tests/Tools/BytesFormatterTest.php -index 5f5f24e29..f8acd4146 100644 ---- a/tests/Doctrine/Migrations/Tests/Tools/BytesFormatterTest.php -+++ b/tests/Doctrine/Migrations/Tests/Tools/BytesFormatterTest.php -@@ -14,7 +14,9 @@ public function testFormatBytes() : void - self::assertSame('1000', BytesFormatter::formatBytes(1000)); - self::assertSame('97.66K', BytesFormatter::formatBytes(100000)); - self::assertSame('9.54M', BytesFormatter::formatBytes(10000000)); -- self::assertSame('93.13G', BytesFormatter::formatBytes(100000000000)); -- self::assertSame('90.95T', BytesFormatter::formatBytes(100000000000000)); -+ if (PHP_INT_SIZE > 4) { -+ self::assertSame('93.13G', BytesFormatter::formatBytes(100000000000)); -+ self::assertSame('90.95T', BytesFormatter::formatBytes(100000000000000)); -+ } - } - } +diff --git a/lib/Doctrine/Migrations/Tools/BytesFormatter.php b/lib/Doctrine/Migrations/Tools/BytesFormatter.php +index 91caabd05..d828fdc27 100644 +--- a/lib/Doctrine/Migrations/Tools/BytesFormatter.php ++++ b/lib/Doctrine/Migrations/Tools/BytesFormatter.php +@@ -17,7 +17,7 @@ + */ + final class BytesFormatter + { +- public static function formatBytes(int $size, int $precision = 2) : string ++ public static function formatBytes(float $size, int $precision = 2) : string + { + $base = log($size, 1024); + $suffixes = ['', 'K', 'M', 'G', 'T']; diff --git a/php-doctrine-migrations.spec b/php-doctrine-migrations.spec index 380868f..67f8ad2 100644 --- a/php-doctrine-migrations.spec +++ b/php-doctrine-migrations.spec @@ -26,7 +26,7 @@ Name: php-%{pk_vendor}-%{pk_project} Version: 2.0.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: PHP Doctrine Migrations project License: MIT @@ -253,6 +253,10 @@ exit $ret %changelog +* Thu Mar 28 2019 Remi Collet <remi@remirepo.net> - 2.0.0-2 +- add patch for 32-bit from + https://github.com/doctrine/migrations/pull/803 + * Wed Mar 27 2019 Remi Collet <remi@remirepo.net> - 2.0.0-1 - update to 2.0.0 - raise dependency on symfony 3.4 |