use SPDX license ID
This commit is contained in:
parent
cd4e3ba90f
commit
e1fca3fa79
2 changed files with 111 additions and 8 deletions
97
36.patch
Normal file
97
36.patch
Normal 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))],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# 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
|
||||
|
|
@ -25,14 +25,16 @@
|
|||
|
||||
Name: php-%{pk_vendor}-%{pk_project}%{major}
|
||||
Version: 5.0.3
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?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
|
||||
|
|
@ -57,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}
|
||||
%patch0 -p1
|
||||
|
||||
|
||||
%build
|
||||
|
|
@ -81,14 +88,10 @@ touch vendor/autoload.php
|
|||
|
||||
: Run upstream test suite
|
||||
ret=0
|
||||
if [ $(php -r 'echo PHP_INT_SIZE;') -lt 8 ]; then
|
||||
filter="--filter '^((?!(testCanBeFormattedAsString)).)*$'"
|
||||
fi
|
||||
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 \
|
||||
$filter \
|
||||
--verbose || ret=1
|
||||
fi
|
||||
done
|
||||
|
|
@ -105,6 +108,9 @@ exit $ret
|
|||
|
||||
|
||||
%changelog
|
||||
* 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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue