summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-03-23 10:41:27 +0100
committerRemi Collet <remi@remirepo.net>2021-03-23 10:41:27 +0100
commit20c33cb8c572af4feba266b1fad0afbdb57503c6 (patch)
tree8465417e3f53801f37c10b18a57a9ceb4f01e00b
parent159d5eb938d473a6fa94dcf7f83b94c59d960f9b (diff)
update to 4.2.4
switch to phpunit9 with yoast/phpunit-polyfills
-rw-r--r--composer.json21
-rw-r--r--php-consolidation-annotated-command.spec47
2 files changed, 34 insertions, 34 deletions
diff --git a/composer.json b/composer.json
index 79c5ffa..0537f68 100644
--- a/composer.json
+++ b/composer.json
@@ -22,15 +22,14 @@
"php": ">=7.1.3",
"consolidation/output-formatters": "^4.1.1",
"psr/log": "^1|^2",
- "symfony/console": "^4.4.8|^5",
+ "symfony/console": "^4.4.8|~5.1.0",
"symfony/event-dispatcher": "^4.4.8|^5",
"symfony/finder": "^4.4.8|^5"
},
"require-dev": {
- "g1a/composer-test-scenarios": "^3",
- "php-coveralls/php-coveralls": "^2.2",
- "phpunit/phpunit": "^6",
- "squizlabs/php_codesniffer": "^3"
+ "phpunit/phpunit": ">=7.5.20",
+ "squizlabs/php_codesniffer": "^3",
+ "yoast/phpunit-polyfills": "^0.2.0"
},
"config": {
"optimize-autoloader": true,
@@ -54,18 +53,6 @@
]
},
"extra": {
- "scenarios": {
- "symfony4": {
- "require": {
- "symfony/console": "^4.0"
- },
- "config": {
- "platform": {
- "php": "7.1.3"
- }
- }
- }
- },
"branch-alias": {
"dev-main": "4.x-dev"
}
diff --git a/php-consolidation-annotated-command.spec b/php-consolidation-annotated-command.spec
index 8be5648..6a3a268 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-2020 Shawn Iwinski <shawn@iwin.ski>
+# Copyright (c) 2016-2021 Shawn Iwinski <shawn@iwin.ski>
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -12,8 +12,8 @@
%global github_owner consolidation
%global github_name annotated-command
-%global github_version 4.2.1
-%global github_commit ef6b7e662ce2d8b0af9004307bdf26350aad4df1
+%global github_version 4.2.4
+%global github_commit ec297e05cb86557671c2d6cbb1bebba6c7ae2c60
%global composer_vendor consolidation
%global composer_project annotated-command
@@ -28,16 +28,19 @@
# 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": "^4.4.8|^5""
+# "symfony/console": "^4.4.8|~5.1.0"
# "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
+# "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}
@@ -76,6 +79,7 @@ BuildRequires: (php-composer(psr/log) >= %{psr_log_min_ver} with php-composer(ps
BuildRequires: (php-composer(symfony/console) >= %{symfony_min_ver} with php-composer(symfony/console) < %{symfony_max_ver})
BuildRequires: (php-composer(symfony/event-dispatcher) >= %{symfony_min_ver} with php-composer(symfony/event-dispatcher) < %{symfony_max_ver})
BuildRequires: (php-composer(symfony/finder) >= %{symfony_min_ver} with php-composer(symfony/finder) < %{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(consolidation/output-formatters) < %{consolidation_output_formatters_max_ver}
BuildRequires: php-composer(consolidation/output-formatters) >= %{consolidation_output_formatters_min_ver}
@@ -85,6 +89,8 @@ BuildRequires: php-composer(psr/log) >= %{psr_log_min_ver}
BuildRequires: php-symfony4-console >= %{symfony_min_ver}
BuildRequires: php-symfony4-event-dispatcher >= %{symfony_min_ver}
BuildRequires: php-symfony4-finder >= %{symfony_min_ver}
+BuildRequires: php-composer(yoast/phpunit-polyfills) < %{polyfills_max_ver}
+BuildRequires: php-composer(yoast/phpunit-polyfills) >= %{polyfills_min_ver}
%endif
## phpcompatinfo (computed from version 4.2.1)
BuildRequires: php-dom
@@ -172,19 +178,20 @@ cp -rp src %{buildroot}%{phpdir}/Consolidation/AnnotatedCommand
%check
%if %{with_tests}
: Create tests bootstrap
-cat <<'BOOTSTRAP' | tee bootstrap.php
+mkdir vendor
+cat <<'BOOTSTRAP' | tee vendor/autoload.php
<?php
require_once '%{buildroot}%{phpdir}/Consolidation/AnnotatedCommand/autoload.php';
-\Fedora\Autoloader\Autoload::addPsr4('Consolidation\\TestUtils\\', __DIR__.'/tests/src');
-BOOTSTRAP
+\Fedora\Autoloader\Autoload::addPsr4('Consolidation\\TestUtils\\', dirname(__DIR__).'/tests/src');
-: Skip test known to fail
-sed 's/function testInteractAndValidate/function SKIP_testInteractAndValidate/' \
- -i tests/AnnotatedCommandFactoryTest.php
+\Fedora\Autoloader\Dependencies::required([
+ '%{phpdir}/Yoast/PHPUnitPolyfills/autoload.php',
+]);
+BOOTSTRAP
: Update tests if symfony/var-dumper is installed
if \
- [ $(php -r 'require_once __DIR__."/bootstrap.php"; echo class_exists("Symfony\\Component\\VarDumper\\VarDumper") ? 1 : 0;') -eq 1 ]
+ [ $(php -r 'require_once __DIR__."/vendor/autoload.php"; echo class_exists("Symfony\\Component\\VarDumper\\VarDumper") ? 1 : 0;') -eq 1 ]
then
grep -r --files-with-matches --null ',var_export' tests | xargs -0 sed -i 's/,var_export/,var_dump,var_export/g'
fi
@@ -192,9 +199,11 @@ fi
: 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 \
+ $PHP_EXEC $PHPUNIT \
+ --filter '^((?!(testInteractAndValidate)).)*$' \
+ --verbose --no-coverage \
|| RETURN_CODE=1
fi
done
@@ -214,6 +223,10 @@ exit $RETURN_CODE
%changelog
+* Tue Mar 23 2021 Remi Collet <remi@remirepo.net> - 4.2.4-1
+- update to 4.2.4
+- switch to phpunit9 with yoast/phpunit-polyfills
+
* Mon Sep 07 2020 Shawn Iwinski <shawn@iwin.ski> - 4.2.1-1
- Update to 4.2.1 (RHBZ #1850389)