summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-06-17 15:40:26 +0200
committerRemi Collet <remi@remirepo.net>2019-06-17 15:40:26 +0200
commitf217c8e26ae8446908f9b515e9fb65b48bbf403a (patch)
tree2aab84b3303cc3f7515856da0c54c06ddd486375
parentf3f0ea7f0e6f471d0f10e277262ba276f56aea83 (diff)
v1.1.0 from Fedora
-rw-r--r--composer.json6
l---------makesrc.sh1
-rw-r--r--php-mnapoli-phpunit-easymock.spec51
3 files changed, 35 insertions, 23 deletions
diff --git a/composer.json b/composer.json
index dedd68e..0a41051 100644
--- a/composer.json
+++ b/composer.json
@@ -16,10 +16,10 @@
}
},
"require": {
- "php": "~5.4|~7.0",
- "phpunit/phpunit-mock-objects": "~2.0|~3.0"
+ "php": "~7.0",
+ "phpunit/phpunit-mock-objects": "~5.0|~6.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.0|~5.0"
+ "phpunit/phpunit": "~6.4|~7.0"
}
}
diff --git a/makesrc.sh b/makesrc.sh
new file mode 120000
index 0000000..e285f9b
--- /dev/null
+++ b/makesrc.sh
@@ -0,0 +1 @@
+php-mnapoli-phpunit-easymock-get-source.sh \ No newline at end of file
diff --git a/php-mnapoli-phpunit-easymock.spec b/php-mnapoli-phpunit-easymock.spec
index 74c9c7a..0ebe90b 100644
--- a/php-mnapoli-phpunit-easymock.spec
+++ b/php-mnapoli-phpunit-easymock.spec
@@ -2,7 +2,7 @@
#
# Fedora spec file for php-mnapoli-phpunit-easymock
#
-# Copyright (c) 2016-2017 Shawn Iwinski <shawn@iwin.ski>
+# Copyright (c) 2016-2019 Shawn Iwinski <shawn@iwin.ski>
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -12,17 +12,18 @@
%global github_owner mnapoli
%global github_name phpunit-easymock
-%global github_version 0.2.3
-%global github_commit 023279dbe33f6e6eaace7c76d1fef9adf3f7cf4c
+%global github_version 1.1.0
+%global github_commit cd71d4d897bab9cba02afd01af7701caf54e8b03
%global composer_vendor mnapoli
%global composer_project phpunit-easymock
-# "php": "~5.4|~7.0"
-%global php_min_ver 5.4
-# "phpunit/phpunit-mock-objects": "~2.0|~3.0"
-%global phpunit_mock_objects_min_ver 2.0
-%global phpunit_mock_objects_max_ver 4.0
+# "php": "~7.0"
+%global php_min_ver 7.0
+# "phpunit/phpunit-mock-objects": "~5.0|~6.0"
+# NOTE: Max version 6 instead of 7 to force single major version
+%global phpunit_mock_objects_min_ver 5.0
+%global phpunit_mock_objects_max_ver 6.0
# Build using "--without tests" to disable tests
%global with_tests 0%{!?_without_tests:1}
@@ -31,10 +32,9 @@
Name: php-%{composer_vendor}-%{composer_project}
Version: %{github_version}
-Release: 3%{?github_release}%{?dist}
+Release: 1%{?github_release}%{?dist}
Summary: Helpers to build PHPUnit mocks
-Group: Development/Libraries
License: MIT
URL: https://github.com/%{github_owner}/%{github_name}
@@ -48,10 +48,13 @@ BuildArch: noarch
%if %{with_tests}
## composer.json
BuildRequires: php(language) >= %{php_min_ver}
-BuildRequires: php-composer(phpunit/phpunit-mock-objects) < %{phpunit_mock_objects_max_ver}
-BuildRequires: php-composer(phpunit/phpunit-mock-objects) >= %{phpunit_mock_objects_min_ver}
-BuildRequires: php-composer(phpunit/phpunit)
-## phpcompatinfo (computed from version 0.2.3)
+BuildRequires: phpunit6
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+BuildRequires: (php-composer(phpunit/phpunit-mock-objects) >= %{phpunit_mock_objects_min_ver} with php-composer(phpunit/phpunit-mock-objects) < %{phpunit_mock_objects_max_ver})
+%else
+BuildRequires: php-phpunit-mock-objects5
+%endif
+## phpcompatinfo (computed from version 1.1.0)
BuildRequires: php-reflection
## Autoloader
BuildRequires: php-composer(fedora/autoloader)
@@ -59,9 +62,13 @@ BuildRequires: php-composer(fedora/autoloader)
# composer.json
Requires: php(language) >= %{php_min_ver}
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+Requires: (php-composer(phpunit/phpunit-mock-objects) >= %{phpunit_mock_objects_min_ver} with php-composer(phpunit/phpunit-mock-objects) < %{phpunit_mock_objects_max_ver})
+%else
Requires: php-composer(phpunit/phpunit-mock-objects) < %{phpunit_mock_objects_max_ver}
Requires: php-composer(phpunit/phpunit-mock-objects) >= %{phpunit_mock_objects_min_ver}
-# phpcompatinfo (computed from version 0.2.3)
+%endif
+# phpcompatinfo (computed from version 1.1.0)
# <none>
# Autoloader
Requires: php-composer(fedora/autoloader)
@@ -92,9 +99,9 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('EasyMock\\', __DIR__);
-\Fedora\Autoloader\Dependencies::required(array(
- '%{phpdir}/PHPUnit/Framework/MockObject/Autoload.php',
-));
+\Fedora\Autoloader\Dependencies::required([
+ '%{phpdir}/PHPUnit6/Framework/MockObject5/autoload.php',
+]);
AUTOLOAD
@@ -114,8 +121,8 @@ BOOTSTRAP
: Upstream tests
RETURN_CODE=0
-PHPUNIT=$(which phpunit)
-for PHP_EXEC in "" %{?rhel:php55} php56 php70 php71 php72; do
+PHPUNIT=$(which phpunit6)
+for PHP_EXEC in "" php71 php72 php73 php74; do
if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
$PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \
|| RETURN_CODE=1
@@ -136,6 +143,10 @@ exit $RETURN_CODE
%changelog
+* Sun May 26 2019 Shawn Iwinski <shawn@iwin.ski> - 1.1.0-1
+- Update to 1.1.0 (RHBZ #1512241)
+- Add range version dependencies for Fedora >= 27 || RHEL >= 8
+
* Mon May 15 2017 Shawn Iwinski <shawn.iwinski@gmail.com> - 0.2.3-3
- Switch autoloader to php-composer(fedora/autoloader)
- Add max versions to build dependencies