From 0929d30a6ed395af33f35787e7f163cafd9501ba Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 20 Dec 2021 10:51:29 +0100 Subject: update to 1.2.13 --- composer.json | 58 +++++++++------------------ php-williamdes-mariadb-mysql-kbs-layout.patch | 17 ++++---- php-williamdes-mariadb-mysql-kbs.spec | 25 ++++++------ 3 files changed, 38 insertions(+), 62 deletions(-) diff --git a/composer.json b/composer.json index 653b936..094063d 100644 --- a/composer.json +++ b/composer.json @@ -3,9 +3,18 @@ "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/main/README.md", + "readme": "https://github.com/williamdes/mariadb-mysql-kbs#readme", "license": "MPL-2.0", - "version": "1.2.12", + "funding": [ + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/packagist/williamdes/mariadb-mysql-kbs" + }, + { + "type": "github", + "url": "https://github.com/sponsors/williamdes" + } + ], "keywords": [ "mariadb", "mysql", @@ -31,52 +40,21 @@ } ], "scripts": { - "build": "php src/merge.php", - "test": "phpunit", - "phpstan": "phpstan analyse src test --configuration=phpstan.neon", - "phpcs": "phpcs --standard=phpcs.xml --no-cache --colors -p -n", - "phpcbf": "phpcbf --standard=phpcs.xml" + "build": "./src/merge.php", + "test": "./vendor/bin/phpunit", + "phpstan": "./vendor/bin/phpstan", + "phpcs": "./vendor/bin/phpcs --no-cache", + "phpcbf": "./vendor/bin/phpcbf" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { "phpunit/phpunit": "^7 || ^8 || ^9", - "phpstan/phpstan": "^0.12", - "slevomat/coding-standard": "^6.3", - "squizlabs/php_codesniffer": "^3.4", + "phpstan/phpstan": "^1.2", + "wdes/coding-standard": "^3", "swaggest/json-schema": "^0.12.29" }, - "archive": { - "exclude": [ - "/scripts", - "/data", - "/dist/merged-raw.json", - "/test", - "*.js", - "/.jshintrc", - "/.npmignore", - "/.editorconfig", - "/.gitmodules", - "/CODEOWNERS", - "/williamdes-mariadb-mysql-kbs-*.tar", - "/docs", - "/target", - "/package.json", - "/package-lock.json", - "/.prettierignore", - "/.gitignore", - "/phpcs.xml", - "/phpunit.xml", - "/.gitattributes", - "/phpstan.neon", - "/.github", - "/dist/merged-raw.md", - "/.jshintignore", - "/.phpunit.result.cache", - "/schemas" - ] - }, "autoload": { "psr-4": { "Williamdes\\MariaDBMySQLKBS\\": "src/" diff --git a/php-williamdes-mariadb-mysql-kbs-layout.patch b/php-williamdes-mariadb-mysql-kbs-layout.patch index 9a7984e..82b7022 100644 --- a/php-williamdes-mariadb-mysql-kbs-layout.patch +++ b/php-williamdes-mariadb-mysql-kbs-layout.patch @@ -1,23 +1,22 @@ diff -up ./src/Search.php.rpm ./src/Search.php ---- ./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 +--- ./src/Search.php.rpm 2021-12-20 10:47:08.194216239 +0100 ++++ ./src/Search.php 2021-12-20 10:47:52.898097362 +0100 +@@ -32,7 +32,7 @@ class Search * * @var string */ -- public static $DATA_DIR = __DIR__ . self::DS . ".." . self::DS . "dist" . self::DS; +- 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 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); +--- ./test/SearchTest.php.rpm 2021-12-20 10:47:08.194216239 +0100 ++++ ./test/SearchTest.php 2021-12-20 10:48:23.905014907 +0100 +@@ -182,4 +182,23 @@ class SearchTest extends TestCase + $this->assertEquals('boolean', $type); } -+ + /** + * test RPM Layout + * diff --git a/php-williamdes-mariadb-mysql-kbs.spec b/php-williamdes-mariadb-mysql-kbs.spec index 25ec517..008ce44 100644 --- a/php-williamdes-mariadb-mysql-kbs.spec +++ b/php-williamdes-mariadb-mysql-kbs.spec @@ -10,7 +10,7 @@ %bcond_without tests # Github -%global gh_commit b5d4b498ba3d24ab7ad7dd0b79384542e37286a1 +%global gh_commit f5c1b00d4bcfb27c06595ae172aa69da1815bfa9 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner williamdes %global gh_project mariadb-mysql-kbs @@ -23,7 +23,7 @@ %global major %nil Name: php-%{pk_vendor}-%{pk_project}%{major} -Version: 1.2.12 +Version: 1.2.13 Release: 1%{?gh_date?%{gh_date}git%{gh_short}}%{?dist} Summary: An index of the MariaDB and MySQL Knowledge bases @@ -42,22 +42,18 @@ BuildRequires: php-json BuildRequires: php-pcre # For tests, from composer.json "require-dev": { # "phpunit/phpunit": "^7 || ^8 || ^9", -# "phpstan/phpstan": "^0.12", -# "slevomat/coding-standard": "^6.3", -# "squizlabs/php_codesniffer": "^3.4", +# "phpstan/phpstan": "^1.2", +# "wdes/coding-standard": "^3", # "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 +# remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: (php-composer(swaggest/json-schema) >= 0.12.29 with php-composer(swaggest/json-schema) < 1) +# remirepo:4 %else -BuildRequires: php-composer(swaggest/json-schema) < 1 -BuildRequires: php-composer(swaggest/json-schema) >= 0.12.29 +BuildRequires: php-swaggest-json-schema < 1 +BuildRequires: php-swaggest-json-schema >= 0.12.29 %endif # For autoloader BuildRequires: php-composer(fedora/autoloader) @@ -129,7 +125,7 @@ EOF export RPM_BUILDROOT=%{buildroot} ret=0 -for cmdarg in "php %{phpunit}" "php72 %{_bindir}/phpunit8" php73 php74 php80; do +for cmdarg in "php %{phpunit}" php74 php80 php81; do if which $cmdarg; then set $cmdarg $1 ${2:-%{_bindir}/phpunit9} --no-coverage --verbose || ret=1 @@ -158,6 +154,9 @@ exit $ret %changelog +* Mon Dec 20 2021 Remi Collet - 1.2.13-1 +- update to 1.2.13 + * Mon Jan 4 2021 Remi Collet - 1.2.12-1 - update to 1.2.12 -- cgit