diff options
author | Remi Collet <remi@remirepo.net> | 2021-03-23 10:13:32 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2021-03-23 10:13:32 +0100 |
commit | 0e545326950614772d95eb2ced7a68f8cfd3494d (patch) | |
tree | e248e050b8099519ac3c4e07ca7b1ae36a40d22f | |
parent | d141800f2e7669b887316db7dd97193cabacd234 (diff) |
update to 2.0.1
add dependency on psr/log
switch to phpunit9 with yoast/phpunit-polyfills
-rw-r--r-- | composer.json | 37 | ||||
-rw-r--r-- | php-consolidation-config.spec | 54 |
2 files changed, 53 insertions, 38 deletions
diff --git a/composer.json b/composer.json index 70106a4..3f013c3 100644 --- a/composer.json +++ b/composer.json @@ -8,8 +8,8 @@ "email": "greg.1.anderson@greenknowe.org" } ], - "autoload":{ - "psr-4":{ + "autoload": { + "psr-4": { "Consolidation\\Config\\": "src" } }, @@ -21,31 +21,32 @@ "require": { "php": ">=7.1.3", "dflydev/dot-access-data": "^1.1.0", - "grasmash/expander": "^1" + "grasmash/expander": "^1", + "psr/log": "^1.1", + "symfony/event-dispatcher": "^4||^5" }, "require-dev": { - "g1a/composer-test-scenarios": "^3", - "php-coveralls/php-coveralls": "^2.2", - "phpunit/phpunit": "^6", + "phpunit/phpunit": ">=7.5.20", "squizlabs/php_codesniffer": "^3", - "symfony/console": "^4|^5", - "symfony/event-dispatcher": "^4|^5", - "symfony/yaml": "^4|^5" + "symfony/console": "^4||^5", + "symfony/yaml": "^4||^5", + "yoast/phpunit-polyfills": "^0.2.0" }, "suggest": { + "symfony/event-dispatcher": "Required to inject configuration into Command options", "symfony/yaml": "Required to use Consolidation\\Config\\Loader\\YamlConfigLoader" }, "config": { "optimize-autoloader": true, "sort-packages": true, "platform": { - "php": "7.2.28" + "php": "7.4.9" } }, "scripts": { "cs": "phpcs --standard=PSR2 -n src", "cbf": "phpcbf --standard=PSR2 -n src", - "unit": "SHELL_INTERACTIVE=true phpunit --colors=always", + "unit": "phpunit --colors=always", "lint": [ "find src -name '*.php' -print0 | xargs -0 -n1 php -l", "find tests/src -name '*.php' -print0 | xargs -0 -n1 php -l" @@ -57,20 +58,8 @@ ] }, "extra": { - "scenarios": { - "symfony4": { - "require-dev": { - "symfony/console": "^4" - }, - "config": { - "platform": { - "php": "7.1.3" - } - } - } - }, "branch-alias": { - "dev-master": "2.x-dev" + "dev-main": "2.x-dev" } } } diff --git a/php-consolidation-config.spec b/php-consolidation-config.spec index b24577b..28ab466 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-2020 Shawn Iwinski <shawn@iwin.ski> +# Copyright (c) 2017-2021 Shawn Iwinski <shawn@iwin.ski> # # License: MIT # http://opensource.org/licenses/MIT @@ -12,8 +12,8 @@ %global github_owner consolidation %global github_name config -%global github_version 2.0.0 -%global github_commit 9842670aad3406dbc8df3069fd680a9f8cd6edd7 +%global github_version 2.0.1 +%global github_commit 9a2c2a7b2aea1b3525984a4378743a8b74c14e1c %global composer_vendor consolidation %global composer_project config @@ -31,11 +31,17 @@ # "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 +# "psr/log": "^1.1" +%global psrlog_min_ver 1.1 +%global psrlog_max_ver 2 + +# "phpunit/phpunit": ">=7.5.20" +%global phpunit_require phpunit9 +%global phpunit_min_ver 9 +%global phpunit_exec phpunit9 +# "yoast/phpunit-polyfills": "^0.2.0" +%global polyfills_min_ver 0.2 +%global polyfills_max_ver 1 # Build using "--without tests" to disable tests %global with_tests 0%{!?_without_tests:1} @@ -71,19 +77,25 @@ 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(psr/log) >= %{psrlog_min_ver} with php-composer(psr/log) < %{psrlog_max_ver}) BuildRequires: (php-composer(symfony/console) >= %{symfony_min_ver} with php-composer(symfony/console) < %{symfony_max_ver}) BuildRequires: (php-composer(symfony/yaml) >= %{symfony_min_ver} with php-composer(symfony/yaml) < %{symfony_max_ver}) ### phpcompatinfo BuildRequires: (php-composer(symfony/event-dispatcher) >= %{symfony_min_ver} with php-composer(symfony/event-dispatcher) < %{symfony_max_ver}) +BuildRequires: (php-composer(yoast/phpunit-polyfills) >= %{polyfills_min_ver} with php-composer(yoast/phpunit-polyfills) < %{polyfills_max_ver}) %else BuildRequires: php-composer(dflydev/dot-access-data) < %{dflydev_dot_access_data_max_ver} 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(psr/log) < %{psrlog_max_ver} +BuildRequires: php-composer(psr/log) >= %{psrlog_min_ver} BuildRequires: php-symfony4-console >= %{symfony_min_ver} BuildRequires: php-symfony4-yaml >= %{symfony_min_ver} ### phpcompatinfo BuildRequires: php-symfony4-event-dispatcher >= %{symfony_min_ver} +BuildRequires: php-composer(yoast/phpunit-polyfills) < %{polyfills_max_ver} +BuildRequires: php-composer(yoast/phpunit-polyfills) >= %{polyfills_min_ver} %endif ## phpcompatinfo for version 2.0.0 BuildRequires: php-json @@ -99,9 +111,10 @@ Requires: php(language) >= %{php_min_ver} %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}) +Requires: (php-composer(psr/log) >= %{psrlog_min_ver} with php-composer(psr/log) < %{psrlog_max_ver}) +Requires: (php-composer(symfony/event-dispatcher) >= %{symfony_min_ver} with php-composer(symfony/event-dispatcher) < %{symfony_max_ver}) ## phpcompatinfo Requires: (php-composer(symfony/console) >= %{symfony_min_ver} with php-composer(symfony/console) < %{symfony_max_ver}) -Requires: (php-composer(symfony/event-dispatcher) >= %{symfony_min_ver} with php-composer(symfony/event-dispatcher) < %{symfony_max_ver}) ## suggest (weak dependencies) Recommends: php-composer(symfony/yaml) %else @@ -109,9 +122,11 @@ Requires: php-composer(dflydev/dot-access-data) < %{dflydev_dot_access_dat Requires: php-composer(dflydev/dot-access-data) >= %{dflydev_dot_access_data_min_ver} Requires: php-composer(grasmash/expander) < %{grasmash_expander_max_ver} Requires: php-composer(grasmash/expander) >= %{grasmash_expander_min_ver} +Requires: php-composer(psr/log) < %{psrlog_max_ver} +Requires: php-composer(psr/log) >= %{psrlog_min_ver} +Requires: php-symfony4-event-dispatcher >= %{symfony_min_ver} ## phpcompatinfo Requires: php-symfony4-console >= %{symfony_min_ver} -Requires: php-symfony4-event-dispatcher >= %{symfony_min_ver} %endif # phpcompatinfo for version 2.0.0 Requires: php-pcre @@ -159,6 +174,7 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php'; \Fedora\Autoloader\Dependencies::required([ '%{phpdir}/Dflydev/DotAccessData/autoload.php', '%{phpdir}/Grasmash/Expander/autoload.php', + '%{phpdir}/Psr/Log/autoload.php', [ '%{phpdir}/Symfony5/Component/Console/autoload.php', '%{phpdir}/Symfony4/Component/Console/autoload.php', @@ -186,19 +202,24 @@ cp -rp src %{buildroot}%{phpdir}/Consolidation/Config %check %if %{with_tests} : Create tests bootstrap -cat <<'BOOTSTRAP' | tee bootstrap.php +mkdir vendor +cat <<'BOOTSTRAP' | tee vendor/autoload.php <?php require '%{buildroot}%{phpdir}/Consolidation/Config/autoload.php'; -\Fedora\Autoloader\Autoload::addPsr4('Consolidation\\TestUtils\\', __DIR__.'/tests/src'); +\Fedora\Autoloader\Autoload::addPsr4('Consolidation\\TestUtils\\', dirname(__DIR__).'/tests/src'); + +\Fedora\Autoloader\Dependencies::required([ + '%{phpdir}/Yoast/PHPUnitPolyfills/autoload.php', +]); BOOTSTRAP : Upstream tests RETURN_CODE=0 PHPUNIT=$(which %{phpunit_exec}) -for PHP_EXEC in "" php72 php73 php74; do +for PHP_EXEC in "" php73 php74 php80; do if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then - $PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php || RETURN_CODE=1 + $PHP_EXEC $PHPUNIT --verbose --no-coverage || RETURN_CODE=1 fi done exit $RETURN_CODE @@ -217,6 +238,11 @@ exit $RETURN_CODE %changelog +* Tue Mar 23 2021 Remi Collet <remi@remirepo.net> - 2.0.1-1 +- update to 2.0.1 +- add dependency on psr/log +- switch to phpunit9 with yoast/phpunit-polyfills + * Mon Sep 07 2020 Shawn Iwinski <shawn@iwin.ski> - 2.0.0-1 - Update to 2.0.0 (RHBZ #1840911) |