summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-03-23 09:57:22 +0100
committerRemi Collet <remi@remirepo.net>2021-03-23 09:57:22 +0100
commitffaa9d788ca58ec3a00c0d5a153d073e03cc758d (patch)
tree766244cc8a5fb514ab5893f62a7d2bfad5447d1f
parent8dfe8fa9181d07cf44c87825d63ecb5767415b7d (diff)
update to 4.1.2
switch to phpunit9 with yoast/phpunit-polyfills
-rw-r--r--composer.json22
-rw-r--r--php-consolidation-output-formatters.spec38
2 files changed, 31 insertions, 29 deletions
diff --git a/composer.json b/composer.json
index ca82d7d..1b1a198 100644
--- a/composer.json
+++ b/composer.json
@@ -25,12 +25,12 @@
"symfony/finder": "^4|^5"
},
"require-dev": {
- "g1a/composer-test-scenarios": "^3",
- "php-coveralls/php-coveralls": "^2.2",
- "phpunit/phpunit": "^6",
+ "php-coveralls/php-coveralls": "^2.4.2",
"squizlabs/php_codesniffer": "^3",
"symfony/var-dumper": "^4",
- "symfony/yaml": "^4"
+ "symfony/yaml": "^4",
+ "phpunit/phpunit": ">=7",
+ "yoast/phpunit-polyfills": "^0.2.0"
},
"suggest": {
"symfony/var-dumper": "For using the var_dump formatter"
@@ -57,20 +57,8 @@
]
},
"extra": {
- "scenarios": {
- "symfony4": {
- "require": {
- "symfony/console": "^4.0"
- },
- "config": {
- "platform": {
- "php": "7.1.3"
- }
- }
- }
- },
"branch-alias": {
- "dev-master": "4.x-dev"
+ "dev-main": "4.x-dev"
}
}
}
diff --git a/php-consolidation-output-formatters.spec b/php-consolidation-output-formatters.spec
index fdc985c..ad3f3f5 100644
--- a/php-consolidation-output-formatters.spec
+++ b/php-consolidation-output-formatters.spec
@@ -2,7 +2,7 @@
#
# Fedora spec file for php-consolidation-output-formatters
#
-# 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 output-formatters
-%global github_version 4.1.1
-%global github_commit 9deeddd6a916d0a756b216a8b40ce1016e17c0b9
+%global github_version 4.1.2
+%global github_commit 5821e6ae076bf690058a4de6c94dce97398a69c9
%global composer_vendor consolidation
%global composer_project output-formatters
@@ -28,12 +28,17 @@
# "symfony/var-dumper": "^4"
# "symfony/yaml": "^4"
%global symfony_min_ver 4.0
-%global symfony_max_ver 6.0
+# v6 not suported for all components
+%global symfony_max_ver 5
-# "phpunit/phpunit": "^6"
-%global phpunit_require phpunit6
-%global phpunit_min_ver 6
-%global phpunit_exec phpunit6
+# "phpunit/phpunit": ">=7"
+%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}
@@ -72,6 +77,7 @@ BuildRequires: (php-composer(symfony/console) >= %{symfony_min_ver} with php-com
BuildRequires: (php-composer(symfony/finder) >= %{symfony_min_ver} with php-composer(symfony/finder) < %{symfony_max_ver})
BuildRequires: (php-composer(symfony/var-dumper) >= %{symfony_min_ver} with php-composer(symfony/var-dumper) < %{symfony_max_ver})
BuildRequires: (php-composer(symfony/yaml) >= %{symfony_min_ver} with php-composer(symfony/yaml) < %{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}
@@ -79,6 +85,8 @@ BuildRequires: php-symfony4-console >= %{symfony_min_ver}
BuildRequires: php-symfony4-finder >= %{symfony_min_ver}
BuildRequires: php-symfony4-var-dumper >= %{symfony_min_ver}
BuildRequires: php-symfony4-yaml >= %{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.1.1)
BuildRequires: php-dom
@@ -170,26 +178,28 @@ cp -rp src %{buildroot}%{phpdir}/Consolidation/OutputFormatters
%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/OutputFormatters/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}/Symfony5/Component/Yaml/autoload.php',
'%{phpdir}/Symfony4/Component/Yaml/autoload.php',
],
+ '%{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 \
+ $PHP_EXEC $PHPUNIT --verbose --no-coverage \
|| RETURN_CODE=1
fi
done
@@ -209,6 +219,10 @@ exit $RETURN_CODE
%changelog
+* Tue Mar 23 2021 Remi Collet <remi@remirepo.net> - 4.1.2-1
+- update to 4.1.2
+- switch to phpunit9 with yoast/phpunit-polyfills
+
* Mon Sep 07 2020 Shawn Iwinski <shawn@iwin.ski> - 4.1.1-1
- Update to 4.1.1 (RHBZ #1851299)