summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-08-03 13:16:11 +0200
committerRemi Collet <remi@remirepo.net>2017-08-03 13:16:11 +0200
commitdc4e9a97808a996584fbbadd760245c7c2720e17 (patch)
treef430f90d14dd1499ff35927e2ab096ee2745c9f1
parentf85d1f0ad83fa2aa5f35dc42690486856b9d35b0 (diff)
v2.2.5
-rw-r--r--composer.json11
-rw-r--r--php-cs-fixer-autoload.patch29
-rw-r--r--php-cs-fixer.spec47
3 files changed, 57 insertions, 30 deletions
diff --git a/composer.json b/composer.json
index 523f0fd..979b2f5 100644
--- a/composer.json
+++ b/composer.json
@@ -28,7 +28,7 @@
"symfony/polyfill-php54": "^1.0",
"symfony/polyfill-php55": "^1.3",
"symfony/polyfill-php70": "^1.0",
- "symfony/polyfill-xml": "^1.3",
+ "symfony/polyfill-php72": "^1.4",
"symfony/process": "^2.3 || ^3.0",
"symfony/stopwatch": "^2.5 || ^3.0"
},
@@ -41,7 +41,6 @@
},
"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."
},
"conflict": {
@@ -51,7 +50,13 @@
"sort-packages": true
},
"autoload": {
- "psr-4": { "PhpCsFixer\\": "src/" }
+ "psr-4": { "PhpCsFixer\\": "src/" },
+ "classmap": [
+ "tests/Test/AbstractFixerTestCase.php",
+ "tests/Test/AbstractIntegrationTestCase.php",
+ "tests/Test/IntegrationCase.php",
+ "tests/Test/IntegrationCaseFactory.php"
+ ]
},
"autoload-dev": {
"psr-4": { "PhpCsFixer\\Tests\\": "tests/" }
diff --git a/php-cs-fixer-autoload.patch b/php-cs-fixer-autoload.patch
index c411290..d8797f1 100644
--- a/php-cs-fixer-autoload.patch
+++ b/php-cs-fixer-autoload.patch
@@ -1,6 +1,6 @@
diff -up ./php-cs-fixer.rpm ./php-cs-fixer
---- ./php-cs-fixer.rpm 2017-05-25 07:12:21.000000000 +0200
-+++ ./php-cs-fixer 2017-05-25 07:51:43.642438002 +0200
+--- ./php-cs-fixer.rpm 2017-08-03 12:19:28.000000000 +0200
++++ ./php-cs-fixer 2017-08-03 13:03:17.794166301 +0200
@@ -42,12 +42,7 @@ set_error_handler(function ($severity, $
}
});
@@ -16,25 +16,28 @@ diff -up ./php-cs-fixer.rpm ./php-cs-fixer
use PhpCsFixer\Console\Application;
diff -up ./src/Console/Command/HelpCommand.php.rpm ./src/Console/Command/HelpCommand.php
---- ./src/Console/Command/HelpCommand.php.rpm 2017-05-25 08:09:15.037812996 +0200
-+++ ./src/Console/Command/HelpCommand.php 2017-05-25 08:11:00.701454099 +0200
-@@ -338,6 +338,8 @@ EOF
- return $version;
- }
+--- ./src/Console/Command/HelpCommand.php.rpm 2017-08-03 13:03:17.794166301 +0200
++++ ./src/Console/Command/HelpCommand.php 2017-08-03 13:04:12.930466672 +0200
+@@ -343,6 +343,8 @@ EOF
+ {
+ static $version = null;
+ return Application::VERSION;
+
- $currentMajor = (int) Application::VERSION;
- $changelogFile = __DIR__.'/../../../CHANGELOG.md';
- $changelog = @file_get_contents($changelogFile);
+ if (null !== $version) {
+ return $version;
+ }
diff -up ./tests/AutoReview/ProjectCodeTest.php.rpm ./tests/AutoReview/ProjectCodeTest.php
---- ./tests/AutoReview/ProjectCodeTest.php.rpm 2017-05-25 07:12:21.000000000 +0200
-+++ ./tests/AutoReview/ProjectCodeTest.php 2017-05-25 07:51:43.642438002 +0200
-@@ -315,6 +315,7 @@ final class ProjectCodeTest extends Test
+--- ./tests/AutoReview/ProjectCodeTest.php.rpm 2017-08-03 12:19:28.000000000 +0200
++++ ./tests/AutoReview/ProjectCodeTest.php 2017-08-03 13:04:33.084576466 +0200
+@@ -309,8 +309,10 @@ final class ProjectCodeTest extends Test
->files()
->name('*.php')
->in(__DIR__.'/../../src')
+ ->notName('autoload.php')
->exclude(array(
'Resources',
++ 'tests',
))
+ ;
+
diff --git a/php-cs-fixer.spec b/php-cs-fixer.spec
index ab39539..6d1875d 100644
--- a/php-cs-fixer.spec
+++ b/php-cs-fixer.spec
@@ -6,7 +6,7 @@
#
# Please, preserve the changelog entries
#
-%global gh_commit 5191e01d0fa0f579eb709350306cd11ad6427ca6
+%global gh_commit 27c2cd9d4abd2178b5b585fa2c3cca656d377c69
%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.2.4
+Version: 2.2.5
Release: 1%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist}
Summary: A tool to automatically fix PHP code style
@@ -49,9 +49,11 @@ BuildRequires: php-composer(symfony/finder) >= 2.4
BuildRequires: php-composer(symfony/options-resolver) < 3
BuildRequires: php-composer(symfony/options-resolver) >= 2.6
BuildRequires: php-composer(symfony/polyfill-php55) < 2
-BuildRequires: php-composer(symfony/polyfill-php55) >= 1.3
+BuildRequires: php-composer(symfony/polyfill-php55) >= 1.4
BuildRequires: php-composer(symfony/polyfill-php70) < 2
-BuildRequires: php-composer(symfony/polyfill-php70) >= 1.3
+BuildRequires: php-composer(symfony/polyfill-php70) >= 1.4
+BuildRequires: php-composer(symfony/polyfill-php72) < 2
+BuildRequires: php-composer(symfony/polyfill-php72) >= 1.4
BuildRequires: php-composer(symfony/process) < 3
BuildRequires: php-composer(symfony/process) >= 2.3
BuildRequires: php-composer(symfony/stopwatch) < 3
@@ -79,7 +81,7 @@ BuildRequires: php-composer(justinrainbow/json-schema) >= 5
BuildRequires: php-composer(phpunit/phpunit) >= 4.8.35
BuildRequires: php-composer(symfony/phpunit-bridge)
# Autoloader
-BuildRequires: php-composer(fedora/autoloader)
+BuildRequires: php-fedora-autoloader-devel
%endif
# From composer.json, "require": {
@@ -97,7 +99,7 @@ BuildRequires: php-composer(fedora/autoloader)
# "symfony/polyfill-php54": "^1.0",
# "symfony/polyfill-php55": "^1.3",
# "symfony/polyfill-php70": "^1.0",
-# "symfony/polyfill-xml": "^1.3",
+# "symfony/polyfill-php72": "^1.4",
# "symfony/process": "^2.3 || ^3.0",
# "symfony/stopwatch": "^2.5 || ^3.0"
# use 5.4 to avoid polyfill
@@ -121,26 +123,27 @@ Requires: php-composer(symfony/finder) >= 2.4
Requires: php-composer(symfony/options-resolver) < 3
Requires: php-composer(symfony/options-resolver) >= 2.6
Requires: php-composer(symfony/polyfill-php55) < 2
-Requires: php-composer(symfony/polyfill-php55) >= 1.3
+Requires: php-composer(symfony/polyfill-php55) >= 1.4
Requires: php-composer(symfony/polyfill-php70) < 2
-Requires: php-composer(symfony/polyfill-php70) >= 1.0
+Requires: php-composer(symfony/polyfill-php70) >= 1.4
+Requires: php-composer(symfony/polyfill-php72) < 2
+Requires: php-composer(symfony/polyfill-php72) >= 1.4
Requires: php-composer(symfony/process) < 3
Requires: php-composer(symfony/process) >= 2.3
Requires: php-composer(symfony/stopwatch) < 3
Requires: php-composer(symfony/stopwatch) >= 2.5
# 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.2.5
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)
@@ -161,9 +164,21 @@ projects. This tool does not only detect them, but also fixes them for you.
%setup -q -n %{gh_project}-%{gh_commit}
%patch0 -p1 -b .rpm
-cat << 'EOF' | tee src/autoload.php
-<?php
-/* Autoloader for %{name} and its dependencies */
+# from composer.json, "autoload" / "classmap"
+TESTS="
+ 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__);
@@ -234,6 +249,10 @@ fi
%changelog
+* Thu Aug 3 2017 Remi Collet <remi@remirepo.net> - 2.2.5-1
+- add dependency on symfony/polyfill-php72
+- Update to 2.2.5
+
* Thu May 25 2017 Remi Collet <remi@remirepo.net> - 2.2.4-1
- Update to 2.2.4
- add dependency on gecko-packages/gecko-php-unit