summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-10-10 07:50:06 +0200
committerRemi Collet <remi@remirepo.net>2020-10-10 07:50:06 +0200
commitc31c17cb58041835cf81998c560e66c478b2071c (patch)
tree2240705702d84a99c26e8b58942e153754b1498c
parent96504f6966788349b0874e0fa49cb73cc6e42c67 (diff)
update to 3.0.0HEADmaster
raise dependency on PHP 7.1 raise dependency on twig v2 and allow v3 switch to phpunit9
-rw-r--r--composer.json22
-rw-r--r--php-phpmyadmin-twig-i18n-extension.spec45
2 files changed, 43 insertions, 24 deletions
diff --git a/composer.json b/composer.json
index 7ed3e93..0aa7e0c 100644
--- a/composer.json
+++ b/composer.json
@@ -15,12 +15,22 @@
"homepage": "https://www.phpmyadmin.net/team/"
}
],
+ "support": {
+ "issues": "https://github.com/phpmyadmin/twig-i18n-extension/issues",
+ "source": "https://github.com/phpmyadmin/twig-i18n-extension"
+ },
"require": {
- "php": ">=5.5.0",
- "twig/twig": "^1.42.3|^2.0"
+ "php": ">=7.1",
+ "twig/twig": "^1.42.3|^2.0|^3.0"
},
"require-dev": {
- "symfony/phpunit-bridge": "^4.2|^5.0"
+ "phpmyadmin/coding-standard": "^2.0",
+ "phpunit/phpunit": "^7 || ^8 || ^9"
+ },
+ "scripts": {
+ "phpunit": "phpunit",
+ "phpcs": "phpcs",
+ "phpcbf": "phpcbf"
},
"autoload": {
"psr-4": { "PhpMyAdmin\\Twig\\Extensions\\": "src/" }
@@ -28,9 +38,7 @@
"autoload-dev": {
"psr-4": { "PhpMyAdmin\\Tests\\Twig\\Extensions\\": "test/" }
},
- "extra": {
- "branch-alias": {
- "dev-master": "2.0-dev"
- }
+ "config":{
+ "sort-packages": true
}
}
diff --git a/php-phpmyadmin-twig-i18n-extension.spec b/php-phpmyadmin-twig-i18n-extension.spec
index cb8c9c2..8ba175d 100644
--- a/php-phpmyadmin-twig-i18n-extension.spec
+++ b/php-phpmyadmin-twig-i18n-extension.spec
@@ -7,7 +7,7 @@
# Please, preserve the changelog entries
#
-%global gh_commit 00250be43cc33e174077614807025e9e9bfc3171
+%global gh_commit 1f509fa3c3f66551e1f4a346e4477c6c0dc76f9e
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner phpmyadmin
#global gh_date 20150820
@@ -19,7 +19,7 @@
%global major %nil
Name: php-%{gh_owner}-%{gh_project}%{major}
-Version: 2.0.0
+Version: 3.0.0
Release: 1%{?dist}
Summary: Internationalization support for Twig via the gettext library
@@ -29,18 +29,23 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit
BuildArch: noarch
%if %{with_tests}
-BuildRequires: php(language) >= 5.5
+BuildRequires: php(language) >= 7.1
# remirepo:1
%if 0%{?fedora} >= 29 || 0%{?rhel} >= 8
-BuildRequires: (php-composer(twig/twig) >= 1.42.3 with php-composer(twig/twig) < 3)
+BuildRequires: (php-composer(twig/twig) >= 2 with php-composer(twig/twig) < 4)
# For tests, from composer.json "require-dev": {
-# "symfony/phpunit-bridge": "^4.2|^5.0"
-# NOTICE: symfony/phpunit-bridge only used to pull phpunit
+# "phpmyadmin/coding-standard": "^2.0",
+# "phpunit/phpunit": "^7 || ^8 || ^9"
+%if 0%{?fedora} >= 31 || 0%{?rhel} >= 9
+BuildRequires: phpunit9
+%global phpunit %{_bindir}/phpunit9
+%else
BuildRequires: phpunit8
%global phpunit %{_bindir}/phpunit8
+%endif
# remirepo:5
%else
-BuildRequires: php-twig
+BuildRequires: php-twig2
BuildRequires: phpunit
%global phpunit %{_bindir}/phpunit
%endif
@@ -49,17 +54,17 @@ BuildRequires: phpunit
BuildRequires: php-fedora-autoloader-devel
# From composer.json, "require": {
-# "php": ">=5.5.0",
-# "twig/twig": "^1.42.3|^2.0"
-Requires: php(language) >= 5.5
+# "php": ">=7.1",
+# "twig/twig": "^2.0|^3.0"
+Requires: php(language) >= 7.1
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-Requires: (php-composer(twig/twig) >= 1.42.3 with php-composer(twig/twig) < 3)
+Requires: (php-composer(twig/twig) >= 2 with php-composer(twig/twig) < 4)
# remirepo:3
%else
-Requires: php-twig
+Requires: php-twig2
%endif
-# From phpcompatinfo report for 2.0.0
+# From phpcompatinfo report for 3.0.0
# Only Core and standard
# For generated autoloader
Requires: php-composer(fedora/autoloader)
@@ -86,8 +91,8 @@ cat <<'AUTOLOAD' | tee -a src/autoload.php
\Fedora\Autoloader\Dependencies::required(array(
[
+ '%{_datadir}/php/Twig3/autoload.php',
'%{_datadir}/php/Twig2/autoload.php',
- '%{_datadir}/php/Twig/autoload.php',
],
));
AUTOLOAD
@@ -108,12 +113,12 @@ require '%{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}/%{ns_sub}%{major
\Fedora\Autoloader\Autoload::addPsr4('%{ns_vendor}\\Tests\\%{ns_project}\\%{ns_sub}\\', dirname(__DIR__).'/tests');
EOF
-: fix commands
+: upstream test suite
ret=0
-for cmdarg in "php %{phpunit}" php72 php73 php74; do
+for cmdarg in "php %{phpunit}" "php72 %{_bindir}/phpunit8" php73 php74 php80; do
if which $cmdarg; then
set $cmdarg
- $1 ${2:-%{_bindir}/phpunit8} --no-coverage --verbose || ret=1
+ $1 ${2:-%{_bindir}/phpunit9} --no-coverage --verbose || ret=1
fi
done
exit $ret
@@ -134,5 +139,11 @@ exit $ret
%changelog
+* Fri Oct 9 2020 Remi Collet <remi@remirepo.net> - 3.0.0-1
+- update to 3.0.0
+- raise dependency on PHP 7.1
+- raise dependency on twig v2 and allow v3
+- switch to phpunit9
+
* Tue Jan 28 2020 Remi Collet <remi@remirepo.net> - 2.0.0-1
- initial package