diff -Nru php-timer-2.1.1/ChangeLog.md php-timer-2.1.2/ChangeLog.md --- php-timer-2.1.1/ChangeLog.md 2019-02-20 10:12:59.000000000 +0000 +++ php-timer-2.1.2/ChangeLog.md 2019-06-07 04:22:29.000000000 +0000 @@ -2,6 +2,12 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. +## [2.1.2] - 2019-06-07 + +### Fixed + +* Fixed [#21](https://github.com/sebastianbergmann/php-timer/pull/3352): Formatting of memory consumption does not work on 32bit systems + ## [2.1.1] - 2019-02-20 ### Changed @@ -24,6 +30,7 @@ * This component is no longer supported on PHP 5.3, PHP 5.4, PHP 5.5, PHP 5.6, and PHP 7.0 +[2.1.2]: https://github.com/sebastianbergmann/diff/compare/2.1.1...2.1.2 [2.1.1]: https://github.com/sebastianbergmann/diff/compare/2.1.0...2.1.1 [2.1.0]: https://github.com/sebastianbergmann/diff/compare/2.0.0...2.1.0 [2.0.0]: https://github.com/sebastianbergmann/diff/compare/1.0.9...2.0.0 diff -Nru php-timer-2.1.1/debian/changelog php-timer-2.1.2/debian/changelog --- php-timer-2.1.1/debian/changelog 2019-02-25 22:52:31.000000000 +0000 +++ php-timer-2.1.2/debian/changelog 2019-08-18 18:24:16.000000000 +0000 @@ -1,3 +1,19 @@ +php-timer (2.1.2-2) unstable; urgency=medium + + * Upload to unstable now thet buster has been released + * Update standards version, no changes needed. + * Set upstream metadata fields: Contact, Name. + * Add self to Uploaders + * Extend d/clean for PHPUnit 8 + + -- David Prévot Sun, 18 Aug 2019 08:24:16 -1000 + +php-timer (2.1.2-1) experimental; urgency=medium + + * Team upload to experimental during the freeze + + -- David Prévot Mon, 17 Jun 2019 09:33:00 -1000 + php-timer (2.1.1-1) unstable; urgency=medium * Team upload diff -Nru php-timer-2.1.1/debian/clean php-timer-2.1.2/debian/clean --- php-timer-2.1.1/debian/clean 2019-02-25 22:52:31.000000000 +0000 +++ php-timer-2.1.2/debian/clean 2019-08-18 18:20:41.000000000 +0000 @@ -1,2 +1,3 @@ +.phpunit.result.cache SebastianBergmann/ src/autoload.php diff -Nru php-timer-2.1.1/debian/control php-timer-2.1.2/debian/control --- php-timer-2.1.1/debian/control 2019-02-25 22:52:24.000000000 +0000 +++ php-timer-2.1.2/debian/control 2019-08-18 18:20:00.000000000 +0000 @@ -2,9 +2,14 @@ Section: php Priority: optional Maintainer: Debian PHP PEAR Maintainers -Uploaders: Prach Pongpanich -Build-Depends: ant, debhelper-compat (= 12), phpab, phpunit, pkg-php-tools (>= 1.7~) -Standards-Version: 4.3.0 +Uploaders: Prach Pongpanich , + David Prévot +Build-Depends: ant, + debhelper-compat (= 12), + phpab, + phpunit, + pkg-php-tools (>= 1.7~) +Standards-Version: 4.4.0 Homepage: https://github.com/sebastianbergmann/php-timer Vcs-Git: https://salsa.debian.org/php-team/pear/php-timer.git Vcs-Browser: https://salsa.debian.org/php-team/pear/php-timer diff -Nru php-timer-2.1.1/debian/tests/control php-timer-2.1.2/debian/tests/control --- php-timer-2.1.1/debian/tests/control 2019-02-25 22:46:09.000000000 +0000 +++ php-timer-2.1.2/debian/tests/control 2019-08-18 18:20:00.000000000 +0000 @@ -1,2 +1,2 @@ Test-Command: phpunit --bootstrap /usr/share/php/SebastianBergmann/Timer/autoload.php -Depends: @, phpunit +Depends: phpunit, @ diff -Nru php-timer-2.1.1/debian/upstream/metadata php-timer-2.1.2/debian/upstream/metadata --- php-timer-2.1.1/debian/upstream/metadata 1970-01-01 00:00:00.000000000 +0000 +++ php-timer-2.1.2/debian/upstream/metadata 2019-08-18 18:19:37.000000000 +0000 @@ -0,0 +1,2 @@ +Name: PHP_Timer +Contact: Sebastian Bergmann diff -Nru php-timer-2.1.1/.github/FUNDING.yml php-timer-2.1.2/.github/FUNDING.yml --- php-timer-2.1.1/.github/FUNDING.yml 1970-01-01 00:00:00.000000000 +0000 +++ php-timer-2.1.2/.github/FUNDING.yml 2019-06-07 04:22:29.000000000 +0000 @@ -0,0 +1 @@ +patreon: s_bergmann diff -Nru php-timer-2.1.1/src/Timer.php php-timer-2.1.2/src/Timer.php --- php-timer-2.1.1/src/Timer.php 2019-02-20 10:12:59.000000000 +0000 +++ php-timer-2.1.2/src/Timer.php 2019-06-07 04:22:29.000000000 +0000 @@ -44,17 +44,15 @@ return \microtime(true) - \array_pop(self::$startTimes); } - public static function bytesToString(int $bytes): string + public static function bytesToString(float $bytes): string { foreach (self::$sizes as $unit => $value) { if ($bytes >= $value) { - $size = \sprintf('%.2f', $bytes >= 1024 ? $bytes / $value : $bytes); - - return $size . ' ' . $unit; + return \sprintf('%.2f %s', $bytes >= 1024 ? $bytes / $value : $bytes, $unit); } } - return $bytes . ' byte' . ($bytes !== 1 ? 's' : ''); + return $bytes . ' byte' . ((int) $bytes !== 1 ? 's' : ''); } public static function secondsToTimeString(float $time): string diff -Nru php-timer-2.1.1/tests/TimerTest.php php-timer-2.1.2/tests/TimerTest.php --- php-timer-2.1.1/tests/TimerTest.php 2019-02-20 10:12:59.000000000 +0000 +++ php-timer-2.1.2/tests/TimerTest.php 2019-06-07 04:22:29.000000000 +0000 @@ -112,7 +112,7 @@ /** * @dataProvider bytesProvider */ - public function testCanFormatBytesAsString(string $string, int $bytes): void + public function testCanFormatBytesAsString(string $string, float $bytes): void { $this->assertEquals($string, Timer::bytesToString($bytes)); } diff -Nru php-timer-2.1.1/.travis.yml php-timer-2.1.2/.travis.yml --- php-timer-2.1.1/.travis.yml 2019-02-20 10:12:59.000000000 +0000 +++ php-timer-2.1.2/.travis.yml 2019-06-07 04:22:29.000000000 +0000 @@ -6,8 +6,6 @@ - 7.3 - 7.4snapshot -sudo: false - before_install: - composer self-update - composer clear-cache