summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json40
-rw-r--r--php-consolidation-output-formatters.spec37
2 files changed, 61 insertions, 16 deletions
diff --git a/composer.json b/composer.json
index adaba21..604b44c 100644
--- a/composer.json
+++ b/composer.json
@@ -24,25 +24,49 @@
"symfony/finder": "^2.5|^3|^4"
},
"require-dev": {
- "phpunit/phpunit": "^4.8",
- "satooshi/php-coveralls": "^1.0.2 | dev-master",
+ "g-1-a/composer-test-scenarios": "^2",
+ "satooshi/php-coveralls": "^2",
+ "phpunit/phpunit": "^5.7.27",
"squizlabs/php_codesniffer": "^2.7",
+ "symfony/console": "3.2.3",
+ "symfony/var-dumper": "^2.8|^3|^4",
"victorjonsson/markdowndocs": "^1.3"
},
+ "suggest": {
+ "symfony/var-dumper": "For using the var_dump formatter"
+ },
+ "config": {
+ "optimize-autoloader": true,
+ "sort-packages": true,
+ "platform": {
+ "php": "5.6.32"
+ }
+ },
"scripts": {
"api": "phpdoc-md generate src > docs/api.md",
"cs": "phpcs --standard=PSR2 -n src",
"cbf": "phpcbf --standard=PSR2 -n src",
- "test": "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"
+ ],
+ "test": [
+ "@lint",
+ "@unit",
+ "@cs"
+ ],
+ "scenario": "scenarios/install",
+ "post-update-cmd": [
+ "create-scenario symfony4 'symfony/console:^4.0' 'phpunit/phpunit:^6' --platform-php '7.1.3'",
+ "create-scenario symfony3 'symfony/console:^3.4' 'symfony/finder:^3.4' 'symfony/var-dumper:^3.4' --platform-php '5.6.32'",
+ "create-scenario symfony2 'symfony/console:^2.8' 'phpunit/phpunit:^4.8.36' --remove 'satooshi/php-coveralls' --platform-php '5.4' --no-lockfile",
+ "dependency-licenses"
+ ]
},
"extra": {
"branch-alias": {
"dev-master": "3.x-dev"
}
- },
- "config": {
- "platform": {
- "php": "5.6"
- }
}
}
diff --git a/php-consolidation-output-formatters.spec b/php-consolidation-output-formatters.spec
index 31ebb83..94be8d1 100644
--- a/php-consolidation-output-formatters.spec
+++ b/php-consolidation-output-formatters.spec
@@ -12,8 +12,8 @@
%global github_owner consolidation-org
%global github_name output-formatters
-%global github_version 3.1.13
-%global github_commit 3188461e965b32148c8fb85261833b2b72d34b8c
+%global github_version 3.2.0
+%global github_commit da889e4bce19f145ca4ec5b1725a946f4eb625a9
%global composer_vendor consolidation
%global composer_project output-formatters
@@ -23,7 +23,7 @@
# "symfony/console": "^2.8|^3|^4"
# "symfony/finder": "^2.5|^3|^4"
%global symfony_min_ver 2.8
-%if 0%{?fedora} >= 27
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
%global symfony_max_ver 5.0
%else
%global symfony_max_ver 4.0
@@ -50,12 +50,14 @@ BuildArch: noarch
## composer.json
BuildRequires: php(language) >= %{php_min_ver}
BuildRequires: php-composer(phpunit/phpunit)
-%if 0%{?fedora} >= 27
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
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})
%else
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}
%endif
## phpcompatinfo (computed from version 3.1.13)
BuildRequires: php-dom
@@ -69,9 +71,9 @@ BuildRequires: php-composer(fedora/autoloader)
# composer.json
Requires: php(language) >= %{php_min_ver}
-%if 0%{?fedora} >= 27
-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})
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+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(symfony/console) < %{symfony_max_ver}
Requires: php-composer(symfony/finder) < %{symfony_max_ver}
@@ -85,6 +87,11 @@ Requires: php-spl
# Autoloader
Requires: php-composer(fedora/autoloader)
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+# Weak dependencies
+Suggests: (php-composer(symfony/var-dumper) >= %{symfony_min_ver} with php-composer(symfony/var-dumper) < %{symfony_max_ver})
+%endif
+
# Composer
Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version}
@@ -122,6 +129,14 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
'%{phpdir}/Symfony/Component/Finder/autoload.php',
],
]);
+
+\Fedora\Autoloader\Dependencies::optional([
+ [
+ '%{phpdir}/Symfony4/Component/VarDumper/autoload.php',
+ '%{phpdir}/Symfony3/Component/VarDumper/autoload.php',
+ '%{phpdir}/Symfony/Component/VarDumper/autoload.php',
+ ],
+]);
AUTOLOAD
@@ -145,7 +160,7 @@ rm -f tests/testAPIDocs.php
: Upstream tests
RETURN_CODE=0
PHPUNIT=$(which phpunit)
-for PHP_EXEC in "" php71 php72; do
+for PHP_EXEC in "" %{?rhel:php55 php56} php70 php71 php72; do
if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
$PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \
|| RETURN_CODE=1
@@ -167,6 +182,12 @@ exit $RETURN_CODE
%changelog
+* Fri Mar 30 2018 Shawn Iwinski <shawn@iwin.ski> - 3.2.0-1
+- Update to 3.2.0 (RHBZ #1505200)
+
+* Fri Mar 30 2018 Shawn Iwinski <shawn@iwin.ski> - 3.1.13-2
+- Update range dependencies' conditional to include RHEL8+
+
* Wed Feb 21 2018 Shawn Iwinski <shawn@iwin.ski> - 3.1.13-1
- Update to 3.1.13 (RHBZ #1505200)
- Add range version dependencies for Fedora >= 27