summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json27
-rw-r--r--php-sabre-event5.spec29
2 files changed, 44 insertions, 12 deletions
diff --git a/composer.json b/composer.json
index 1447041..dca5df2 100644
--- a/composer.json
+++ b/composer.json
@@ -16,7 +16,7 @@
"homepage": "http://sabre.io/event/",
"license": "BSD-3-Clause",
"require": {
- "php": "^7.1"
+ "php": "^7.1|^8.0"
},
"authors": [
{
@@ -40,11 +40,30 @@
"lib/Promise/functions.php"
]
},
+ "autoload-dev": {
+ "psr-4" : {
+ "Sabre\\Event\\" : "tests/Event"
+ }
+ },
"require-dev": {
"friendsofphp/php-cs-fixer": "~2.16.1",
- "phpunit/phpunit" : "^7 || ^8"
+ "phpstan/phpstan": "^0.12",
+ "phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0"
},
- "config" : {
- "bin-dir" : "bin/"
+ "scripts": {
+ "phpstan": [
+ "phpstan analyse lib tests"
+ ],
+ "cs-fixer": [
+ "php-cs-fixer fix"
+ ],
+ "phpunit": [
+ "phpunit --configuration tests/phpunit.xml"
+ ],
+ "test": [
+ "composer phpstan",
+ "composer cs-fixer",
+ "composer phpunit"
+ ]
}
}
diff --git a/php-sabre-event5.spec b/php-sabre-event5.spec
index 322ae73..48ed8d0 100644
--- a/php-sabre-event5.spec
+++ b/php-sabre-event5.spec
@@ -1,13 +1,13 @@
# remirepo/fedora spec file for php-sabre-event5
#
-# Copyright (c) 2013-2019 Remi Collet
+# Copyright (c) 2013-2020 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
# Github
-%global gh_commit d00a17507af0e7544cfe17096372f5d733e3b276
+%global gh_commit a37c73e535ddab02bd892f4bdab4867f9778cbea
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner sabre-io
%global gh_project event
@@ -23,7 +23,7 @@
Name: php-%{pk_vendor}-%{pk_project}%{major}
Summary: Lightweight library for event-based programming
-Version: 5.1.0
+Version: 5.1.1
Release: 1%{?dist}
URL: http://sabre.io/event
@@ -37,14 +37,21 @@ BuildRequires: php(language) >= 7.1
BuildRequires: php-spl
# From composer.json, "require-dev": {
# "friendsofphp/php-cs-fixer": "~2.16.1",
-# "phpunit/phpunit" : "^7 || ^8"
+# "phpstan/phpstan": "^0.12",
+# "phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0"
+%if 0%{?fedora} >= 31 || 0%{?rhel} >= 9
+BuildRequires: phpunit9
+%global phpunit %{_bindir}/phpunit9
+%else
BuildRequires: phpunit8
+%global phpunit %{_bindir}/phpunit8
+%endif
# Autoloader
BuildRequires: php-composer(fedora/autoloader)
%endif
# From composer.json, "require": {
-# "php": "^7.1"
+# "php": "^7.1|^8.0"
Requires: php(language) >= 7.1
# From phpcompatinfo report for version 5.0.2
Requires: php-spl
@@ -97,9 +104,10 @@ cp -pr lib %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}%{major}
%if %{with_tests}
: Run upstream test suite against installed library
ret=0
-for cmd in php php72 php73 php74; do
- if which $cmd; then
- $cmd %{_bindir}/phpunit8 \
+for cmdarg in "php %{phpunit}" "php72 %{_bindir}/phpunit8" php73 php74 php80; do
+ if which $cmdarg; then
+ set $cmdarg
+ $1 ${2:-%{_bindir}/phpunit9} \
--bootstrap=%{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}%{major}/autoload.php \
--configuration tests/phpunit.xml \
--verbose || ret=1
@@ -112,6 +120,7 @@ exit $ret
%files
+# remirepo:1
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc *md
@@ -121,6 +130,10 @@ exit $ret
%changelog
+* Mon Sep 21 2020 Remi Collet <remi@remirepo.net> - 5.1.1-1
+- update to 5.1.1
+- switch to phpunit9
+
* Sat Feb 1 2020 Remi Collet <remi@remirepo.net> - 5.1.0-1
- update to 5.1.0
- raise dependency on PHP 7.1