From e504c646d7bee45134d7b089cdaf6823b663a158 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 3 Aug 2017 12:18:48 +0200 Subject: v2.4.0 --- composer.json | 19 +++++++++++------- php-cs-fixer-autoload.patch | 31 ++++++++++++++++------------- php-cs-fixer.spec | 48 +++++++++++++++++++++++++++++++-------------- 3 files changed, 62 insertions(+), 36 deletions(-) diff --git a/composer.json b/composer.json index 314ef9f..93c6fe9 100644 --- a/composer.json +++ b/composer.json @@ -26,32 +26,37 @@ "symfony/finder": "^3.0", "symfony/options-resolver": "^3.0", "symfony/polyfill-php70": "^1.0", - "symfony/polyfill-xml": "^1.3", + "symfony/polyfill-php72": "^1.4", "symfony/process": "^3.0", "symfony/stopwatch": "^3.0" }, "require-dev": { "johnkary/phpunit-speedtrap": "^1.1", "justinrainbow/json-schema": "^5.0", - "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.2" }, "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": { - "hhvm": "<3.18" + "hhvm": "*" }, "config": { + "optimize-autoloader": true, "sort-packages": true }, "autoload": { - "psr-4": { "PhpCsFixer\\": "src/" } + "psr-4": { "PhpCsFixer\\": "src/" }, + "classmap": [ + "tests/Test/Assert/AssertTokensTrait.php", + "tests/Test/AbstractFixerTestCase.php", + "tests/Test/AbstractIntegrationTestCase.php", + "tests/Test/IntegrationCase.php", + "tests/Test/IntegrationCaseFactory.php" + ] }, "autoload-dev": { "psr-4": { "PhpCsFixer\\Tests\\": "tests/" } @@ -59,7 +64,7 @@ "bin": ["php-cs-fixer"], "extra": { "branch-alias": { - "dev-master": "2.3-dev" + "dev-master": "2.4-dev" } } } diff --git a/php-cs-fixer-autoload.patch b/php-cs-fixer-autoload.patch index a2e31fd..549be98 100644 --- a/php-cs-fixer-autoload.patch +++ b/php-cs-fixer-autoload.patch @@ -1,7 +1,7 @@ diff -up ./php-cs-fixer.rpm ./php-cs-fixer ---- ./php-cs-fixer.rpm 2017-05-25 08:40:58.000000000 +0200 -+++ ./php-cs-fixer 2017-05-25 08:44:03.319555699 +0200 -@@ -42,12 +42,7 @@ set_error_handler(function ($severity, $ +--- ./php-cs-fixer.rpm 2017-08-03 11:05:45.000000000 +0200 ++++ ./php-cs-fixer 2017-08-03 11:52:15.526145624 +0200 +@@ -40,12 +40,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:45:34.935117875 +0200 -+++ ./src/Console/Command/HelpCommand.php 2017-05-25 08:45:44.276175193 +0200 -@@ -338,6 +338,8 @@ EOF - return $version; - } +--- ./src/Console/Command/HelpCommand.php.rpm 2017-08-03 11:05:45.000000000 +0200 ++++ ./src/Console/Command/HelpCommand.php 2017-08-03 11:52:15.526145624 +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 08:40:58.000000000 +0200 -+++ ./tests/AutoReview/ProjectCodeTest.php 2017-05-25 08:44:03.319555699 +0200 -@@ -316,6 +316,7 @@ final class ProjectCodeTest extends Test +--- ./tests/AutoReview/ProjectCodeTest.php.rpm 2017-08-03 11:05:45.000000000 +0200 ++++ ./tests/AutoReview/ProjectCodeTest.php 2017-08-03 11:52:47.461317357 +0200 +@@ -310,8 +310,10 @@ final class ProjectCodeTest extends Test ->files() ->name('*.php') ->in(__DIR__.'/../../src') + ->notName('autoload.php') ->exclude([ 'Resources', ++ 'tests', ]) + ; + 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 -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 - 2.4.0-1 +- Update to 2.4.0 +- add dependency on symfony/polyfill-php72 + * Thu May 25 2017 Remi Collet - 2.3.2-1 - Update to 2.3.2 - add dependency on gecko-packages/gecko-php-unit -- cgit