summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json11
-rw-r--r--php-cs-fixer-autoload.patch33
-rw-r--r--php-cs-fixer.spec27
3 files changed, 48 insertions, 23 deletions
diff --git a/composer.json b/composer.json
index a14a658..16eb3d8 100644
--- a/composer.json
+++ b/composer.json
@@ -19,7 +19,7 @@
"ext-tokenizer": "*",
"composer/semver": "^1.4",
"doctrine/annotations": "^1.2",
- "php-cs-fixer/diff": "^1.2",
+ "php-cs-fixer/diff": "^1.3",
"symfony/console": "^3.2 || ^4.0",
"symfony/event-dispatcher": "^3.0 || ^4.0",
"symfony/filesystem": "^3.0 || ^4.0",
@@ -40,7 +40,7 @@
"mikey179/vfsStream": "^1.6",
"php-coveralls/php-coveralls": "^2.0",
"php-cs-fixer/accessible-object": "^1.0",
- "phpunit/phpunit": "^5.7.23 || ^6.4.3",
+ "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0",
"phpunitgoodpractices/traits": "^1.3.1",
"symfony/phpunit-bridge": "^3.2.2 || ^4.0"
},
@@ -52,6 +52,11 @@
"optimize-autoloader": true,
"sort-packages": true
},
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.11-dev"
+ }
+ },
"autoload": {
"psr-4": {
"PhpCsFixer\\": "src/"
@@ -62,6 +67,8 @@
"tests/Test/AbstractIntegrationTestCase.php",
"tests/Test/Assert/AssertTokensTrait.php",
"tests/Test/Constraint/SameStringsConstraint.php",
+ "tests/Test/Constraint/SameStringsConstraintForV5.php",
+ "tests/Test/Constraint/SameStringsConstraintForV7.php",
"tests/Test/IntegrationCase.php",
"tests/Test/IntegrationCaseFactory.php",
"tests/Test/IntegrationCaseFactoryInterface.php",
diff --git a/php-cs-fixer-autoload.patch b/php-cs-fixer-autoload.patch
index 9ccd7e3..262a233 100644
--- a/php-cs-fixer-autoload.patch
+++ b/php-cs-fixer-autoload.patch
@@ -1,15 +1,21 @@
diff -up ./php-cs-fixer.rpm ./php-cs-fixer
---- ./php-cs-fixer.rpm 2017-10-02 16:04:28.744937463 +0200
-+++ ./php-cs-fixer 2017-10-02 16:04:55.577092013 +0200
-@@ -39,18 +39,7 @@ set_error_handler(function ($severity, $
+--- ./php-cs-fixer.rpm 2018-03-21 07:08:49.801165194 +0100
++++ ./php-cs-fixer 2018-03-21 07:09:08.527252780 +0100
+@@ -39,25 +39,7 @@ set_error_handler(function ($severity, $
}
});
--try {
+-$require = true;
+-if (class_exists('Phar')) {
- // Maybe this file is used as phar-stub? Let's try!
-- Phar::mapPhar('php-cs-fixer.phar');
-- require_once 'phar://php-cs-fixer.phar/vendor/autoload.php';
--} catch (PharException $e) {
+- try {
+- Phar::mapPhar('php-cs-fixer.phar');
+- require_once 'phar://php-cs-fixer.phar/vendor/autoload.php';
+- $require = false;
+- } catch (PharException $e) {
+- }
+-}
+-if ($require) {
- // OK, it's not, let give Composer autoloader a try!
- if (file_exists($a = __DIR__.'/../../autoload.php')) {
- require_once $a;
@@ -17,14 +23,15 @@ diff -up ./php-cs-fixer.rpm ./php-cs-fixer
- require_once __DIR__.'/vendor/autoload.php';
- }
-}
+-unset($require);
+require_once '/usr/share/php/PhpCsFixer/autoload.php';
use PhpCsFixer\Console\Application;
diff -up ./src/Console/Command/HelpCommand.php.rpm ./src/Console/Command/HelpCommand.php
---- ./src/Console/Command/HelpCommand.php.rpm 2017-10-02 16:03:56.000000000 +0200
-+++ ./src/Console/Command/HelpCommand.php 2017-10-02 16:04:28.744937463 +0200
-@@ -345,6 +345,8 @@ EOF
+--- ./src/Console/Command/HelpCommand.php.rpm 2018-03-21 07:06:08.000000000 +0100
++++ ./src/Console/Command/HelpCommand.php 2018-03-21 07:08:49.801165194 +0100
+@@ -368,6 +368,8 @@ EOF
{
static $version = null;
@@ -34,9 +41,9 @@ diff -up ./src/Console/Command/HelpCommand.php.rpm ./src/Console/Command/HelpCom
return $version;
}
diff -up ./tests/AutoReview/ProjectCodeTest.php.rpm ./tests/AutoReview/ProjectCodeTest.php
---- ./tests/AutoReview/ProjectCodeTest.php.rpm 2017-10-02 16:03:56.000000000 +0200
-+++ ./tests/AutoReview/ProjectCodeTest.php 2017-10-02 16:04:28.745937469 +0200
-@@ -383,8 +383,11 @@ final class ProjectCodeTest extends Test
+--- ./tests/AutoReview/ProjectCodeTest.php.rpm 2018-03-21 07:06:08.000000000 +0100
++++ ./tests/AutoReview/ProjectCodeTest.php 2018-03-21 07:08:49.801165194 +0100
+@@ -433,8 +433,11 @@ final class ProjectCodeTest extends Test
->files()
->name('*.php')
->in(__DIR__.'/../../src')
diff --git a/php-cs-fixer.spec b/php-cs-fixer.spec
index 8395588..7ffe838 100644
--- a/php-cs-fixer.spec
+++ b/php-cs-fixer.spec
@@ -10,7 +10,7 @@
# For compatibility with SCL
%undefine __brp_mangle_shebangs
-%global gh_commit b2dce1dacff988b79c4aadf252e5dee31bc04e19
+%global gh_commit 2ac8defbe07599b79005cca764bfffe7aeac0bf2
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
#global gh_date 20150717
%global gh_owner FriendsOfPHP
@@ -26,7 +26,7 @@
%global gh_diff_short %(c=%{gh_diff_commit}; echo ${c:0:7})
Name: php-cs-fixer
-Version: 2.10.4
+Version: 2.11.0
Release: 1%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist}
Summary: A tool to automatically fix PHP code style
@@ -46,7 +46,7 @@ BuildArch: noarch
BuildRequires: php(language) >= 5.6
BuildRequires: php-tokenizer
# remirepo:1
-%if 0%{?fedora} >= 27
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
BuildRequires: (php-composer(composer/semver) >= 1.4 with php-composer(composer/semver) < 2)
BuildRequires: (php-composer(doctrine/annotations) >= 1.2 with php-composer(doctrine/annotations) < 2)
BuildRequires: (php-composer(symfony/polyfill-php70) >= 1.0 with php-composer(symfony/polyfill-php70) < 2)
@@ -86,19 +86,24 @@ BuildRequires: php-symfony3-debug
# "mikey179/vfsStream": "^1.6",
# "php-coveralls/php-coveralls": "^2.0",
# "php-cs-fixer/accessible-object": "^1.0",
-# "phpunit/phpunit": "^5.7.23 || ^6.4.3",
+# "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0",
# "phpunitgoodpractices/traits": "^1.3.1",
# "symfony/phpunit-bridge": "^3.2.2 || ^4.0"
# ignored as test using it fail strangely
#BuildRequires: php-composer(keradus/cli-executor) < 2
#BuildRequires: php-composer(keradus/cli-executor) >= 1.0
# remirepo:1
-%if 0%{?fedora} >= 27
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
BuildRequires: (php-composer(justinrainbow/json-schema) >= 5.0 with php-composer(justinrainbow/json-schema) < 6)
BuildRequires: (php-composer(mikey179/vfsStream) >= 1.6 with php-composer(mikey179/vfsStream) < 2)
BuildRequires: (php-composer(php-cs-fixer/accessible-object) >= 1.0 with php-composer(php-cs-fixer/accessible-object) < 2)
+%if 0%{?fedora} >= 28 || 0%{?rhel} >= 8
+%global phpunit %{_bindir}/phpunit7
+BuildRequires: phpunit7 >= 7.0
+%else
%global phpunit %{_bindir}/phpunit6
BuildRequires: phpunit6 >= 6.4.3
+%endif
# remirepo:7
%else
BuildRequires: php-justinrainbow-json-schema5
@@ -122,7 +127,7 @@ BuildRequires: php-fedora-autoloader-devel
# "composer/semver": "^1.4",
# "doctrine/annotations": "^1.2",
# Bundled
-# "php-cs-fixer/diff": "^1.2",
+# "php-cs-fixer/diff": "^1.3",
# "symfony/console": "^3.2 || ^4.0",
# "symfony/event-dispatcher": "^3.0 || ^4.0",
# "symfony/filesystem": "^3.0 || ^4.0",
@@ -137,7 +142,7 @@ Requires: php(language) >= 5.6
Requires: php-json
Requires: php-tokenizer
# remirepo:1
-%if 0%{?fedora} >= 27
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
Requires: (php-composer(composer/semver) >= 1.4 with php-composer(composer/semver) < 2)
Requires: (php-composer(doctrine/annotations) >= 1.2 with php-composer(doctrine/annotations) < 2)
Requires: (php-composer(symfony/polyfill-php70) >= 1.0 with php-composer(symfony/polyfill-php70) < 2)
@@ -202,6 +207,8 @@ TESTS="
tests/Test/AbstractIntegrationTestCase.php
tests/Test/Assert/AssertTokensTrait.php
tests/Test/Constraint/SameStringsConstraint.php
+ tests/Test/Constraint/SameStringsConstraintForV5.php
+ tests/Test/Constraint/SameStringsConstraintForV7.php
tests/Test/IntegrationCase.php
tests/Test/IntegrationCaseFactory.php
tests/Test/IntegrationCaseFactoryInterface.php
@@ -286,7 +293,7 @@ sed -e 's/listeners/nolistener/' phpunit.xml.dist >phpunit.xml
sed -e 's:%{php_home}:%{buildroot}%{php_home}:' -i %{name}
ret=0
-for cmdarg in "php %{phpunit}" php70 php71 php72; do
+for cmdarg in "php %{phpunit}" php70 php71 "php72 %{_bindir}/phpunit7"; do
if which $cmdarg; then
set $cmdarg
$1 -d memory_limit=2G ${2:-%{_bindir}/phpunit6} || ret=1
@@ -308,6 +315,10 @@ exit $ret
%changelog
+* Wed Mar 21 2018 Remi Collet <remi@remirepo.net> - 2.11.0-1
+- update to 2.11.0
+- use phpunit7 on F28+
+
* Thu Mar 8 2018 Remi Collet <remi@remirepo.net> - 2.10.4-1
- update to 2.10.4