summaryrefslogtreecommitdiffstats
path: root/php-cs-fixer.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-cs-fixer.spec')
-rw-r--r--php-cs-fixer.spec48
1 files changed, 33 insertions, 15 deletions
diff --git a/php-cs-fixer.spec b/php-cs-fixer.spec
index 3a69da2..6afa4dd 100644
--- a/php-cs-fixer.spec
+++ b/php-cs-fixer.spec
@@ -6,7 +6,7 @@
#
# Please, preserve the changelog entries
#
-%global gh_commit 597745f744bcce1aed59dfd1bb4603de2a06cda9
+%global gh_commit 63661f3add3609e90e4ab8115113e189ae547bb4
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
#global gh_date 20150717
%global gh_owner FriendsOfPHP
@@ -15,7 +15,7 @@
%global with_tests 0%{!?_without_tests:1}
Name: php-cs-fixer
-Version: 2.3.2
+Version: 2.4.0
Release: 1%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist}
Summary: A tool to automatically fix PHP code style
@@ -49,7 +49,9 @@ BuildRequires: php-composer(symfony/finder) >= 3.0
BuildRequires: php-composer(symfony/options-resolver) < 4
BuildRequires: php-composer(symfony/options-resolver) >= 3.0
BuildRequires: php-composer(symfony/polyfill-php70) < 2
-BuildRequires: php-composer(symfony/polyfill-php70) >= 1.3
+BuildRequires: php-composer(symfony/polyfill-php70) >= 1.0
+BuildRequires: php-composer(symfony/polyfill-php72) < 2
+BuildRequires: php-composer(symfony/polyfill-php72) >= 1.4
BuildRequires: php-composer(symfony/process) < 4
BuildRequires: php-composer(symfony/process) >= 3.0
BuildRequires: php-composer(symfony/stopwatch) < 4
@@ -72,9 +74,6 @@ BuildRequires: php-composer(symfony/debug) >= 3.0
# NOTICE: listener disabled during test suite
# "johnkary/phpunit-speedtrap": "^1.1",
# "justinrainbow/json-schema": "^5.0",
-# NOTICE: phpmd not used
-# "mi-schi/phpmd-extension": "^4.2",
-# "phpmd/phpmd": "^2.4.3",
# "phpunit/phpunit": "^4.8.35 || ^5.4.3",
# "satooshi/php-coveralls": "^1.0",
# "symfony/phpunit-bridge": "^3.2"
@@ -83,7 +82,7 @@ BuildRequires: php-composer(justinrainbow/json-schema) >= 5
BuildRequires: php-composer(phpunit/phpunit) >= 4.5
BuildRequires: php-composer(symfony/phpunit-bridge)
# Autoloader
-BuildRequires: php-composer(fedora/autoloader)
+BuildRequires: php-fedora-autoloader-devel
%endif
# From composer.json, "require": {
@@ -99,6 +98,7 @@ BuildRequires: php-composer(fedora/autoloader)
# "symfony/finder": "^3.0",
# "symfony/options-resolver": "^3.0",
# "symfony/polyfill-php70": "^1.0",
+# "symfony/polyfill-php72": "^1.4",
# "symfony/polyfill-xml": "^1.3",
# "symfony/process": "^3.0",
# "symfony/stopwatch": "^3.0"
@@ -123,6 +123,8 @@ Requires: php-composer(symfony/options-resolver) < 4
Requires: php-composer(symfony/options-resolver) >= 3.0
Requires: php-composer(symfony/polyfill-php70) < 2
Requires: php-composer(symfony/polyfill-php70) >= 1.0
+Requires: php-composer(symfony/polyfill-php72) < 2
+Requires: php-composer(symfony/polyfill-php72) >= 1.4
Requires: php-composer(symfony/process) < 4
Requires: php-composer(symfony/process) >= 3.0
Requires: php-composer(symfony/stopwatch) < 4
@@ -132,17 +134,16 @@ Requires: php-composer(symfony/debug) < 4
Requires: php-composer(symfony/debug) >= 3.0
# From composer.json, "suggest": {
# "ext-mbstring": "For handling non-UTF8 characters in cache signature.",
-# "ext-xml": "For better performance.",
# "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible."
Requires: php-mbstring
-Requires: php-xml
-# From phpcompatinfo report for version 2.0.0
+# From phpcompatinfo report for version 2.4.0
Requires: php-cli
Requires: php-reflection
Requires: php-dom
Requires: php-pcre
Requires: php-phar
Requires: php-spl
+Requires: php-xml
# Autoloader
Requires: php-composer(fedora/autoloader)
@@ -164,11 +165,24 @@ projects. This tool does not only detect them, but also fixes them for you.
%patch0 -p1 -b .rpm
find src -name \*rpm -delete -print
-cat << 'EOF' | tee src/autoload.php
-<?php
-/* Autoloader for %{name} and its dependencies */
+# from composer.json, "autoload" / "classmap"
+TESTS="
+ tests/Test/Assert/AssertTokensTrait.php
+ tests/Test/AbstractFixerTestCase.php
+ tests/Test/AbstractIntegrationTestCase.php
+ tests/Test/IntegrationCase.php
+ tests/Test/IntegrationCaseFactory.php
+"
+for i in $TESTS; do
+ mkdir -p src/$(dirname $i)
+ cp -p $i src/$i
+done
+
+
+phpab --template fedora --output src/autoload.php src/tests
+
+cat << 'EOF' | tee -a src/autoload.php
-require_once '%{php_home}/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('PhpCsFixer\\', __DIR__);
\Fedora\Autoloader\Dependencies::required([
'%{php_home}/GeckoPackages/PHPUnit/autoload.php',
@@ -225,7 +239,7 @@ sed -e 's/listeners/nolistener/' phpunit.xml.dist >phpunit.xml
ret=0
for cmd in php php56 php70 php71 php72; do
if which $cmd; then
- $cmd %{_bindir}/phpunit --verbose || ret=1
+ $cmd -d memory_limit=1G %{_bindir}/phpunit --verbose || ret=1
fi
done
exit $ret
@@ -244,6 +258,10 @@ exit $ret
%changelog
+* Thu Aug 3 2017 Remi Collet <remi@remirepo.net> - 2.4.0-1
+- Update to 2.4.0
+- add dependency on symfony/polyfill-php72
+
* Thu May 25 2017 Remi Collet <remi@remirepo.net> - 2.3.2-1
- Update to 2.3.2
- add dependency on gecko-packages/gecko-php-unit