From 8231479b49c2b0debf3cdc6446f6cea2481902dd Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 9 Oct 2020 12:24:52 +0200 Subject: update to 5.4.0 switch to phpunit9 --- composer.json | 6 +++--- php-phpmyadmin-sql-parser5.spec | 31 +++++++++++++++++++++---------- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/composer.json b/composer.json index d537efd..c395b62 100644 --- a/composer.json +++ b/composer.json @@ -20,11 +20,11 @@ "symfony/polyfill-mbstring": "^1.3" }, "require-dev": { - "phpmyadmin/coding-standard": "^1.0", + "phpmyadmin/coding-standard": "^2.0", "phpmyadmin/motranslator": "^4.0 || ^5.0", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.3", - "phpstan/phpstan-phpunit": "^0.12.1", + "phpstan/phpstan": "^0.12.40", + "phpstan/phpstan-phpunit": "^0.12.16", "phpunit/php-code-coverage": "*", "phpunit/phpunit": "^7.4 || ^8 || ^9" }, diff --git a/php-phpmyadmin-sql-parser5.spec b/php-phpmyadmin-sql-parser5.spec index 873a453..1931c17 100644 --- a/php-phpmyadmin-sql-parser5.spec +++ b/php-phpmyadmin-sql-parser5.spec @@ -7,18 +7,19 @@ # Please, preserve the changelog entries # -%global gh_commit 11457e9bbedc182b48c04db3a2621d17b58b0808 +%bcond_without tests + +%global gh_commit 6c597821433d9dfbc796f105149614f802a25a4e %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner phpmyadmin #global gh_date 20150820 %global gh_project sql-parser -%global with_tests 0%{!?_without_tests:1} %global ns_vendor PhpMyAdmin %global ns_project SqlParser %global major 5 Name: php-%{gh_owner}-%{gh_project}%{major} -Version: 5.3.1 +Version: 5.4.0 Release: 1%{?gh_date?%{gh_date}git%{gh_short}}%{?dist} Summary: A validating SQL lexer and parser with a focus on MySQL dialect @@ -31,22 +32,27 @@ Patch0: %{name}-autoload.patch BuildArch: noarch BuildRequires: gettext -%if %{with_tests} +%if %{with tests} BuildRequires: php(language) >= 7.1 BuildRequires: php-composer(phpmyadmin/motranslator) >= 3.0 BuildRequires: php-mbstring BuildRequires: php-spl # For tests, from composer.json "require-dev": { -# "phpmyadmin/coding-standard": "^1.0", +# "phpmyadmin/coding-standard": "^2.0", # "phpmyadmin/motranslator": "^4.0 || ^5.0", # "phpstan/extension-installer": "^1.0", -# "phpstan/phpstan": "^0.12.3", -# "phpstan/phpstan-phpunit": "^0.12.1", +# "phpstan/phpstan": "^0.12.40", +# "phpstan/phpstan-phpunit": "^0.12.16", # "phpunit/php-code-coverage": "*", # "phpunit/phpunit": "^7.4 || ^8 || 9" +%if 0%{?fedora} >= 31 || 0%{?rhel} >= 9 +BuildRequires: phpunit9 +%global phpunit %{_bindir}/phpunit9 +%else BuildRequires: phpunit8 %global phpunit %{_bindir}/phpunit8 %endif +%endif # For autoloader BuildRequires: php-composer(fedora/autoloader) @@ -132,7 +138,7 @@ install -Dpm 0755 bin/tokenize-query %{buildroot}%{_bindir}/%{name}-tokenize-qu %check -%if %{with_tests} +%if %{with tests} mkdir vendor cat << 'EOF' | tee vendor/autoload.php - 5.4.0-1 +- update to 5.4.0 +- switch to phpunit9 + * Sat Mar 21 2020 Remi Collet - 5.3.1-1 - update to 5.3.1 -- cgit