From b6e5645ea54873d7db4f3fca9d6c4e3899466fdd Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 8 Sep 2020 10:43:08 +0200 Subject: v2.0.0 from Fedora --- composer.json | 34 ++++++------------- php-consolidation-config.spec | 76 +++++++++++++++++++++++++------------------ 2 files changed, 55 insertions(+), 55 deletions(-) diff --git a/composer.json b/composer.json index f9060cc..70106a4 100644 --- a/composer.json +++ b/composer.json @@ -19,17 +19,18 @@ } }, "require": { - "php": ">=5.4.0", + "php": ">=7.1.3", "dflydev/dot-access-data": "^1.1.0", "grasmash/expander": "^1" }, "require-dev": { - "phpunit/phpunit": "^5", "g1a/composer-test-scenarios": "^3", - "symfony/console": "^2.5|^3|^4", - "symfony/yaml": "^2.8.11|^3|^4", - "php-coveralls/php-coveralls": "^1", - "squizlabs/php_codesniffer": "2.*" + "php-coveralls/php-coveralls": "^2.2", + "phpunit/phpunit": "^6", + "squizlabs/php_codesniffer": "^3", + "symfony/console": "^4|^5", + "symfony/event-dispatcher": "^4|^5", + "symfony/yaml": "^4|^5" }, "suggest": { "symfony/yaml": "Required to use Consolidation\\Config\\Loader\\YamlConfigLoader" @@ -38,7 +39,7 @@ "optimize-autoloader": true, "sort-packages": true, "platform": { - "php": "5.6" + "php": "7.2.28" } }, "scripts": { @@ -59,32 +60,17 @@ "scenarios": { "symfony4": { "require-dev": { - "symfony/console": "^4.0" + "symfony/console": "^4" }, "config": { "platform": { "php": "7.1.3" } } - }, - "symfony2": { - "require-dev": { - "symfony/console": "^2.8", - "symfony/event-dispatcher": "^2.8", - "phpunit/phpunit": "^4.8.36" - }, - "remove": [ - "php-coveralls/php-coveralls" - ], - "config": { - "platform": { - "php": "5.4.8" - } - } } }, "branch-alias": { - "dev-master": "1.x-dev" + "dev-master": "2.x-dev" } } } diff --git a/php-consolidation-config.spec b/php-consolidation-config.spec index 9bd35c7..b24577b 100644 --- a/php-consolidation-config.spec +++ b/php-consolidation-config.spec @@ -2,7 +2,7 @@ # # Fedora spec file for php-consolidation-config # -# Copyright (c) 2017-2019 Shawn Iwinski +# Copyright (c) 2017-2020 Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT @@ -12,30 +12,40 @@ %global github_owner consolidation %global github_name config -%global github_version 1.2.1 -%global github_commit cac1279bae7efb5c7fb2ca4c3ba4b8eb741a96c1 +%global github_version 2.0.0 +%global github_commit 9842670aad3406dbc8df3069fd680a9f8cd6edd7 %global composer_vendor consolidation %global composer_project config -# "php": ">=5.4.0" -%global php_min_ver 5.4.0 +# "php": ">=7.1.3" +%global php_min_ver 7.1.3 # "dflydev/dot-access-data": "^1.1.0" %global dflydev_dot_access_data_min_ver 1.1.0 %global dflydev_dot_access_data_max_ver 2.0 # "grasmash/expander": "^1" %global grasmash_expander_min_ver 1.0 %global grasmash_expander_max_ver 2.0 -# "symfony/console": "^2.5|^3|^4" -# "symfony/yaml": "^2.8.11|^3|^4" -%global symfony_min_ver 2.8.11 +# "symfony/console": "^4|^5" +# "symfony/event-dispatcher": "^4|^5" +# "symfony/yaml": "^4|^5" +%global symfony_min_ver 4.0 +%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 symfony_max_ver 5.0 +%global with_range_dependencies 1 %else -%global symfony_max_ver 4 +%global with_range_dependencies 0 %endif -# Build using "--without tests" to disable tests -%global with_tests 0%{!?_without_tests:1} %{!?phpdir: %global phpdir %{_datadir}/php} @@ -46,15 +56,19 @@ Summary: Provide configuration services for a command-line tool License: MIT URL: https://github.com/%{github_owner}/%{github_name} -Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz + +# GitHub export does not include tests +# Run php-consolidation-config-get-source.sh to create full source +Source0: %{name}-%{github_version}-%{github_commit}.tar.gz +Source1: %{name}-get-source.sh BuildArch: noarch # Tests %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(dflydev/dot-access-data) >= %{dflydev_dot_access_data_min_ver} with php-composer(dflydev/dot-access-data) < %{dflydev_dot_access_data_max_ver}) BuildRequires: (php-composer(grasmash/expander) >= %{grasmash_expander_min_ver} with php-composer(grasmash/expander) < %{grasmash_expander_max_ver}) BuildRequires: (php-composer(symfony/console) >= %{symfony_min_ver} with php-composer(symfony/console) < %{symfony_max_ver}) @@ -66,12 +80,12 @@ BuildRequires: php-composer(dflydev/dot-access-data) < %{dflydev_dot_access_dat BuildRequires: php-composer(dflydev/dot-access-data) >= %{dflydev_dot_access_data_min_ver} BuildRequires: php-composer(grasmash/expander) < %{grasmash_expander_max_ver} BuildRequires: php-composer(grasmash/expander) >= %{grasmash_expander_min_ver} -BuildRequires: php-composer(symfony/console) < %{symfony_max_ver} -BuildRequires: php-composer(symfony/yaml) < %{symfony_max_ver} +BuildRequires: php-symfony4-console >= %{symfony_min_ver} +BuildRequires: php-symfony4-yaml >= %{symfony_min_ver} ### phpcompatinfo -BuildRequires: php-composer(symfony/event-dispatcher) < %{symfony_max_ver} +BuildRequires: php-symfony4-event-dispatcher >= %{symfony_min_ver} %endif -## phpcompatinfo for version 1.2.1 +## phpcompatinfo for version 2.0.0 BuildRequires: php-json BuildRequires: php-pcre BuildRequires: php-reflection @@ -82,7 +96,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(dflydev/dot-access-data) >= %{dflydev_dot_access_data_min_ver} with php-composer(dflydev/dot-access-data) < %{dflydev_dot_access_data_max_ver}) Requires: (php-composer(grasmash/expander) >= %{grasmash_expander_min_ver} with php-composer(grasmash/expander) < %{grasmash_expander_max_ver}) ## phpcompatinfo @@ -96,10 +110,10 @@ Requires: php-composer(dflydev/dot-access-data) >= %{dflydev_dot_access_dat Requires: php-composer(grasmash/expander) < %{grasmash_expander_max_ver} Requires: php-composer(grasmash/expander) >= %{grasmash_expander_min_ver} ## phpcompatinfo -Requires: php-composer(symfony/console) < %{symfony_max_ver} -Requires: php-composer(symfony/event-dispatcher) < %{symfony_max_ver} +Requires: php-symfony4-console >= %{symfony_min_ver} +Requires: php-symfony4-event-dispatcher >= %{symfony_min_ver} %endif -# phpcompatinfo for version 1.2.1 +# phpcompatinfo for version 2.0.0 Requires: php-pcre Requires: php-spl # Autoloader @@ -146,22 +160,19 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php'; '%{phpdir}/Dflydev/DotAccessData/autoload.php', '%{phpdir}/Grasmash/Expander/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', ], ]); \Fedora\Autoloader\Dependencies::optional([ [ + '%{phpdir}/Symfony5/Component/Yaml/autoload.php', '%{phpdir}/Symfony4/Component/Yaml/autoload.php', - '%{phpdir}/Symfony3/Component/Yaml/autoload.php', - '%{phpdir}/Symfony/Component/Yaml/autoload.php', ] ]); AUTOLOAD @@ -184,8 +195,8 @@ BOOTSTRAP : Upstream tests RETURN_CODE=0 -PHPUNIT=$(which phpunit) -for PHP_EXEC in "" php70 php71 php72 php73 php74; do +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 @@ -206,6 +217,9 @@ exit $RETURN_CODE %changelog +* Mon Sep 07 2020 Shawn Iwinski - 2.0.0-1 +- Update to 2.0.0 (RHBZ #1840911) + * Sat Jun 15 2019 Shawn Iwinski - 1.2.1-1 - Update to 1.2.1 (RHBZ #1508224) -- cgit