summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-02-02 09:34:32 +0100
committerRemi Collet <remi@remirepo.net>2018-02-02 09:34:32 +0100
commit1509136d5ad67adf5595a6af6dcb3737a8a6f01c (patch)
treeb372eb4dc52773b7c5139a65f9849953ed10f793
parent8c64db05c476b240f7eed616608f6e57ab50dcf0 (diff)
Update to 6.0.0
rename to php-phpunit-mock-objects6 move to /usr/share/php/PHPUnit7/Framework/MockObject6 raise dependency on PHP 7.1 use range dependencies on F27+ use phpunit7 boostrap build
-rw-r--r--Makefile4
-rw-r--r--composer.json9
-rw-r--r--php-phpunit-mock-objects6-rpm.patch2
-rw-r--r--php-phpunit-mock-objects6.spec67
4 files changed, 46 insertions, 36 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..13af741
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,4 @@
+SRCDIR := $(shell pwd)
+NAME := $(shell basename $(SRCDIR))
+include ../../../common/Makefile
+
diff --git a/composer.json b/composer.json
index 3171806..b1abaea 100644
--- a/composer.json
+++ b/composer.json
@@ -20,16 +20,13 @@
},
"prefer-stable": true,
"require": {
- "php": "^7.0",
+ "php": "^7.1",
"phpunit/php-text-template": "^1.2.1",
"doctrine/instantiator": "^1.0.5",
"sebastian/exporter": "^3.1"
},
"require-dev": {
- "phpunit/phpunit": "^6.5"
- },
- "conflict": {
- "phpunit/phpunit": "<6.0"
+ "phpunit/phpunit": "^7.0"
},
"config": {
"optimize-autoloader": true,
@@ -50,7 +47,7 @@
},
"extra": {
"branch-alias": {
- "dev-master": "5.0.x-dev"
+ "dev-master": "6.0.x-dev"
}
}
}
diff --git a/php-phpunit-mock-objects6-rpm.patch b/php-phpunit-mock-objects6-rpm.patch
index 2b3b5ba..b8903f5 100644
--- a/php-phpunit-mock-objects6-rpm.patch
+++ b/php-phpunit-mock-objects6-rpm.patch
@@ -6,7 +6,7 @@ diff -up ./src/Generator.php.rpm ./src/Generator.php
use Traversable;
+# temporary workaround
-+require_once 'Text/Template.php';
++require_once '/usr/share/php/Text/Template.php';
+
/**
* Mock Object Code Generator
diff --git a/php-phpunit-mock-objects6.spec b/php-phpunit-mock-objects6.spec
index cbc28ed..b9ea0c2 100644
--- a/php-phpunit-mock-objects6.spec
+++ b/php-phpunit-mock-objects6.spec
@@ -1,6 +1,6 @@
-# remirepo/fedora spec file for php-phpunit-mock-objects5
+# remirepo/fedora spec file for php-phpunit-mock-objects6
#
-# Copyright (c) 2013-2017 Remi Collet
+# Copyright (c) 2013-2018 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -8,7 +8,7 @@
#
%global bootstrap 1
# Github
-%global gh_commit 33fd41a76e746b8fa96d00b49a23dadfa8334cdf
+%global gh_commit e495e5d3660321b62c294d8c0e954d02d6ce2573
#global gh_date 20150902
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_vendor sebastianbergmann
@@ -17,13 +17,13 @@
%global pk_vendor phpunit
%global pk_project phpunit-mock-objects
# Namespace
-%global ns_vendor PHPUnit6
+%global ns_vendor PHPUnit7
%global ns_top Framework
%global ns_project MockObject
%global php_home %{_datadir}/php
-%global ver_major 5
+%global ver_major 6
%global ver_minor 0
-%global ver_patch 6
+%global ver_patch 0
%global specrel 0
%if %{bootstrap}
%global with_tests 0%{?_with_tests:1}
@@ -43,36 +43,40 @@ Source0: https://github.com/%{gh_vendor}/%{gh_project}/archive/%{gh_commi
# Temporary workaround, under investigation
Patch0: %{name}-rpm.patch
-# Upstream
-Patch1: https://github.com/sebastianbergmann/phpunit-mock-objects/commit/e244c19aec6a1f0a2ff9e498b9b4bed22537730a.patch
BuildArch: noarch
BuildRequires: php-fedora-autoloader-devel
%if %{with_tests}
-BuildRequires: php(language) >= 7.0
-BuildRequires: php-composer(phpunit/php-text-template) < 2
-BuildRequires: php-composer(phpunit/php-text-template) >= 1.2.1
-BuildRequires: php-composer(doctrine/instantiator) < 2
-BuildRequires: php-composer(doctrine/instantiator) >= 1.0.5
-BuildRequires: php-composer(sebastian/exporter) < 4
-BuildRequires: php-composer(sebastian/exporter) >= 3.1
+BuildRequires: php(language) >= 7.1
+%if 0%{?fedora} >= 27
+BuildRequires: (php-composer(phpunit/php-text-template) >= 1.2.1 with php-composer(phpunit/php-text-template) < 2)
+BuildRequires: (php-composer(doctrine/instantiator) >= 1.0.5 with php-composer(doctrine/instantiator) < 2)
+BuildRequires: (php-composer(sebastian/exporter) >= 3.1 with php-composer(sebastian/exporter) < 4)
+%else
+BuildRequires: php-phpunit-Text-Template >= 1.2.1
+BuildRequires: php-doctrine-instantiator >= 1.0.5
+BuildRequires: php-sebastian-exporter3 >= 3.1
+%endif
# From composer.json, "require-dev": {
-# "phpunit/phpunit": "^6.5"
-BuildRequires: phpunit6 >= 6.5
+# "phpunit/phpunit": "^7.0"
+BuildRequires: phpunit7
%endif
# From composer.json, "require": {
-# "php": "^7.0",
+# "php": "^7.1",
# "phpunit/php-text-template": "^1.2.1",
# "doctrine/instantiator": "^1.0.5",
# "sebastian/exporter": "^3.1"
-Requires: php(language) >= 7.0
-Requires: php-composer(phpunit/php-text-template) >= 1.2.1
-Requires: php-composer(phpunit/php-text-template) < 2
-Requires: php-composer(doctrine/instantiator) >= 1.0.5
-Requires: php-composer(doctrine/instantiator) < 2
-Requires: php-composer(sebastian/exporter) >= 3.1
-Requires: php-composer(sebastian/exporter) < 4
+Requires: php(language) >= 7.1
+%if 0%{?fedora} >= 27
+Requires: (php-composer(phpunit/php-text-template) >= 1.2.1 with php-composer(phpunit/php-text-template) < 2)
+Requires: (php-composer(doctrine/instantiator) >= 1.0.5 with php-composer(doctrine/instantiator) < 2)
+Requires: (php-composer(sebastian/exporter) >= 3.1 with php-composer(sebastian/exporter) < 4)
+%else
+Requires: php-phpunit-Text-Template >= 1.2.1
+Requires: php-doctrine-instantiator >= 1.0.5
+Requires: php-sebastian-exporter3 >= 3.1
+%endif
# From composer.json, "suggest": {
# "ext-soap": "*"
Requires: php-soap
@@ -83,9 +87,6 @@ Requires: php-spl
# Autoloader
Requires: php-composer(fedora/autoloader)
-# No more used
-Obsoletes: php-phpunit-mock-objects4 < 5
-
Provides: php-composer(%{pk_vendor}/%{pk_project}) = %{version}
@@ -99,7 +100,6 @@ Autoloader: %{php_home}/%{ns_vendor}/%{ns_top}/%{ns_project}%{ver_major}/autoloa
%setup -q -n %{gh_project}-%{gh_commit}
%patch0 -p0
-%patch1 -p1
find . -name \*.orig -exec rm {} \; -print
@@ -159,6 +159,15 @@ exit $ret
%changelog
+* Fri Feb 2 2018 Remi Collet <remi@remirepo.net> - 6.0.0-0
+- Update to 6.0.0
+- rename to php-phpunit-mock-objects6
+- move to /usr/share/php/PHPUnit7/Framework/MockObject6
+- raise dependency on PHP 7.1
+- use range dependencies on F27+
+- use phpunit7
+- boostrap build
+
* Sun Jan 7 2018 Remi Collet <remi@remirepo.net> - 5.0.6-1
- Update to 5.0.6
- add upstream patch for test failure with PHP 7.0, see