summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json55
-rw-r--r--php-consolidation-output-formatters.spec89
2 files changed, 63 insertions, 81 deletions
diff --git a/composer.json b/composer.json
index e8d9a04..ca82d7d 100644
--- a/composer.json
+++ b/composer.json
@@ -19,18 +19,18 @@
}
},
"require": {
- "php": ">=5.4.0",
+ "php": ">=7.1.3",
"dflydev/dot-access-data": "^1.1.0",
- "symfony/console": "^2.8|^3|^4",
- "symfony/finder": "^2.5|^3|^4"
+ "symfony/console": "^4|^5",
+ "symfony/finder": "^4|^5"
},
"require-dev": {
"g1a/composer-test-scenarios": "^3",
- "php-coveralls/php-coveralls": "^1",
- "phpunit/phpunit": "^5.7.27",
- "squizlabs/php_codesniffer": "^2.7",
- "symfony/var-dumper": "^2.8|^3|^4",
- "victorjonsson/markdowndocs": "^1.3"
+ "php-coveralls/php-coveralls": "^2.2",
+ "phpunit/phpunit": "^6",
+ "squizlabs/php_codesniffer": "^3",
+ "symfony/var-dumper": "^4",
+ "symfony/yaml": "^4"
},
"suggest": {
"symfony/var-dumper": "For using the var_dump formatter"
@@ -39,11 +39,10 @@
"optimize-autoloader": true,
"sort-packages": true,
"platform": {
- "php": "5.6.32"
+ "php": "7.2.28"
}
},
"scripts": {
- "api": "phpdoc-md generate src > docs/api.md",
"cs": "phpcs --standard=PSR2 -n src",
"cbf": "phpcbf --standard=PSR2 -n src",
"unit": "phpunit --colors=always",
@@ -63,49 +62,15 @@
"require": {
"symfony/console": "^4.0"
},
- "require-dev": {
- "phpunit/phpunit": "^6"
- },
"config": {
"platform": {
"php": "7.1.3"
}
}
- },
- "symfony3": {
- "require": {
- "symfony/console": "^3.4",
- "symfony/finder": "^3.4",
- "symfony/var-dumper": "^3.4"
- },
- "config": {
- "platform": {
- "php": "5.6.32"
- }
- }
- },
- "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"
- }
}
},
"branch-alias": {
- "dev-master": "3.x-dev"
+ "dev-master": "4.x-dev"
}
}
}
diff --git a/php-consolidation-output-formatters.spec b/php-consolidation-output-formatters.spec
index ec945ea..fdc985c 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-2019 Shawn Iwinski <shawn@iwin.ski>
+# Copyright (c) 2016-2020 Shawn Iwinski <shawn@iwin.ski>
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -12,34 +12,44 @@
%global github_owner consolidation
%global github_name output-formatters
-%global github_version 3.5.0
-%global github_commit 99ec998ffb697e0eada5aacf81feebfb13023605
+%global github_version 4.1.1
+%global github_commit 9deeddd6a916d0a756b216a8b40ce1016e17c0b9
%global composer_vendor consolidation
%global composer_project output-formatters
-# "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
-# "symfony/console": "^2.8|^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|^5"
+# "symfony/finder": "^4|^5"
+# "symfony/var-dumper": "^4"
+# "symfony/yaml": "^4"
+%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 with_range_dependencies 1
+%else
+%global with_range_dependencies 0
+%endif
+
%{!?phpdir: %global phpdir %{_datadir}/php}
Name: php-%{composer_vendor}-%{composer_project}
Version: %{github_version}
-Release: 2%{?github_release}%{?dist}
+Release: 1%{?github_release}%{?dist}
Summary: Format text by applying transformations provided by plug-in formatters
License: MIT
@@ -55,20 +65,22 @@ 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(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(symfony/console) >= %{symfony_min_ver} with php-composer(symfony/console) < %{symfony_max_ver})
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})
%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(symfony/console) < %{symfony_max_ver}
-BuildRequires: php-composer(symfony/finder) < %{symfony_max_ver}
-BuildRequires: php-composer(symfony/var-dumper) < %{symfony_max_ver}
+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}
%endif
-## phpcompatinfo (computed from version 3.5.0)
+## phpcompatinfo (computed from version 4.1.1)
BuildRequires: php-dom
BuildRequires: php-json
BuildRequires: php-pcre
@@ -80,17 +92,17 @@ 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(symfony/console) >= %{symfony_min_ver} with php-composer(symfony/console) < %{symfony_max_ver})
Requires: (php-composer(symfony/finder) >= %{symfony_min_ver} with php-composer(symfony/finder) < %{symfony_max_ver})
%else
Requires: php-composer(dflydev/dot-access-data) < %{dflydev_dot_access_data_max_ver}
Requires: php-composer(dflydev/dot-access-data) >= %{dflydev_dot_access_data_min_ver}
-Requires: php-composer(symfony/console) < %{symfony_max_ver}
-Requires: php-composer(symfony/finder) < %{symfony_max_ver}
+Requires: php-symfony4-console >= %{symfony_min_ver}
+Requires: php-symfony4-finder >= %{symfony_min_ver}
%endif
-# phpcompatinfo (computed from version 3.5.0)
+# phpcompatinfo (computed from version 4.1.1)
Requires: php-dom
Requires: php-json
Requires: php-pcre
@@ -99,7 +111,7 @@ Requires: php-spl
# Autoloader
Requires: php-composer(fedora/autoloader)
-%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+%if %{with_range_dependencies}
# Weak dependencies
Suggests: (php-composer(symfony/var-dumper) >= %{symfony_min_ver} with php-composer(symfony/var-dumper) < %{symfony_max_ver})
%endif
@@ -132,22 +144,19 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Dependencies::required([
'%{phpdir}/Dflydev/DotAccessData/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/Finder/autoload.php',
'%{phpdir}/Symfony4/Component/Finder/autoload.php',
- '%{phpdir}/Symfony3/Component/Finder/autoload.php',
- '%{phpdir}/Symfony/Component/Finder/autoload.php',
],
]);
\Fedora\Autoloader\Dependencies::optional([
[
+ '%{phpdir}/Symfony5/Component/VarDumper/autoload.php',
'%{phpdir}/Symfony4/Component/VarDumper/autoload.php',
- '%{phpdir}/Symfony3/Component/VarDumper/autoload.php',
- '%{phpdir}/Symfony/Component/VarDumper/autoload.php',
],
]);
AUTOLOAD
@@ -164,16 +173,21 @@ cp -rp src %{buildroot}%{phpdir}/Consolidation/OutputFormatters
cat <<'BOOTSTRAP' | tee bootstrap.php
<?php
require_once '%{buildroot}%{phpdir}/Consolidation/OutputFormatters/autoload.php';
+
\Fedora\Autoloader\Autoload::addPsr4('Consolidation\\TestUtils\\', __DIR__.'/tests/src');
-BOOTSTRAP
-: Skip API documentation test
-rm -f tests/APIDocsTest.php
+\Fedora\Autoloader\Dependencies::required([
+ [
+ '%{phpdir}/Symfony5/Component/Yaml/autoload.php',
+ '%{phpdir}/Symfony4/Component/Yaml/autoload.php',
+ ],
+]);
+BOOTSTRAP
: Upstream tests
RETURN_CODE=0
-PHPUNIT=$(which phpunit)
-for PHP_EXEC in "" %{?rhel:php55 php56 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
@@ -195,6 +209,9 @@ exit $RETURN_CODE
%changelog
+* Mon Sep 07 2020 Shawn Iwinski <shawn@iwin.ski> - 4.1.1-1
+- Update to 4.1.1 (RHBZ #1851299)
+
* Sat Jun 01 2019 Shawn Iwinski <shawn@iwin.ski> - 3.5.0-2
- Fix sources