summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-11-03 07:53:45 +0100
committerRemi Collet <remi@remirepo.net>2017-11-03 07:53:45 +0100
commit034ea5a81212045b1ab1b5ae224047e3fc95d467 (patch)
treef8b1353e57c001fb4cad58f92193abca2b52559b
parent3c849e1e011401a5674b8331e06f3577d207e468 (diff)
Update to 3.0
rename to php-gecko-packages-gecko-php-unit3 raise dependency on PHP 7.0 raise dependency on PHPUnit 6
-rw-r--r--composer.json9
-rwxr-xr-xmakesrc.sh2
-rw-r--r--php-gecko-packages-gecko-php-unit3.spec39
3 files changed, 31 insertions, 19 deletions
diff --git a/composer.json b/composer.json
index febdd23..a00c3e1 100644
--- a/composer.json
+++ b/composer.json
@@ -6,10 +6,10 @@
"license": "MIT",
"keywords": ["PHPUnit", "Extension", "FileSystem"],
"require": {
- "php": "^5.3.6 || ^7.0"
+ "php": "^7.0"
},
"require-dev": {
- "phpunit/phpunit": "^4.8.35 || ^5.4.3"
+ "phpunit/phpunit": "^6.0"
},
"autoload": {
"psr-4": {
@@ -20,6 +20,11 @@
"optimize-autoloader": true,
"sort-packages": true
},
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.0-dev"
+ }
+ },
"suggest": {
"ext-dom": "When testing with xml.",
"ext-libxml": "When testing with xml.",
diff --git a/makesrc.sh b/makesrc.sh
index 7c824f0..dfd5c2a 100755
--- a/makesrc.sh
+++ b/makesrc.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-NAME=php-gecko-packages-gecko-php-unit
+NAME=$(basename $PWD)
OWNER=$(sed -n '/^%global gh_owner/{s/.* //;p}' $NAME.spec)
PROJECT=$(sed -n '/^%global gh_project/{s/.* //;p}' $NAME.spec)
VERSION=$(sed -n '/^Version:/{s/.* //;p}' $NAME.spec)
diff --git a/php-gecko-packages-gecko-php-unit3.spec b/php-gecko-packages-gecko-php-unit3.spec
index 226f949..1a8c0ef 100644
--- a/php-gecko-packages-gecko-php-unit3.spec
+++ b/php-gecko-packages-gecko-php-unit3.spec
@@ -1,4 +1,4 @@
-# remirepo/fedora spec file for php-gecko-packages-gecko-php-unit
+# remirepo/fedora spec file for php-gecko-packages-gecko-php-unit3
#
# Copyright (c) 2016-2017 Remi Collet
# License: CC-BY-SA
@@ -6,7 +6,7 @@
#
# Please, preserve the changelog entries
#
-%global gh_commit ab525fac9a9ffea219687f261b02008b18ebf2d1
+%global gh_commit 6a866551dffc2154c1b091bae3a7877d39c25ca3
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
#global gh_date 20150717
%global gh_owner GeckoPackages
@@ -14,10 +14,11 @@
%global pk_owner gecko-packages
%global pk_project gecko-php-unit
%global php_home %{_datadir}/php
+%global major 3
%global with_tests 0%{!?_without_tests:1}
-Name: php-%{pk_owner}-%{pk_project}
-Version: 2.2
+Name: php-%{pk_owner}-%{pk_project}%{major}
+Version: 3.0
Release: 1%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist}
Summary: Additional PHPUnit asserts and constraints
@@ -31,22 +32,22 @@ Source1: makesrc.sh
BuildArch: noarch
%if %{with_tests}
# For tests
-BuildRequires: php(language) >= 5.3.6
+BuildRequires: php(language) >= 7.0
BuildRequires: php-dom
BuildRequires: php-libxml
BuildRequires: php-pcre
BuildRequires: php-spl
# From composer.json, "require-dev": {
-# "phpunit/phpunit": "4.0"
-BuildRequires: php-composer(phpunit/phpunit)
+# "phpunit/phpunit": "^6.0"
+BuildRequires: phpunit6
# Autoloader
BuildRequires: php-composer(fedora/autoloader)
%endif
# From composer.json, "require": {
-# "php": "^5.3.6 || ^7.0"
-Requires: php(language) >= 5.3.6
-# From phpcompatinfo report for version 2.2
+# "php": "^7.0"
+Requires: php(language) >= 7.0
+# From phpcompatinfo report for version 3.0
Requires: php-dom
Requires: php-libxml
Requires: php-pcre
@@ -62,7 +63,7 @@ Provides additional asserts to be used in PHPUnit tests.
The asserts are provided using Traits so no changes are needed
in the hierarchy of test classes.
-Autoloader: %{php_home}/GeckoPackages/PHPUnit/autoload.php
+Autoloader: %{php_home}/GeckoPackages/PHPUnit%{major}/autoload.php
%prep
@@ -84,14 +85,14 @@ EOF
%install
mkdir -p %{buildroot}%{php_home}/GeckoPackages
-cp -pr src/PHPUnit %{buildroot}%{php_home}/GeckoPackages/PHPUnit
+cp -pr src/PHPUnit %{buildroot}%{php_home}/GeckoPackages/PHPUnit%{major}
%check
%if %{with_tests}
mkdir vendor
-ln -s %{buildroot}%{php_home}/GeckoPackages/PHPUnit/autoload.php vendor/autoload.php
+ln -s %{buildroot}%{php_home}/GeckoPackages/PHPUnit%{major}/autoload.php vendor/autoload.php
: Fix paths in unit tests
for unit in $(find tests -name \*Test.php -print); do
@@ -99,9 +100,9 @@ for unit in $(find tests -name \*Test.php -print); do
done
ret=0
-for cmd in php php56 php70 php71 php72; do
+for cmd in php php70 php71 php72; do
if which $cmd; then
- $cmd %{_bindir}/phpunit --verbose || ret=1
+ $cmd %{_bindir}/phpunit6 --verbose || ret=1
fi
done
exit $ret
@@ -116,10 +117,16 @@ exit $ret
%doc composer.json
%doc *.md
%dir %{php_home}/GeckoPackages
- %{php_home}/GeckoPackages/PHPUnit
+ %{php_home}/GeckoPackages/PHPUnit%{major}
%changelog
+* Fri Nov 3 2017 Remi Collet <remi@remirepo.net> - 3.0-1
+- Update to 3.0
+- rename to php-gecko-packages-gecko-php-unit3
+- raise dependency on PHP 7.0
+- raise dependency on PHPUnit 6
+
* Thu Aug 24 2017 Remi Collet <remi@remirepo.net> - 2.2-1
- Update to 2.2