summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json17
-rw-r--r--php-williamdes-mariadb-mysql-kbs-layout.patch4
-rw-r--r--php-williamdes-mariadb-mysql-kbs.spec34
3 files changed, 32 insertions, 23 deletions
diff --git a/composer.json b/composer.json
index 43b6549..be5ef71 100644
--- a/composer.json
+++ b/composer.json
@@ -3,9 +3,9 @@
"description": "An index of the MariaDB and MySQL Knowledge bases",
"homepage": "https://github.com/williamdes/mariadb-mysql-kbs",
"type": "library",
- "readme": "https://github.com/williamdes/mariadb-mysql-kbs/blob/master/README.md",
+ "readme": "https://github.com/williamdes/mariadb-mysql-kbs/blob/main/README.md",
"license": "MPL-2.0",
- "version": "1.2.10",
+ "version": "1.2.11",
"keywords": [
"mariadb",
"mysql",
@@ -33,19 +33,19 @@
"scripts": {
"build": "php src/merge.php",
"test": "phpunit",
- "phpstan": "phpstan analyse src test --configuration=phpstan.neon --level=max --memory-limit=100M",
+ "phpstan": "phpstan analyse src test --configuration=phpstan.neon",
"phpcs": "phpcs --standard=phpcs.xml --no-cache --colors -p -n",
"phpcbf": "phpcbf --standard=phpcs.xml"
},
"require": {
- "php": "^7.1"
+ "php": ">=7.1"
},
"require-dev": {
- "phpunit/phpunit": "^7 || ^8",
+ "phpunit/phpunit": "^7 || ^8 || ^9",
"phpstan/phpstan": "^0.12",
- "slevomat/coding-standard": "^6.0",
- "squizlabs/php_codesniffer": "^3.3",
- "swaggest/json-schema": "^0.12.9"
+ "slevomat/coding-standard": "^6.3",
+ "squizlabs/php_codesniffer": "^3.4",
+ "swaggest/json-schema": "^0.12.29"
},
"archive": {
"exclude": [
@@ -54,7 +54,6 @@
"/dist/merged-raw.json",
"/test",
"*.js",
- "/.dependabot",
"/.jshintrc",
"/.npmignore",
"/.editorconfig",
diff --git a/php-williamdes-mariadb-mysql-kbs-layout.patch b/php-williamdes-mariadb-mysql-kbs-layout.patch
index 21b579e..9a7984e 100644
--- a/php-williamdes-mariadb-mysql-kbs-layout.patch
+++ b/php-williamdes-mariadb-mysql-kbs-layout.patch
@@ -33,8 +33,8 @@ diff -up ./test/SearchTest.php.rpm ./test/SearchTest.php
+ Search::$loaded = false;
+ Search::$DATA_DIR = getenv("RPM_BUILDROOT") . Search::$DATA_DIR;
+ $found = Search::getByName("max_connections", Search::MYSQL);
-+ $this->assertContains('php-williamdes-mariadb-mysql-kb', Search::$DATA_DIR);
-+ $this->assertContains(getenv("RPM_BUILDROOT"), Search::$DATA_DIR);
++ $this->assertStringContainsString('php-williamdes-mariadb-mysql-kb', Search::$DATA_DIR);
++ $this->assertStringContainsString(getenv("RPM_BUILDROOT"), Search::$DATA_DIR);
+ $this->assertTrue(Search::$loaded);
+ }
}
diff --git a/php-williamdes-mariadb-mysql-kbs.spec b/php-williamdes-mariadb-mysql-kbs.spec
index 0409a96..767dc9c 100644
--- a/php-williamdes-mariadb-mysql-kbs.spec
+++ b/php-williamdes-mariadb-mysql-kbs.spec
@@ -9,7 +9,7 @@
%global with_tests 0%{!?_without_tests:1}
# Github
-%global gh_commit 152fa144bd5f9fbdd3b5e764a506e239a730df83
+%global gh_commit 2653637d537329b2b2ba7290dc70eacf09c74072
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner williamdes
%global gh_project mariadb-mysql-kbs
@@ -22,7 +22,7 @@
%global major %nil
Name: php-%{pk_vendor}-%{pk_project}%{major}
-Version: 1.2.10
+Version: 1.2.11
Release: 1%{?gh_date?%{gh_date}git%{gh_short}}%{?dist}
Summary: An index of the MariaDB and MySQL Knowledge bases
@@ -40,25 +40,30 @@ BuildRequires: php(language) >= 7.1
BuildRequires: php-json
BuildRequires: php-pcre
# For tests, from composer.json "require-dev": {
-# "phpunit/phpunit": "^7 || ^8",
+# "phpunit/phpunit": "^7 || ^8 || ^9",
# "phpstan/phpstan": "^0.12",
-# "slevomat/coding-standard": "^6.0",
-# "squizlabs/php_codesniffer": "^3.3",
-# "swaggest/json-schema": "^0.12.9"
+# "slevomat/coding-standard": "^6.3",
+# "squizlabs/php_codesniffer": "^3.4",
+# "swaggest/json-schema": "^0.12.29"
+%if 0%{?fedora} >= 32 || 0%{?rhel} >= 9
+BuildRequires: phpunit9
+%global phpunit %{_bindir}/phpunit9
+%else
BuildRequires: phpunit8
%global phpunit %{_bindir}/phpunit8
+%endif
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-BuildRequires: (php-composer(swaggest/json-schema) > 0.12.9 with php-composer(swaggest/json-schema) < 1)
+BuildRequires: (php-composer(swaggest/json-schema) > 0.12.29 with php-composer(swaggest/json-schema) < 1)
%else
BuildRequires: php-composer(swaggest/json-schema) < 1
-BuildRequires: php-composer(swaggest/json-schema) >= 0.12.9
+BuildRequires: php-composer(swaggest/json-schema) >= 0.12.29
%endif
# For autoloader
BuildRequires: php-composer(fedora/autoloader)
%endif
# From composer.json, "require": {
-# "php": "^7.1"
+# "php": ">=7.1"
Requires: php(language) >= 7.1
# From phpcompatinfo report for 1.2.7
Requires: php-json
@@ -123,9 +128,10 @@ EOF
export RPM_BUILDROOT=%{buildroot}
ret=0
-for cmd in php php72 php73 php74; do
- if which $cmd; then
- $cmd %{phpunit} --no-coverage --verbose || ret=1
+for cmdarg in "php %{phpunit}" "php72 %{_bindir}/phpunit8" php73 php74 php80; do
+ if which $cmdarg; then
+ set $cmdarg
+ $1 ${2:-%{_bindir}/phpunit9} --no-coverage --verbose || ret=1
fi
done
exit $ret
@@ -151,6 +157,10 @@ exit $ret
%changelog
+* Mon Sep 14 2020 Remi Collet <remi@remirepo.net> - 1.2.11-1
+- update to 1.2.11
+- switch to phpunit9
+
* Thu Feb 27 2020 Remi Collet <remi@remirepo.net> - 1.2.10-1
- update to 1.2.10
- sources from git snapshot