Compare commits

...
Sign in to create a new pull request.

17 commits

Author SHA1 Message Date
Fedora Release Engineering
a77b19f4ff Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 05:28:42 +00:00
Fedora Release Engineering
f96f9d525f Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-18 09:36:22 +00:00
Fedora Release Engineering
eaec8bd627 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-19 07:21:31 +00:00
Software Management Team
c88ea50d82 Eliminate use of obsolete %patchN syntax (#2283636) 2024-05-30 12:46:49 +02:00
Fedora Release Engineering
2a057a1ca5 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-25 23:07:21 +00:00
Fedora Release Engineering
bd12f7ed1a Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-21 21:19:49 +00:00
Fedora Release Engineering
3cdcc565e1 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-21 05:03:38 +00:00
Remi Collet
e1fca3fa79 use SPDX license ID 2023-04-21 11:33:49 +02:00
Fedora Release Engineering
cd4e3ba90f Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-20 09:15:54 +00:00
Fedora Release Engineering
be2be1af33 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-22 14:18:29 +00:00
Fedora Release Engineering
913b0bd6ad - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-21 08:24:40 +00:00
Fedora Release Engineering
95bf52e8f0 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 03:05:23 +00:00
Fedora Release Engineering
21129fd029 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-27 07:40:17 +00:00
Remi Collet
19d9d50b12 fix arch detection 2020-10-26 15:44:11 +01:00
Remi Collet
afab8e8a0b skip 1 test on 32-bit 2020-10-26 15:37:56 +01:00
Remi Collet
21771eb9fd v5.0.3 2020-10-26 15:20:08 +01:00
Remi Collet
1fca7ba1e6 update to 5.0.2 (no change) 2020-09-28 09:44:34 +02:00
4 changed files with 165 additions and 18 deletions

2
.gitignore vendored
View file

@ -1 +1,3 @@
/php-phpunit-php-timer5-5.0.1-cc49734.tgz
/php-phpunit-php-timer5-5.0.2-c9ff14f.tgz
/php-phpunit-php-timer5-5.0.3-5a63ce2.tgz

97
36.patch Normal file
View file

@ -0,0 +1,97 @@
From b6cd6cc52ef13dc996d3e19d3d78bd1bf1eb6bce Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Tue, 27 Oct 2020 11:38:32 +0100
Subject: [PATCH] Fix #34 test failing on 32-bit
---
tests/DurationTest.php | 70 +++++++++++++++++++++---------------------
1 file changed, 35 insertions(+), 35 deletions(-)
diff --git a/tests/DurationTest.php b/tests/DurationTest.php
index d8ba2a0..2129757 100644
--- a/tests/DurationTest.php
+++ b/tests/DurationTest.php
@@ -43,7 +43,7 @@ public function testCanBeCreatedFromMicroseconds(): void
* @dataProvider durationProvider
* @testdox Formats $microseconds microseconds as "$string"
*/
- public function testCanBeFormattedAsString(string $string, int $microseconds): void
+ public function testCanBeFormattedAsString(string $string, float $microseconds): void
{
$duration = Duration::fromMicroseconds($microseconds);
@@ -53,40 +53,40 @@ public function testCanBeFormattedAsString(string $string, int $microseconds): v
public function durationProvider(): array
{
return [
- ['00:00', (int) round((0 * 1000000))],
- ['00:00.001', (int) round((.001 * 1000000))],
- ['00:00.010', (int) round((.01 * 1000000))],
- ['00:00.100', (int) round((.1 * 1000000))],
- ['00:00.999', (int) round((.999 * 1000000))],
- ['00:00.999', (int) round((.9999 * 1000000))],
- ['00:01', (int) round((1 * 1000000))],
- ['00:02', (int) round((2 * 1000000))],
- ['00:59.900', (int) round((59.9 * 1000000))],
- ['00:59.990', (int) round((59.99 * 1000000))],
- ['00:59.999', (int) round((59.999 * 1000000))],
- ['00:59.999', (int) round((59.9999 * 1000000))],
- ['00:59.001', (int) round((59.001 * 1000000))],
- ['00:59.010', (int) round((59.01 * 1000000))],
- ['01:00', (int) round((60 * 1000000))],
- ['01:01', (int) round((61 * 1000000))],
- ['02:00', (int) round((120 * 1000000))],
- ['02:01', (int) round((121 * 1000000))],
- ['59:59.900', (int) round((3599.9 * 1000000))],
- ['59:59.990', (int) round((3599.99 * 1000000))],
- ['59:59.999', (int) round((3599.999 * 1000000))],
- ['59:59.999', (int) round((3599.9999 * 1000000))],
- ['59:59.001', (int) round((3599.001 * 1000000))],
- ['59:59.010', (int) round((3599.01 * 1000000))],
- ['01:00:00', (int) round((3600 * 1000000))],
- ['01:00:01', (int) round((3601 * 1000000))],
- ['01:00:01.900', (int) round((3601.9 * 1000000))],
- ['01:00:01.990', (int) round((3601.99 * 1000000))],
- ['01:00:01.999', (int) round((3601.999 * 1000000))],
- ['01:00:01.999', (int) round((3601.9999 * 1000000))],
- ['01:00:59.999', (int) round((3659.9999 * 1000000))],
- ['01:00:59.001', (int) round((3659.001 * 1000000))],
- ['01:00:59.010', (int) round((3659.01 * 1000000))],
- ['01:59:59.999', (int) round((7199.9999 * 1000000))],
+ ['00:00', round((0 * 1000000))],
+ ['00:00.001', round((.001 * 1000000))],
+ ['00:00.010', round((.01 * 1000000))],
+ ['00:00.100', round((.1 * 1000000))],
+ ['00:00.999', round((.999 * 1000000))],
+ ['00:00.999', round((.9999 * 1000000))],
+ ['00:01', round((1 * 1000000))],
+ ['00:02', round((2 * 1000000))],
+ ['00:59.900', round((59.9 * 1000000))],
+ ['00:59.990', round((59.99 * 1000000))],
+ ['00:59.999', round((59.999 * 1000000))],
+ ['00:59.999', round((59.9999 * 1000000))],
+ ['00:59.001', round((59.001 * 1000000))],
+ ['00:59.010', round((59.01 * 1000000))],
+ ['01:00', round((60 * 1000000))],
+ ['01:01', round((61 * 1000000))],
+ ['02:00', round((120 * 1000000))],
+ ['02:01', round((121 * 1000000))],
+ ['59:59.900', round((3599.9 * 1000000))],
+ ['59:59.990', round((3599.99 * 1000000))],
+ ['59:59.999', round((3599.999 * 1000000))],
+ ['59:59.999', round((3599.9999 * 1000000))],
+ ['59:59.001', round((3599.001 * 1000000))],
+ ['59:59.010', round((3599.01 * 1000000))],
+ ['01:00:00', round((3600 * 1000000))],
+ ['01:00:01', round((3601 * 1000000))],
+ ['01:00:01.900', round((3601.9 * 1000000))],
+ ['01:00:01.990', round((3601.99 * 1000000))],
+ ['01:00:01.999', round((3601.999 * 1000000))],
+ ['01:00:01.999', round((3601.9999 * 1000000))],
+ ['01:00:59.999', round((3659.9999 * 1000000))],
+ ['01:00:59.001', round((3659.001 * 1000000))],
+ ['01:00:59.010', round((3659.01 * 1000000))],
+ ['01:59:59.999', round((7199.9999 * 1000000))],
];
}
}

View file

@ -1,14 +1,15 @@
# remirepo/fedora spec file for php-phpunit-php-timer4
#
# Copyright (c) 2010-2020 Christof Damian, Remi Collet
# Copyright (c) 2010-2023 Christof Damian, Remi Collet
#
# License: MIT
# http://opensource.org/licenses/MIT
#
# Please, preserve the changelog entries
#
%global bootstrap 1
%global gh_commit cc49734779cbb302bf51a44297dab8c4bbf941e7
%bcond_without tests
%global gh_commit 5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner sebastianbergmann
%global gh_project php-timer
@ -21,33 +22,30 @@
%global major 5
%global php_home %{_datadir}/php
%if %{bootstrap}
%bcond_with tests
%else
%bcond_without tests
%endif
Name: php-%{pk_vendor}-%{pk_project}%{major}
Version: 5.0.1
Release: 2%{?dist}
Summary: PHP Utility class for timing
Version: 5.0.3
Release: 13%{?dist}
Summary: PHP Utility class for timing, version %{major}
License: BSD
License: BSD-3-Clause
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: %{name}-%{version}-%{gh_short}.tgz
Source1: makesrc.sh
Patch0: https://patch-diff.githubusercontent.com/raw/sebastianbergmann/php-timer/pull/36.patch
BuildArch: noarch
BuildRequires: php(language) >= 7.3
BuildRequires: php-fedora-autoloader-devel
%if %{with tests}
# From composer.json"require-dev": {
# "phpunit/phpunit": "^9.2"
BuildRequires: phpunit9 >= 9.2
# "phpunit/phpunit": "^9.3"
BuildRequires: phpunit9 >= 9.3
%endif
# From composer.json
# "php": "^7.3 || ^8.0"
# "php": ">=7.3"
Requires: php(language) >= 7.3
# From phpcompatinfo report for version 4.0.0
Requires: php-spl
@ -61,9 +59,14 @@ Provides: php-composer(%{pk_vendor}/%{pk_project}) = %{version}
Utility class for timing things, factored out of PHPUnit into a stand-alone
component.
This package provides version %{major} of %{pk_vendor}/%{pk_project} library.
Autoloader: %{php_home}/%{ns_vendor}/%{ns_project}/autoload.php
%prep
%setup -q -n %{gh_project}-%{gh_commit}
%patch -P0 -p1
%build
@ -85,10 +88,11 @@ touch vendor/autoload.php
: Run upstream test suite
ret=0
for cmd in php php73 php74 php80; do
for cmd in php php80 php81 php82; do
if which $cmd; then
$cmd -d auto_prepend_file=%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php \
%{_bindir}/phpunit9 --verbose || ret=1
%{_bindir}/phpunit9 \
--verbose || ret=1
fi
done
exit $ret
@ -104,6 +108,50 @@ exit $ret
%changelog
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.3-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.3-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.3-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.3-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.3-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.3-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri Apr 21 2023 Remi Collet <remi@remirepo.net> - 5.0.3-7
- use SPDX License id
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Oct 26 2020 Remi Collet <remi@remirepo.net> - 5.0.3-1
- update to 5.0.3
- open https://github.com/sebastianbergmann/php-timer/issues/34
32-bit compatibility
* Mon Sep 28 2020 Remi Collet <remi@remirepo.net> - 5.0.2-1
- update to 5.0.2 (no change)
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

View file

@ -1 +1 @@
SHA512 (php-phpunit-php-timer5-5.0.1-cc49734.tgz) = 5ac0f3a4bbd1fda51018a3f01c84e955e2b41a398ea6f21a89efa236119289d97492357bf6b2789c6e8db6fbf29b31c93e452e778ddd4f796980d2405f230c4f
SHA512 (php-phpunit-php-timer5-5.0.3-5a63ce2.tgz) = 798a4d78bde219747996ae56d83092fe0d070790ed7c1395c04b51e5dfb836e0021ad789341297e5abe7b3a15f428ca270bff6611c18e938cdf1cf7b86adcb84