summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json51
-rw-r--r--php-phpmyadmin-sql-parser5.spec59
2 files changed, 78 insertions, 32 deletions
diff --git a/composer.json b/composer.json
index 303c3d3..072430d 100644
--- a/composer.json
+++ b/composer.json
@@ -2,7 +2,7 @@
"name": "phpmyadmin/sql-parser",
"description": "A validating SQL lexer and parser with a focus on MySQL dialect.",
"license": "GPL-2.0-or-later",
- "keywords": ["sql", "lexer", "parser", "analysis"],
+ "keywords": ["sql", "lexer", "parser", "analysis", "sql syntax highlighter", "sql lexer", "sql tokenizer", "sql parser", "sql linter", "query linter"],
"homepage": "https://github.com/phpmyadmin/sql-parser",
"authors": [
{
@@ -15,16 +15,24 @@
"issues": "https://github.com/phpmyadmin/sql-parser/issues",
"source": "https://github.com/phpmyadmin/sql-parser"
},
+ "funding": [
+ {
+ "type": "other",
+ "url": "https://www.phpmyadmin.net/donate/"
+ }
+ ],
"require": {
- "php": "^7.1 || ^8.0",
- "symfony/polyfill-mbstring": "^1.3"
+ "php": "^7.2 || ^8.0",
+ "symfony/polyfill-mbstring": "^1.3",
+ "symfony/polyfill-php80": "^1.16"
},
"require-dev": {
+ "phpbench/phpbench": "^1.1",
"phpmyadmin/coding-standard": "^3.0",
"phpmyadmin/motranslator": "^4.0 || ^5.0",
"phpstan/extension-installer": "^1.1",
- "phpstan/phpstan": "^1.2",
- "phpstan/phpstan-phpunit": "^1.0",
+ "phpstan/phpstan": "^1.9.12",
+ "phpstan/phpstan-phpunit": "^1.3.3",
"phpunit/php-code-coverage": "*",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
"psalm/plugin-phpunit": "^0.16.1",
@@ -53,7 +61,36 @@
"PhpMyAdmin\\SqlParser\\Tests\\": "tests"
}
},
- "config":{
- "sort-packages": true
+ "scripts": {
+ "phpcbf": "@php phpcbf",
+ "phpcs": "@php phpcs",
+ "phpstan": "@php phpstan analyse",
+ "psalm": "@php psalm --no-diff",
+ "phpunit": "@php phpunit --color=always",
+ "phpbench": "@php phpbench run tests/benchmarks --report=aggregate",
+ "test": [
+ "@phpcs",
+ "@phpstan",
+ "@psalm",
+ "@phpunit"
+ ],
+ "update:baselines": [
+ "@php phpstan analyse --generate-baseline",
+ "@php psalm --set-baseline=psalm-baseline.xml"
+ ]
+ },
+ "config": {
+ "sort-packages": true,
+ "allow-plugins": {
+ "composer/package-versions-deprecated": true,
+ "dealerdirect/phpcodesniffer-composer-installer": true,
+ "phpstan/extension-installer": true
+ }
+ },
+ "archive": {
+ "exclude": [
+ "/tests",
+ "/phpunit.xml.dist"
+ ]
}
}
diff --git a/php-phpmyadmin-sql-parser5.spec b/php-phpmyadmin-sql-parser5.spec
index 3eea8a5..0136333 100644
--- a/php-phpmyadmin-sql-parser5.spec
+++ b/php-phpmyadmin-sql-parser5.spec
@@ -1,7 +1,7 @@
# remirepo/fedora spec file for php-phpmyadmin-sql-parser5
#
# Copyright (c) 2015-2023 Remi Collet
-# License: CC-BY-SA
+# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
@@ -9,7 +9,7 @@
%bcond_without tests
-%global gh_commit 63f2f77847586864a661ef009ae687dbdda0a9f1
+%global gh_commit 0f5895aab2b6002d00b6831b60983523dea30bff
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner phpmyadmin
#global gh_date 20150820
@@ -19,11 +19,11 @@
%global major 5
Name: php-%{gh_owner}-%{gh_project}%{major}
-Version: 5.6.0
+Version: 5.7.0
Release: 1%{?gh_date?%{gh_date}git%{gh_short}}%{?dist}
Summary: A validating SQL lexer and parser with a focus on MySQL dialect
-License: GPLv2+
+License: GPL-2.0-or-later
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{?gh_short}.tar.gz
@@ -33,16 +33,23 @@ Patch0: %{name}-autoload.patch
BuildArch: noarch
BuildRequires: gettext
%if %{with tests}
-BuildRequires: php(language) >= 7.1
-BuildRequires: php-composer(phpmyadmin/motranslator) >= 3.0
+BuildRequires: php(language) >= 7.2
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+BuildRequires: (php-composer(phpmyadmin/motranslator) >= 5 with php-composer(phpmyadmin/motranslator) < 6)
+BuildRequires: (php-composer(symfony/polyfill-php80) >= 1.16 with php-composer(symfony/polyfill-php80) < 2)
+%else
+BuildRequires: php-phpmyadmin-motranslator5
+BuildRequires: php-symfony-polyfill
+%endif
BuildRequires: php-mbstring
BuildRequires: php-spl
# For tests, from composer.json "require-dev": {
+# "phpbench/phpbench": "^1.1",
# "phpmyadmin/coding-standard": "^3.0",
# "phpmyadmin/motranslator": "^4.0 || ^5.0",
# "phpstan/extension-installer": "^1.1",
-# "phpstan/phpstan": "^1.2",
-# "phpstan/phpstan-phpunit": "^1.0",
+# "phpstan/phpstan": "^1.9.12",
+# "phpstan/phpstan-phpunit": "^1.3.3",
# "phpunit/php-code-coverage": "*",
# "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
# "psalm/plugin-phpunit": "^0.16.1",
@@ -56,15 +63,22 @@ BuildRequires: php-composer(zumba/json-serializer) >= 3.0
BuildRequires: php-composer(fedora/autoloader)
# From composer.json, "require": {
-# "php": "^7.1 || ^8.0",
-# "symfony/polyfill-mbstring": "^1.3"
+# "php": "^7.2 || ^8.0",
+# "symfony/polyfill-mbstring": "^1.3",
+# "symfony/polyfill-php80": "^1.16"
# From composer.json, "conflict": {
# "phpmyadmin/motranslator": "<3.0"
# From composer.json, "suggest": {
# "ext-mbstring": "For best performance",
# "phpmyadmin/motranslator": "Translate messages to your favorite locale"
-Requires: php(language) >= 7.1
-Requires: php-composer(phpmyadmin/motranslator) >= 3.0
+Requires: php(language) >= 7.2
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+Requires: (php-composer(phpmyadmin/motranslator) >= 5 with php-composer(phpmyadmin/motranslator) < 6)
+Requires: (php-composer(symfony/polyfill-php80) >= 1.16 with php-composer(symfony/polyfill-php80) < 2)
+%else
+Requires: php-phpmyadmin-motranslator5
+Requires: php-symfony-polyfill
+%endif
# Mandatory to avoid symfony/polyfill-mbstring
Requires: php-mbstring
# From phpcompatinfo report for 5.0.0
@@ -101,10 +115,8 @@ require_once '%{_datadir}/php/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('%{ns_vendor}\\%{ns_project}\\', __DIR__);
\Fedora\Autoloader\Dependencies::required([
- [
- '%{_datadir}/php/PhpMyAdmin/MoTranslator5/autoload.php',
- '%{_datadir}/php/PhpMyAdmin/MoTranslator/autoload.php',
- ]
+ '%{_datadir}/php/Symfony/Polyfill/autoload.php',
+ '%{_datadir}/php/PhpMyAdmin/MoTranslator5/autoload.php',
]);
AUTOLOAD
@@ -131,9 +143,7 @@ install -Dpm 0755 bin/highlight-query %{buildroot}%{_bindir}/%{name}-highlight-q
install -Dpm 0755 bin/lint-query %{buildroot}%{_bindir}/%{name}-lint-query
install -Dpm 0755 bin/tokenize-query %{buildroot}%{_bindir}/%{name}-tokenize-query
-%if 0%{?fedora} >= 12 || 0%{?rhel} >= 7
%find_lang sqlparser
-%endif
%check
@@ -164,14 +174,8 @@ exit $ret
%endif
-# remirepo:1
-%if 0%{?fedora} >= 12 || 0%{?rhel} >= 7
%files -f sqlparser.lang
-# remirepo:5
-%else
-%files
-%{_datadir}/php/%{ns_vendor}/%{ns_project}%{major}/locale/*/LC_MESSAGES/*.mo
-%endif
+# remirepo:1
%{!?_licensedir:%global license %%doc}
%license LICENSE.txt
%doc composer.json
@@ -193,6 +197,11 @@ exit $ret
%changelog
+* Wed Jan 25 2023 Remi Collet <remi@remirepo.net> - 5.7.0-1
+- update to 5.7.0
+- raise dependency on PHP 7.2
+- add dependency on symfony/polyfill-php80
+
* Tue Jan 3 2023 Remi Collet <remi@remirepo.net> - 5.6.0-1
- update to 5.6.0