summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-08-04 15:34:31 +0200
committerRemi Collet <remi@remirepo.net>2017-08-04 15:34:31 +0200
commitf47eea607f12e62dee45bf434d5ba3e073331d96 (patch)
treefe8e609ceefeba83f904a178b38fafb2e4cf398e
parent0b07000b08984e736608d9dacadd42715b4a5f4c (diff)
v2.0.0 (PHP 7.0+)
-rw-r--r--.gitignore7
-rw-r--r--composer.json10
-rw-r--r--php-phpunit-PHP-TokenStream.spec63
3 files changed, 38 insertions, 42 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1ab5c4f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+package-*.xml
+*.tgz
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/composer.json b/composer.json
index dfde729..4bf07e7 100644
--- a/composer.json
+++ b/composer.json
@@ -15,11 +15,15 @@
"issues": "https://github.com/sebastianbergmann/php-token-stream/issues"
},
"require": {
- "php": ">=5.3.3",
+ "php": "^7.0",
"ext-tokenizer": "*"
},
"require-dev": {
- "phpunit/phpunit": "~4.2"
+ "phpunit/phpunit": "^6.2.4"
+ },
+ "config": {
+ "optimize-autoloader": true,
+ "sort-packages": true
},
"autoload": {
"classmap": [
@@ -28,7 +32,7 @@
},
"extra": {
"branch-alias": {
- "dev-master": "1.4-dev"
+ "dev-master": "2.0-dev"
}
}
}
diff --git a/php-phpunit-PHP-TokenStream.spec b/php-phpunit-PHP-TokenStream.spec
index e18ba79..a2c21dd 100644
--- a/php-phpunit-PHP-TokenStream.spec
+++ b/php-phpunit-PHP-TokenStream.spec
@@ -8,7 +8,7 @@
# Please, preserve the changelog entries
#
%global bootstrap 0
-%global gh_commit e03f8f67534427a787e21a385a67ec3ca6978ea7
+%global gh_commit ecb0b2cdaa0add708fe6f329ef65ae0c5225130b
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner sebastianbergmann
%global gh_project php-token-stream
@@ -16,13 +16,13 @@
%global pear_name PHP_TokenStream
%global pear_channel pear.phpunit.de
%if %{bootstrap}
-%global with_tests %{?_with_tests:1}%{!?_with_tests:0}
+%global with_tests 0%{?_with_tests:1}
%else
-%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
+%global with_tests 0%{!?_without_tests:1}
%endif
Name: php-phpunit-PHP-TokenStream
-Version: 1.4.11
+Version: 2.0.0
Release: 1%{?dist}
Summary: Wrapper around PHP tokenizer extension
@@ -31,26 +31,25 @@ License: BSD
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
-BuildRequires: php(language) >= 5.3.3
+BuildRequires: php(language) >= 7.0
BuildRequires: php-fedora-autoloader-devel
%if %{with_tests}
-BuildRequires: php-pear-PHPUnit >= 3.7.0
+BuildRequires: phpunit6 >= 6.2.4
%endif
# From composer.json
-# "php": ">=5.3.3",
+# "php": "^7.0",
# "ext-tokenizer": "*"
-Requires: php(language) >= 5.3.3
+Requires: php(language) >= 7.0
Requires: php-tokenizer
-# From phpcompatinfo report for version 1.2.2
+# From phpcompatinfo report for version 2.0.0
Requires: php-pcre
Requires: php-spl
# Autoloader
Requires: php-composer(fedora/autoloader)
-Provides: php-composer(phpunit/php-token-stream) = %{version}
+Provides: php-composer(phpunit/%{gh_project}) = %{version}
# For compatibility with PEAR mode
Provides: php-pear(%{pear_channel}/%{pear_name}) = %{version}
@@ -72,45 +71,27 @@ phpab \
%install
-rm -rf %{buildroot}
mkdir -p %{buildroot}%{php_home}
cp -pr src %{buildroot}%{php_home}/PHP
%if %{with_tests}
%check
-: Autoloader already called from PHPUnit main autoloader
-sed -e '/autoload.php/d' \
- -i tests/bootstrap.php
+mkdir vendor
+touch vendor/autoload.php
-cd build
: Run upstream test suite
-# remirepo:13
-run=0
ret=0
-if which php56; then
- php56 -d include_path=.:%{buildroot}%{php_home}:%{php_home} \
- %{_bindir}/phpunit || ret=1
- run=1
-fi
-if which php71; then
- php71 -d include_path=.:%{buildroot}%{php_home}:%{php_home} \
- %{_bindir}/phpunit || ret=1
- run=1
-fi
-if [ $run -eq 0 ]; then
-%{_bindir}/php -d include_path=.:%{buildroot}%{php_home}:%{php_home} \
-%{_bindir}/phpunit --verbose
-# remirepo:2
-fi
+for cmd in php php70 php71 php72; do
+ if which $cmd; then
+ $cmd -d auto_prepend_file=%{buildroot}%{php_home}/PHP/Token/Stream/Autoload.php \
+ %{_bindir}/phpunit6 --verbose || ret=1
+ fi
+done
exit $ret
%endif
-%clean
-rm -rf %{buildroot}
-
-
%post
if [ -x %{_bindir}/pear ]; then
%{_bindir}/pear uninstall --nodeps --ignore-errors --register-only \
@@ -119,14 +100,18 @@ fi
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
-%doc README.md composer.json
+%doc *.md
+%doc composer.json
%{php_home}/PHP
%changelog
+* Fri Aug 4 2017 Remi Collet <remi@remirepo.net> - 2.0.0-1
+- Update to 2.0.0
+- raise dependency on PHP 7.0
+
* Mon Feb 27 2017 Remi Collet <remi@fedoraproject.org> - 1.4.11-1
- Update to 1.4.11