summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-06-19 13:35:38 +0200
committerRemi Collet <remi@remirepo.net>2019-06-19 13:35:38 +0200
commite6841d2e76bc421da053ba8ac23eb942e1b433bf (patch)
tree9f4d07749ae6936c3756f035d980dd0e1bf6800e
parentbd36240dc2ce28744f27bf078a122001a1e260a9 (diff)
v1.8.0 from Fedora
-rw-r--r--composer.json2
-rw-r--r--php-Faker-github-pull-request-1348.patch45
-rw-r--r--php-Faker-github-pull-request-1365.patch23
-rw-r--r--php-Faker.spec38
4 files changed, 19 insertions, 89 deletions
diff --git a/composer.json b/composer.json
index d3bfd6c..e52016e 100644
--- a/composer.json
+++ b/composer.json
@@ -13,7 +13,7 @@
"php": "^5.3.3 || ^7.0"
},
"require-dev": {
- "phpunit/phpunit": "^4.0 || ^5.0",
+ "phpunit/phpunit": "^4.8.35 || ^5.7",
"squizlabs/php_codesniffer": "^1.5",
"ext-intl": "*"
},
diff --git a/php-Faker-github-pull-request-1348.patch b/php-Faker-github-pull-request-1348.patch
deleted file mode 100644
index 635da1b..0000000
--- a/php-Faker-github-pull-request-1348.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From cd1d5dd8a603eab9e02e331b61aa60e6cf6f8c78 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Fri, 10 Nov 2017 11:48:37 +0100
-Subject: [PATCH] only test available date range on 32-bit
-
----
- test/Faker/Provider/fi_FI/PersonTest.php | 19 +++++++++++++------
- 1 file changed, 13 insertions(+), 6 deletions(-)
-
-diff --git a/test/Faker/Provider/fi_FI/PersonTest.php b/test/Faker/Provider/fi_FI/PersonTest.php
-index 5aefb8584..b979666e9 100644
---- a/test/Faker/Provider/fi_FI/PersonTest.php
-+++ b/test/Faker/Provider/fi_FI/PersonTest.php
-@@ -44,18 +44,25 @@ public function testPersonalIdentityNumberUsesBirthDateIfProvided($seed, $birthd
-
- public function testPersonalIdentityNumberGeneratesCompliantNumbers()
- {
-- for ($i = 0; $i < 10; $i++) {
-- $birthdate = $this->faker->dateTimeBetween('1800-01-01 00:00:00', '1899-12-31 23:59:59');
-- $pin = $this->faker->personalIdentityNumber($birthdate);
-- $this->assertRegExp('/^[0-9]{6}\+[0-9]{3}[0-9ABCDEFHJKLMNPRSTUVWXY]$/', $pin);
-+ if (strtotime('1800-01-01 00:00:00')) {
-+ $min="1900";
-+ $max="2099";
-+ for ($i = 0; $i < 10; $i++) {
-+ $birthdate = $this->faker->dateTimeBetween('1800-01-01 00:00:00', '1899-12-31 23:59:59');
-+ $pin = $this->faker->personalIdentityNumber($birthdate, NULL, true);
-+ $this->assertRegExp('/^[0-9]{6}\+[0-9]{3}[0-9ABCDEFHJKLMNPRSTUVWXY]$/', $pin);
-+ }
-+ } else { // timestamp limit for 32-bit computer
-+ $min="1902";
-+ $max="2037";
- }
- for ($i = 0; $i < 10; $i++) {
-- $birthdate = $this->faker->dateTimeBetween('1900-01-01 00:00:00', '1999-12-31 23:59:59');
-+ $birthdate = $this->faker->dateTimeBetween("$min-01-01 00:00:00", '1999-12-31 23:59:59');
- $pin = $this->faker->personalIdentityNumber($birthdate);
- $this->assertRegExp('/^[0-9]{6}-[0-9]{3}[0-9ABCDEFHJKLMNPRSTUVWXY]$/', $pin);
- }
- for ($i = 0; $i < 10; $i++) {
-- $birthdate = $this->faker->dateTimeBetween('2000-01-01 00:00:00', '2099-12-31 23:59:59');
-+ $birthdate = $this->faker->dateTimeBetween('2000-01-01 00:00:00', "$max-12-31 23:59:59");
- $pin = $this->faker->personalIdentityNumber($birthdate);
- $this->assertRegExp('/^[0-9]{6}A[0-9]{3}[0-9ABCDEFHJKLMNPRSTUVWXY]$/', $pin);
- }
diff --git a/php-Faker-github-pull-request-1365.patch b/php-Faker-github-pull-request-1365.patch
deleted file mode 100644
index cd1f506..0000000
--- a/php-Faker-github-pull-request-1365.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From ce3a0239c47289c8c371a67a8d7acf90ef6be7c4 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Wed, 29 Nov 2017 14:02:19 +0100
-Subject: [PATCH] skip test failing on bigendian
-
----
- test/Faker/Provider/UuidTest.php | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/test/Faker/Provider/UuidTest.php b/test/Faker/Provider/UuidTest.php
-index ebd4ae4c6..5c639cacc 100644
---- a/test/Faker/Provider/UuidTest.php
-+++ b/test/Faker/Provider/UuidTest.php
-@@ -16,6 +16,9 @@ public function testUuidReturnsUuid()
-
- public function testUuidExpectedSeed()
- {
-+ if (pack('L', 0x6162797A) == pack('N', 0x6162797A)) {
-+ $this->markTestSkipped('Big Endian');
-+ }
- $faker = new Generator();
- $faker->seed(123);
- $this->assertEquals("8e2e0c84-50dd-367c-9e66-f3ab455c78d6", BaseProvider::uuid());
diff --git a/php-Faker.spec b/php-Faker.spec
index c98163f..d9b5fc5 100644
--- a/php-Faker.spec
+++ b/php-Faker.spec
@@ -12,13 +12,13 @@
%global github_owner fzaninotto
%global github_name Faker
-%global github_version 1.7.1
-%global github_commit d3ed4cc37051c1ca52d22d76b437d14809fc7e0d
+%global github_version 1.8.0
+%global github_commit f72816b43e74063c8b10357394b6bba8cb1c10de
%global composer_vendor fzaninotto
%global composer_project faker
-# "php": "^5.3.3|^7.0"
+# "php": "^5.3.3 || ^7.0"
%global php_min_ver 5.3.3
# Build using "--without tests" to disable tests
@@ -28,23 +28,16 @@
Name: php-%{github_name}
Version: %{github_version}
-Release: 7%{?dist}
+Release: 1%{?dist}
Summary: A PHP library that generates fake data
License: MIT
URL: https://github.com/%{github_owner}/%{github_name}
Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
-# https://github.com/fzaninotto/Faker/pull/1348
-# https://patch-diff.githubusercontent.com/raw/fzaninotto/Faker/pull/1348.patch
-Patch0: %{name}-github-pull-request-1348.patch
-# https://github.com/fzaninotto/Faker/pull/1365
-# https://patch-diff.githubusercontent.com/raw/fzaninotto/Faker/pull/1365.patch
-Patch1: %{name}-github-pull-request-1365.patch
-
# remirepo:3
# For test build on all available arch
-#global debug_package %{nil}
+#global debug_package %%{nil}
#global __debug_install_post /bin/true
BuildArch: noarch
# Tests
@@ -53,12 +46,14 @@ BuildArch: noarch
BuildRequires: php(language) >= %{php_min_ver}
BuildRequires: php-composer(phpunit/phpunit)
BuildRequires: php-intl
-## phpcompatinfo (computed from version 1.6.0)
+## phpcompatinfo (computed from version 1.8.0)
BuildRequires: php-ctype
BuildRequires: php-curl
BuildRequires: php-date
BuildRequires: php-dom
+BuildRequires: php-filter
BuildRequires: php-hash
+BuildRequires: php-iconv
BuildRequires: php-json
BuildRequires: php-mbstring
BuildRequires: php-pcre
@@ -70,11 +65,12 @@ BuildRequires: php-fedora-autoloader-devel
# composer.json
Requires: php(language) >= %{php_min_ver}
-# phpcompatinfo (computed from version 1.6.0)
+# phpcompatinfo (computed from version 1.8.0)
Requires: php-curl
Requires: php-date
Requires: php-dom
Requires: php-hash
+Requires: php-iconv
Requires: php-json
Requires: php-mbstring
Requires: php-pcre
@@ -84,7 +80,7 @@ Requires: php-spl
Requires: php-composer(fedora/autoloader)
# php-{COMPOSER_VENDOR}-{COMPOSER_PROJECT}
-Provides: php-%{composer_vendor}-%{composer_project} = %{version}-%{release}
+Provides: php-%{composer_vendor}-%{composer_project} = %{version}-%{release}
# Composer
Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version}
@@ -110,8 +106,6 @@ Optional:
%prep
%setup -qn %{github_name}-%{github_commit}
-%patch0 -p1
-%patch1 -p1
%if 0%{?el6}
# For old PHPUnit
@@ -127,10 +121,8 @@ cat <<'AUTOLOAD' | tee src/Faker/autoload.php
* Autoloader for %{name} and its' dependencies
* (created by %{name}-%{version}-%{release}).
*/
-
require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('Faker\\', __DIR__);
-
AUTOLOAD
@@ -149,7 +141,10 @@ mkdir vendor
cat << 'EOF' | tee vendor/autoload.php
<?php
require_once '%{buildroot}%{phpdir}/Faker/autoload.php';
+
\Fedora\Autoloader\Autoload::addPsr4('Faker\\Test\\', dirname(__DIR__).'/test/Faker');
+
+class_alias('PHPUnit_Framework_TestCase', 'PHPUnit\\Framework\\TestCase');
EOF
# Skip flakey test that randomly fails even after patch from
@@ -161,7 +156,7 @@ sed 's/function testFixedSeedWithMaximumTimestamp/function SKIP_testFixedSeedWit
-i test/Faker/Provider/DateTimeTest.php
ret=0
-for cmd in php php70 php71 php72 php73; do
+for cmd in php php70 php71 php72 php73 php74; do
if which $cmd; then
$cmd %{_bindir}/phpunit --verbose || ret=1
fi
@@ -181,6 +176,9 @@ exit $ret
%changelog
+* Sun Jun 16 2019 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.8.0-1
+- Update to 1.8.0 (RHBZ #1481901)
+
* Thu Feb 14 2019 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.7.1-7
- Fix FTBFS by skipping flakey test (RHBZ #1605437 / RHBZ #1675661)
- Reference patches locally