diff options
author | Remi Collet <remi@remirepo.net> | 2017-12-18 07:33:48 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2017-12-18 07:33:48 +0100 |
commit | b22306d981b3c5d04f691ccf34ae31941d76ce82 (patch) | |
tree | ae6ba67a3412a57376a7beb851ba3364e9cea095 | |
parent | 945f7e871b9b32b8d61fc0ef86298df040e2c091 (diff) |
Update to 3.4
allow Symfony 4 on F27+
use phpunit6 on F26+
-rw-r--r-- | composer.json | 10 | ||||
-rw-r--r-- | php-phpmyadmin-motranslator.spec | 38 |
2 files changed, 35 insertions, 13 deletions
diff --git a/composer.json b/composer.json index bed82bf..37712f2 100644 --- a/composer.json +++ b/composer.json @@ -17,15 +17,21 @@ }, "require": { "php": ">=5.3.0", - "symfony/expression-language": "^3.2 || ^2.8" + "symfony/expression-language": "^4.0 || ^3.2 || ^2.8" }, "require-dev": { + "apigen/apigen": "^4.1", "phpunit/php-code-coverage": "*", - "phpunit/phpunit": "~4.8 || ~5.7" + "phpunit/phpunit": "~4.8 || ~5.7 || ~6.5" }, "autoload": { "psr-4": { "PhpMyAdmin\\MoTranslator\\": "src" } + }, + "autoload-dev": { + "psr-4": { + "PhpMyAdmin\\MoTranslator\\Tests\\": "tests" + } } } diff --git a/php-phpmyadmin-motranslator.spec b/php-phpmyadmin-motranslator.spec index 8f730c5..cac5254 100644 --- a/php-phpmyadmin-motranslator.spec +++ b/php-phpmyadmin-motranslator.spec @@ -7,7 +7,7 @@ # Please, preserve the changelog entries # -%global gh_commit 877f76827fa69bf27e4ffc28d258e9fba3442d8f +%global gh_commit d4190a4976c80c221aebd5208ae546dbfb5f8147 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner phpmyadmin %global gh_project motranslator @@ -15,8 +15,14 @@ %global ns_vendor PhpMyAdmin %global ns_project MoTranslator +%if 0%{?fedora} >= 27 +%global sym_max_ver 5 +%else +%global sym_max_ver 4 +%endif + Name: php-%{gh_owner}-%{gh_project} -Version: 3.3 +Version: 3.4 Release: 1%{?dist} Summary: Translation API for PHP using Gettext MO files @@ -29,21 +35,24 @@ BuildArch: noarch %if %{with_tests} BuildRequires: php(language) >= 5.3 BuildRequires: php-pcre -BuildRequires: php-composer(symfony/expression-language) < 4 -BuildRequires: php-composer(symfony/expression-language) >= 2.8 +BuildRequires: php-composer(symfony/expression-language) < %{sym_max_ver} # For tests, from composer.json "require-dev": { # "phpunit/php-code-coverage": "*", -# "phpunit/phpunit": "~4.8 || ~5.7" -BuildRequires: php-composer(phpunit/phpunit) >= 4.8 +# "phpunit/phpunit": "~4.8 || ~5.7 || ~6.5" +%if 0%{?fedora} >= 26 +%global phpunit %{_bindir}/phpunit6 +%else +%global phpunit %{_bindir}/phpunit +%endif +BuildRequires: %{phpunit} %endif # For autoloader BuildRequires: php-composer(fedora/autoloader) # From composer.json, "require": { # "php": ">=5.3.0", -# "symfony/expression-language": "^3.2 || ^2.8" -Requires: php-composer(symfony/expression-language) < 4 -Requires: php-composer(symfony/expression-language) >= 2.8 +# "symfony/expression-language": ""^4.0 || ^3.2 || ^2.8" +Requires: php-composer(symfony/expression-language) < %{sym_max_ver} Requires: php(language) >= 5.3 # From phpcompatinfo report for 1.2 Requires: php-pcre @@ -86,6 +95,7 @@ require_once '%{_datadir}/php/Fedora/Autoloader/autoload.php'; \Fedora\Autoloader\Autoload::addPsr4('%{ns_vendor}\\%{ns_project}\\', __DIR__); \Fedora\Autoloader\Dependencies::required(array(array( + '%{_datadir}/php/Symfony4/Component/ExpressionLanguage/autoload.php', '%{_datadir}/php/Symfony3/Component/ExpressionLanguage/autoload.php', '%{_datadir}/php/Symfony/Component/ExpressionLanguage/autoload.php', ))); @@ -107,9 +117,10 @@ require '%{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}/autoload.php'; EOF ret=0 -for cmd in php php56 php70 php71 php72; do +for cmd in "php %{phpunit}" "php56 %{_bindir}/phpunit" php70 php71 php72; do if which $cmd; then - $cmd %{_bindir}/phpunit --no-coverage --verbose || ret=1 + set $cmd + $1 ${2:-%{_bindir}/phpunit6} --no-coverage --verbose || ret=1 fi done exit $ret @@ -128,6 +139,11 @@ exit $ret %changelog +* Mon Dec 18 2017 Remi Collet <remi@remirepo.net> - 3.4-1 +- Update to 3.4 +- allow Symfony 4 on F27+ +- use phpunit6 on F26+ + * Fri Jun 2 2017 Remi Collet <remi@remirepo.net> - 3.3-1 - Update to 3.3 |