summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json4
-rw-r--r--php-sebastian-code-unit-reverse-lookup.spec54
2 files changed, 20 insertions, 38 deletions
diff --git a/composer.json b/composer.json
index b9a2419..ba32ed6 100644
--- a/composer.json
+++ b/composer.json
@@ -10,10 +10,10 @@
}
],
"require": {
- "php": "^5.6 || ^7.0"
+ "php": ">=5.6"
},
"require-dev": {
- "phpunit/phpunit": "^5.7 || ^6.0"
+ "phpunit/phpunit": "^8.5"
},
"autoload": {
"classmap": [
diff --git a/php-sebastian-code-unit-reverse-lookup.spec b/php-sebastian-code-unit-reverse-lookup.spec
index a4c3297..2f15c80 100644
--- a/php-sebastian-code-unit-reverse-lookup.spec
+++ b/php-sebastian-code-unit-reverse-lookup.spec
@@ -7,7 +7,7 @@
# Please, preserve the changelog entries
#
%global bootstrap 0
-%global gh_commit 4419fcdb5eabb9caa61a27c7a1db532a6b55dd18
+%global gh_commit 1de8cd5c010cb153fcd68b8d0f64606f523f7619
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner sebastianbergmann
%global gh_project code-unit-reverse-lookup
@@ -20,28 +20,25 @@
%endif
Name: php-sebastian-%{gh_project}
-Version: 1.0.1
+Version: 1.0.2
Release: 1%{?dist}
Summary: Looks up which function or method a line of code belongs to
-Group: Development/Libraries
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
+Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: php(language) >= 5.6
BuildRequires: php-fedora-autoloader-devel
%if %{with_tests}
# from composer.json, "require-dev": {
-# "phpunit/phpunit": "^5.7 || ^6.0"
-# Ignore min version on purpose, avoid bootstrap (tested with 4.8)
-BuildRequires: php-composer(phpunit/phpunit)
+# "phpunit/phpunit": "^8.5"
+BuildRequires: phpunit8 >= 8.5
%endif
# from composer.json, "require": {
-# "php": "^5.6 || ^7.0"
+# "php": ">=5.6"
Requires: php(language) >= 5.6
# From phpcompatinfo report for version 1.0.0
Requires: php-reflection
@@ -67,7 +64,6 @@ phpab --template fedora --output src/autoload.php src
%install
-rm -rf %{buildroot}
mkdir -p %{buildroot}%{php_home}
cp -pr src %{buildroot}%{php_home}/%{ns_name}
@@ -75,42 +71,24 @@ cp -pr src %{buildroot}%{php_home}/%{ns_name}
%check
%if %{with_tests}
mkdir vendor
-cat << 'EOF' | tee vendor/autoload.php
-<?php
-require 'SebastianBergmann/%{ns_name}/autoload.php';
-EOF
+touch vendor/autoload.php
: Run upstream test suite
-# remirepo:13
-run=0
ret=0
-if which php56; then
- php56 -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \
- %{_bindir}/phpunit --verbose || ret=1
- run=1
-fi
-if which php71; then
- php71 -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \
- %{_bindir}/phpunit6 --verbose || ret=1
- run=1
-fi
-if [ $run -eq 0 ]; then
-%{_bindir}/php -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \
-%{_bindir}/phpunit --verbose
-# remirepo:2
-fi
+for cmd in php php72 php73 php74 php80; do
+ if which $cmd; then
+ $cmd -d auto_prepend_file=%{buildroot}%{php_home}/%{ns_name}/autoload.php \
+ %{_bindir}/phpunit8 --verbose || ret=1
+ fi
+done
exit $ret
%else
: bootstrap build with test suite disabled
%endif
-%clean
-rm -rf %{buildroot}
-
-
%files
-%defattr(-,root,root,-)
+# remirepo:1
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc *.md
@@ -120,6 +98,10 @@ rm -rf %{buildroot}
%changelog
+* Mon Nov 30 2020 Remi Collet <remi@remirepo.net> - 1.0.2-1
+- update to 1.0.2 (no change)
+- switch to phpunit8
+
* Sat Mar 4 2017 Remi Collet <remi@remirepo.net> - 1.0.1-1
- Update to 1.0.1 (no change)