From 159d5eb938d473a6fa94dcf7f83b94c59d960f9b Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 8 Sep 2020 11:03:33 +0200 Subject: v4.2.1 from Fedora --- composer.json | 54 ++++--------------- php-consolidation-annotated-command.spec | 92 +++++++++++++++++--------------- 2 files changed, 61 insertions(+), 85 deletions(-) diff --git a/composer.json b/composer.json index 27e7f7e..79c5ffa 100644 --- a/composer.json +++ b/composer.json @@ -19,24 +19,24 @@ } }, "require": { - "php": ">=5.4.5", - "consolidation/output-formatters": "^3.4", - "psr/log": "^1", - "symfony/console": "^2.8|^3|^4", - "symfony/event-dispatcher": "^2.5|^3|^4", - "symfony/finder": "^2.5|^3|^4" + "php": ">=7.1.3", + "consolidation/output-formatters": "^4.1.1", + "psr/log": "^1|^2", + "symfony/console": "^4.4.8|^5", + "symfony/event-dispatcher": "^4.4.8|^5", + "symfony/finder": "^4.4.8|^5" }, "require-dev": { - "phpunit/phpunit": "^6", - "php-coveralls/php-coveralls": "^1", "g1a/composer-test-scenarios": "^3", - "squizlabs/php_codesniffer": "^2.7" + "php-coveralls/php-coveralls": "^2.2", + "phpunit/phpunit": "^6", + "squizlabs/php_codesniffer": "^3" }, "config": { "optimize-autoloader": true, "sort-packages": true, "platform": { - "php": "7.0.8" + "php": "7.2.28" } }, "scripts": { @@ -64,42 +64,10 @@ "php": "7.1.3" } } - }, - "symfony2": { - "require": { - "symfony/console": "^2.8" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.36" - }, - "remove": [ - "php-coveralls/php-coveralls" - ], - "config": { - "platform": { - "php": "5.4.8" - } - }, - "scenario-options": { - "create-lockfile": "false" - } - }, - "phpunit4": { - "require-dev": { - "phpunit/phpunit": "^4.8.36" - }, - "remove": [ - "php-coveralls/php-coveralls" - ], - "config": { - "platform": { - "php": "5.4.8" - } - } } }, "branch-alias": { - "dev-master": "2.x-dev" + "dev-main": "4.x-dev" } } } diff --git a/php-consolidation-annotated-command.spec b/php-consolidation-annotated-command.spec index eea55ed..8be5648 100644 --- a/php-consolidation-annotated-command.spec +++ b/php-consolidation-annotated-command.spec @@ -2,7 +2,7 @@ # # Fedora spec file for php-consolidation-annotated-command # -# Copyright (c) 2016-2019 Shawn Iwinski +# Copyright (c) 2016-2020 Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT @@ -12,34 +12,43 @@ %global github_owner consolidation %global github_name annotated-command -%global github_version 2.12.0 -%global github_commit 512a2e54c98f3af377589de76c43b24652bcb789 +%global github_version 4.2.1 +%global github_commit ef6b7e662ce2d8b0af9004307bdf26350aad4df1 %global composer_vendor consolidation %global composer_project annotated-command -# "php": ">=5.4.5" -%global php_min_ver 5.4.5 -# "consolidation/output-formatters": "^3.4" -%global consolidation_output_formatters_min_ver 3.4 -%global consolidation_output_formatters_max_ver 4 -# "psr/log": "^1" +# "php": ">=7.1.3" +%global php_min_ver 7.1.3 +# "consolidation/output-formatters": "^4.1.1" +%global consolidation_output_formatters_min_ver 4.1.1 +%global consolidation_output_formatters_max_ver 5.0 +# "psr/log": "^1|^2" # NOTE: Min version not 1.0 because autoloader required +# NOTE: Max version not 3.0 because there is no version 2 at this time %global psr_log_min_ver 1.0.1 %global psr_log_max_ver 2.0 -# "symfony/console": "^2.8|^3|^4" -# "symfony/event-dispatcher": "^2.5|^3|^4" -# "symfony/finder": "^2.5|^3|^4" -%global symfony_min_ver 2.8 -%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -%global symfony_max_ver 5.0 -%else -%global symfony_max_ver 4.0 -%endif +# "symfony/console": "^4.4.8|^5"" +# "symfony/event-dispatcher": "^4.4.8|^5"" +# "symfony/finder": "^4.4.8|^5"" +%global symfony_min_ver 4.4.8 +%global symfony_max_ver 6.0 + +# "phpunit/phpunit": "^6" +%global phpunit_require phpunit6 +%global phpunit_min_ver 6 +%global phpunit_exec phpunit6 # Build using "--without tests" to disable tests %global with_tests 0%{!?_without_tests:1} +# Range dependencies supported? +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +%global with_range_dependencies 1 +%else +%global with_range_dependencies 0 +%endif + %{!?phpdir: %global phpdir %{_datadir}/php} Name: php-%{composer_vendor}-%{composer_project} @@ -60,8 +69,8 @@ BuildArch: noarch %if %{with_tests} ## composer.json BuildRequires: php(language) >= %{php_min_ver} -BuildRequires: php-composer(phpunit/phpunit) -%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires: %{phpunit_require} >= %{phpunit_min_ver} +%if %{with_range_dependencies} BuildRequires: (php-composer(consolidation/output-formatters) >= %{consolidation_output_formatters_min_ver} with php-composer(consolidation/output-formatters) < %{consolidation_output_formatters_max_ver}) BuildRequires: (php-composer(psr/log) >= %{psr_log_min_ver} with php-composer(psr/log) < %{psr_log_max_ver}) BuildRequires: (php-composer(symfony/console) >= %{symfony_min_ver} with php-composer(symfony/console) < %{symfony_max_ver}) @@ -73,11 +82,11 @@ BuildRequires: php-composer(consolidation/output-formatters) >= %{consolidation_ BuildRequires: php-composer(phpunit/phpunit) BuildRequires: php-composer(psr/log) < %{psr_log_max_ver} BuildRequires: php-composer(psr/log) >= %{psr_log_min_ver} -BuildRequires: php-composer(symfony/console) < %{symfony_max_ver} -BuildRequires: php-composer(symfony/event-dispatcher) < %{symfony_max_ver} -BuildRequires: php-composer(symfony/finder) < %{symfony_max_ver} +BuildRequires: php-symfony4-console >= %{symfony_min_ver} +BuildRequires: php-symfony4-event-dispatcher >= %{symfony_min_ver} +BuildRequires: php-symfony4-finder >= %{symfony_min_ver} %endif -## phpcompatinfo (computed from version 2.12.0) +## phpcompatinfo (computed from version 4.2.1) BuildRequires: php-dom BuildRequires: php-pcre BuildRequires: php-reflection @@ -88,7 +97,7 @@ BuildRequires: php-composer(fedora/autoloader) # composer.json Requires: php(language) >= %{php_min_ver} -%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +%if %{with_range_dependencies} Requires: (php-composer(consolidation/output-formatters) >= %{consolidation_output_formatters_min_ver} with php-composer(consolidation/output-formatters) < %{consolidation_output_formatters_max_ver}) Requires: (php-composer(psr/log) >= %{psr_log_min_ver} with php-composer(psr/log) < %{psr_log_max_ver}) Requires: (php-composer(symfony/console) >= %{symfony_min_ver} with php-composer(symfony/console) < %{symfony_max_ver}) @@ -99,11 +108,11 @@ Requires: php-composer(consolidation/output-formatters) < %{consolidation_ Requires: php-composer(consolidation/output-formatters) >= %{consolidation_output_formatters_min_ver} Requires: php-composer(psr/log) < %{psr_log_max_ver} Requires: php-composer(psr/log) >= %{psr_log_min_ver} -Requires: php-composer(symfony/console) < %{symfony_max_ver} -Requires: php-composer(symfony/event-dispatcher) < %{symfony_max_ver} -Requires: php-composer(symfony/finder) < %{symfony_max_ver} +Requires: php-symfony4-console >= %{symfony_min_ver} +Requires: php-symfony4-event-dispatcher >= %{symfony_min_ver} +Requires: php-symfony4-finder >= %{symfony_min_ver} %endif -# phpcompatinfo (computed from version 2.12.0) +# phpcompatinfo (computed from version 4.2.1) Requires: php-dom Requires: php-pcre Requires: php-reflection @@ -140,19 +149,16 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php'; '%{phpdir}/Consolidation/OutputFormatters/autoload.php', '%{phpdir}/Psr/Log/autoload.php', [ + '%{phpdir}/Symfony5/Component/Console/autoload.php', '%{phpdir}/Symfony4/Component/Console/autoload.php', - '%{phpdir}/Symfony3/Component/Console/autoload.php', - '%{phpdir}/Symfony/Component/Console/autoload.php', ], [ + '%{phpdir}/Symfony5/Component/EventDispatcher/autoload.php', '%{phpdir}/Symfony4/Component/EventDispatcher/autoload.php', - '%{phpdir}/Symfony3/Component/EventDispatcher/autoload.php', - '%{phpdir}/Symfony/Component/EventDispatcher/autoload.php', ], [ + '%{phpdir}/Symfony5/Component/Finder/autoload.php', '%{phpdir}/Symfony4/Component/Finder/autoload.php', - '%{phpdir}/Symfony3/Component/Finder/autoload.php', - '%{phpdir}/Symfony/Component/Finder/autoload.php', ] ]); AUTOLOAD @@ -178,18 +184,17 @@ sed 's/function testInteractAndValidate/function SKIP_testInteractAndValidate/' : Update tests if symfony/var-dumper is installed if \ - [ -e '%{phpdir}/Symfony4/Component/VarDumper/autoload.php' ] \ - || [ -e '%{phpdir}/Symfony3/Component/VarDumper/autoload.php' ] \ - || [ -e '%{phpdir}/Symfony/Component/VarDumper/autoload.php' ] + [ $(php -r 'require_once __DIR__."/bootstrap.php"; echo class_exists("Symfony\\Component\\VarDumper\\VarDumper") ? 1 : 0;') -eq 1 ] then - grep -r --files-with-matches ',var_export' tests | xargs sed -i 's/,var_export/,var_dump,var_export/g' + grep -r --files-with-matches --null ',var_export' tests | xargs -0 sed -i 's/,var_export/,var_dump,var_export/g' fi : Upstream tests RETURN_CODE=0 -for PHP_EXEC in php %{?rhel:php55 php56 php70} php71 php72 php73 php74; do - if [ "php" == "$PHP_EXEC" ] || which $PHP_EXEC; then - $PHP_EXEC %{_bindir}/phpunit --verbose --bootstrap bootstrap.php \ +PHPUNIT=$(which %{phpunit_exec}) +for PHP_EXEC in "" php72 php73 php74; do + if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then + $PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \ || RETURN_CODE=1 fi done @@ -209,6 +214,9 @@ exit $RETURN_CODE %changelog +* Mon Sep 07 2020 Shawn Iwinski - 4.2.1-1 +- Update to 4.2.1 (RHBZ #1850389) + * Sat Jun 01 2019 Shawn Iwinski - 2.12.0-1 - Update to 2.12.0 (RHBZ #1582689) -- cgit