From 58c0bc2d7a8b221a0ad28d7a47b95cf5a64e6fc9 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 27 Jan 2020 08:39:12 +0100 Subject: update to 1.2.9 switch to phpunit8 --- composer.json | 23 ++++++++++++++--------- php-williamdes-mariadb-mysql-kbs-layout.patch | 19 +++++++++---------- php-williamdes-mariadb-mysql-kbs.spec | 25 ++++++++++++++----------- 3 files changed, 37 insertions(+), 30 deletions(-) diff --git a/composer.json b/composer.json index a0eed1e..12d180d 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "type": "library", "readme": "https://github.com/williamdes/mariadb-mysql-kbs/blob/master/README.md", "license": "MPL-2.0", - "version": "1.2.8", + "version": "1.2.9", "keywords": [ "mariadb", "mysql", @@ -32,7 +32,7 @@ ], "scripts": { "build": "php src/merge.php", - "test": "phpunit --testdox --configuration ./test/phpunit.xml", + "test": "phpunit", "phpstan": "phpstan analyse src test --configuration=phpstan.neon --level=max --memory-limit=100M", "phpcs": "phpcs --standard=phpcs.xml --no-cache --colors -p -n", "phpcbf": "phpcbf --standard=phpcs.xml" @@ -41,11 +41,10 @@ "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^7.0 || ^8.0", - "phpstan/phpstan": "^0.11.3", - "slevomat/coding-standard": "^5.0", + "phpunit/phpunit": "^7 || ^8", + "phpstan/phpstan": "^0.12", + "slevomat/coding-standard": "^6.0", "squizlabs/php_codesniffer": "^3.3", - "php-school/cli-menu": "^3.0", "swaggest/json-schema": "^0.12.9" }, "archive": { @@ -63,16 +62,20 @@ "/CODEOWNERS", "/williamdes-mariadb-mysql-kbs-*.tar", "/docs", + "/target", "/package.json", "/package-lock.json", "/.prettierignore", "/.gitignore", "/phpcs.xml", + "/phpunit.xml", + "/.gitattributes", "/phpstan.neon", - "/.travis.yml", + "/.github", "/dist/merged-raw.md", "/.jshintignore", - "/.phpunit.result.cache" + "/.phpunit.result.cache", + "/schemas" ] }, "autoload": { @@ -85,5 +88,7 @@ "Williamdes\\MariaDBMySQLKBS\\Test\\": "test/" } }, - "non-feature-branches": ["update/*"] + "non-feature-branches": [ + "update/*" + ] } diff --git a/php-williamdes-mariadb-mysql-kbs-layout.patch b/php-williamdes-mariadb-mysql-kbs-layout.patch index 9858a8e..21b579e 100644 --- a/php-williamdes-mariadb-mysql-kbs-layout.patch +++ b/php-williamdes-mariadb-mysql-kbs-layout.patch @@ -1,19 +1,18 @@ -diff -up ./src/merge.php.rpm ./src/merge.php diff -up ./src/Search.php.rpm ./src/Search.php ---- ./src/Search.php.rpm 2019-09-12 10:53:45.797567100 +0200 -+++ ./src/Search.php 2019-09-12 11:01:04.702560202 +0200 -@@ -25,7 +25,7 @@ class Search - public const MYSQL = 1; - public const MARIADB = 2; - public const DS = DIRECTORY_SEPARATOR; -- public static $DATA_DIR = __DIR__.self::DS."..".self::DS."dist".self::DS; +--- ./src/Search.php.rpm 2020-01-27 08:31:51.566856296 +0100 ++++ ./src/Search.php 2020-01-27 08:32:31.160706000 +0100 +@@ -31,7 +31,7 @@ class Search + * + * @var string + */ +- public static $DATA_DIR = __DIR__ . self::DS . ".." . self::DS . "dist" . self::DS; + public static $DATA_DIR = '/usr/share/php-williamdes-mariadb-mysql-kbs/dist/'; /** * Load data from disk diff -up ./test/SearchTest.php.rpm ./test/SearchTest.php ---- ./test/SearchTest.php.rpm 2019-09-12 14:45:12.103423385 +0200 -+++ ./test/SearchTest.php 2019-09-12 14:45:15.407409867 +0200 +--- ./test/SearchTest.php.rpm 2020-01-26 21:00:05.000000000 +0100 ++++ ./test/SearchTest.php 2020-01-27 08:31:51.566856296 +0100 @@ -175,4 +175,24 @@ class SearchTest extends TestCase $this->assertEquals("boolean", $type); } diff --git a/php-williamdes-mariadb-mysql-kbs.spec b/php-williamdes-mariadb-mysql-kbs.spec index 417cc97..b654a98 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 ebae1986d3dec93df3bdf9ae5c664485c12d2b94 +%global gh_commit 0da5be5f43c184f497c84e4865c9fd8f37f19d5d %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.8 +Version: 1.2.9 Release: 1%{?gh_date?%{gh_date}git%{gh_short}}%{?dist} Summary: An index of the MariaDB and MySQL Knowledge bases @@ -38,14 +38,13 @@ BuildRequires: php(language) >= 7.1 BuildRequires: php-json BuildRequires: php-pcre # For tests, from composer.json "require-dev": { -# "phpunit/phpunit": "^7.0 || ^8.0", -# "phpstan/phpstan": "^0.11.3", -# "slevomat/coding-standard": "^5.0", +# "phpunit/phpunit": "^7 || ^8", +# "phpstan/phpstan": "^0.12", +# "slevomat/coding-standard": "^6.0", # "squizlabs/php_codesniffer": "^3.3", -# "php-school/cli-menu": "^3.0", # "swaggest/json-schema": "^0.12.9" -BuildRequires: phpunit7 -%global phpunit %{_bindir}/phpunit7 +BuildRequires: phpunit8 +%global phpunit %{_bindir}/phpunit8 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: (php-composer(swaggest/json-schema) > 0.12.9 with php-composer(swaggest/json-schema) < 1) %else @@ -78,7 +77,8 @@ Autoloader: %{_datadir}/php/%{ns_vendor}/%{ns_project}%{major}/autoload.php %prep %setup -q -n %{gh_project}-%{gh_commit} -%patch0 -p1 +%patch0 -p1 -b .rpm +find src -name \*.rpm -delete : Create autoloader cat <<'AUTOLOAD' | tee src/autoload.php @@ -118,11 +118,10 @@ require '%{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}%{major}/autoload require '%{_datadir}/php/Swaggest/JsonSchema/autoload.php'; EOF -cd test export RPM_BUILDROOT=%{buildroot} ret=0 -for cmd in php php71 php72 php73 php74; do +for cmd in php php72 php73 php74; do if which $cmd; then $cmd %{phpunit} --no-coverage --verbose || ret=1 fi @@ -150,6 +149,10 @@ exit $ret %changelog +* Mon Jan 27 2020 Remi Collet - 1.2.9-1 +- update to 1.2.9 +- switch to phpunit8 + * Tue Nov 12 2019 Remi Collet - 1.2.8-1 - update to 1.2.8 -- cgit