summaryrefslogtreecommitdiffstats
path: root/php-doctrine-migrations-tests.patch
diff options
context:
space:
mode:
Diffstat (limited to 'php-doctrine-migrations-tests.patch')
-rw-r--r--php-doctrine-migrations-tests.patch39
1 files changed, 18 insertions, 21 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'];