From 0d42d06f582989713c337ae5d91cac8e63610eb5 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 15 May 2019 16:40:06 +0200 Subject: v0.10.1 from Fedora --- composer.json | 6 ++-- php-stecman-symfony-console-completion.spec | 51 +++++++++++++++++++++-------- 2 files changed, 40 insertions(+), 17 deletions(-) diff --git a/composer.json b/composer.json index 35b75ab..e7af3a7 100644 --- a/composer.json +++ b/composer.json @@ -10,10 +10,10 @@ ], "require": { "php": ">=5.3.2", - "symfony/console": "~2.3 || ~3.0" + "symfony/console": "~2.3 || ~3.0 || ~4.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "~4.8.36 || ~5.7 || ~6.4" }, "autoload": { "psr-4": { @@ -22,7 +22,7 @@ }, "extra": { "branch-alias": { - "dev-master": "0.6.x-dev" + "dev-master": "0.10.x-dev" } } } diff --git a/php-stecman-symfony-console-completion.spec b/php-stecman-symfony-console-completion.spec index 1e90226..9799f5f 100644 --- a/php-stecman-symfony-console-completion.spec +++ b/php-stecman-symfony-console-completion.spec @@ -2,7 +2,7 @@ # # Fedora spec file for php-stecman-symfony-console-completion # -# Copyright (c) 2017 Shawn Iwinski +# Copyright (c) 2017-2019 Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT @@ -12,18 +12,18 @@ %global github_owner stecman %global github_name symfony-console-completion -%global github_version 0.7.0 -%global github_commit 5461d43e53092b3d3b9dbd9d999f2054730f4bbb +%global github_version 0.10.1 +%global github_commit 7bfa9b93e216896419f2f8de659935d7e04fecd8 %global composer_vendor stecman %global composer_project symfony-console-completion # "php": ">=5.3.2" %global php_min_ver 5.3.2 -# "symfony/console": "~2.3 || ~3.0" +# "symfony/console": "~2.3 || ~3.0 || ~4.0" # NOTE: Min version not 2.3 because autoloader required %global symfony_min_ver %{?el6:2.3.31}%{!?el6:2.7.1} -%global symfony_max_ver 4.0 +%global symfony_max_ver 5.0 # Build using "--without tests" to disable tests %global with_tests 0%{!?_without_tests:1} @@ -35,7 +35,6 @@ Version: %{github_version} Release: 2%{?github_release}%{?dist} Summary: Automatic BASH completion for Symfony Console based applications -Group: Development/Libraries License: MIT URL: https://github.com/%{github_owner}/%{github_name} Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz @@ -46,10 +45,14 @@ BuildArch: noarch ## composer.json BuildRequires: php(language) >= %{php_min_ver} BuildRequires: php-composer(phpunit/phpunit) -BuildRequires: php-composer(symfony/console) < %{symfony_max_ver} -BuildRequires: php-composer(symfony/console) >= %{symfony_min_ver} -## phpcompatinfo for version 0.7.0 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires: (php-composer(symfony/console) >= %{symfony_min_ver} with php-composer(symfony/console) < %{symfony_max_ver}) +%else +BuildRequires: php-symfony3-console +%endif +## phpcompatinfo for version 0.10.1 BuildRequires: php-pcre +BuildRequires: php-reflection BuildRequires: php-spl ## Autoloader BuildRequires: php-composer(fedora/autoloader) @@ -57,9 +60,13 @@ BuildRequires: php-composer(fedora/autoloader) # composer.json Requires: php(language) >= %{php_min_ver} +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +Requires: (php-composer(symfony/console) >= %{symfony_min_ver} with php-composer(symfony/console) < %{symfony_max_ver}) +%else Requires: php-composer(symfony/console) < %{symfony_max_ver} Requires: php-composer(symfony/console) >= %{symfony_min_ver} -# phpcompatinfo for version 0.7.0 +%endif +# phpcompatinfo for version 0.10.1 Requires: php-pcre Requires: php-spl # Autoloader @@ -99,6 +106,7 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php'; \Fedora\Autoloader\Dependencies::required(array( array( + '%{phpdir}/Symfony4/Component/Console/autoload.php', '%{phpdir}/Symfony3/Component/Console/autoload.php', '%{phpdir}/Symfony/Component/Console/autoload.php', ), @@ -113,22 +121,30 @@ cp -rp src %{buildroot}%{phpdir}/Stecman/Component/Symfony/Console/BashCompletio %check %if %{with_tests} +: Create tests bootstrap +cat <<'BOOTSTRAP' | tee -a bootstrap.php += 4.4 sed \ -e 's/function testCompleteDoubleDash/function SKIP_testCompleteDoubleDash/' \ -e 's/function testCompleteOptionFull/function SKIP_testCompleteOptionFull/' \ + -e 's/function testCompleteOptionShortcutFirst/function SKIP_testCompleteOptionShortcutFirst/' \ -i tests/Stecman/Component/Symfony/Console/BashCompletion/CompletionHandlerTest.php %endif : Upstream tests RETURN_CODE=0 PHPUNIT=$(which phpunit) -for PHP_EXEC in "" %{?rhel:php54 php55} php56 php70 php71 php72; do +for PHP_EXEC in "" %{?rhel:php54 php55 php56 php70} php71 php72 php73 php74; do if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then - $PHP_EXEC $PHPUNIT --verbose \ - --bootstrap %{buildroot}%{phpdir}/Stecman/Component/Symfony/Console/BashCompletion/autoload.php \ - || RETURN_CODE=1 + $PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php || RETURN_CODE=1 fi done exit $RETURN_CODE @@ -150,6 +166,13 @@ exit $RETURN_CODE %changelog +* Tue May 14 2019 Shawn Iwinski - 0.10.1-2 +- Fix EPEL6 build + +* Tue May 14 2019 Shawn Iwinski - 0.10.1-1 +- Update to 0.10.1 (RHBZ #1562562) +- Add range version dependencies for Fedora >= 27 || RHEL >= 8 + * Fri Nov 03 2017 Shawn Iwinski - 0.7.0-2 - Remove rename of license file -- cgit