diff options
| -rw-r--r-- | composer.json | 8 | ||||
| -rw-r--r-- | php-cs-fixer-autoload.patch | 22 | ||||
| -rw-r--r-- | php-cs-fixer.spec | 90 | 
3 files changed, 66 insertions, 54 deletions
diff --git a/composer.json b/composer.json index 41ef4b0..523f0fd 100644 --- a/composer.json +++ b/composer.json @@ -15,8 +15,10 @@      ],      "require": {          "php": "^5.3.6 || >=7.0 <7.2", -        "doctrine/annotations": "^1.2", +        "ext-json": "*",          "ext-tokenizer": "*", +        "doctrine/annotations": "^1.2", +        "gecko-packages/gecko-php-unit": "^2.0",          "sebastian/diff": "^1.4",          "symfony/console": "^2.4 || ^3.0",          "symfony/event-dispatcher": "^2.1 || ^3.0", @@ -31,9 +33,9 @@          "symfony/stopwatch": "^2.5 || ^3.0"      },      "require-dev": { -        "gecko-packages/gecko-php-unit": "^2.0", +        "johnkary/phpunit-speedtrap": "^1.0.1",          "justinrainbow/json-schema": "^5.0", -        "phpunit/phpunit": "^4.5 || ^5.0", +        "phpunit/phpunit": "^4.8.35 || ^5.4.3",          "satooshi/php-coveralls": "^1.0",          "symfony/phpunit-bridge": "^3.2.2"      }, diff --git a/php-cs-fixer-autoload.patch b/php-cs-fixer-autoload.patch index b3202a2..c411290 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-04-01 08:35:52.000000000 +0200 -+++ ./php-cs-fixer	2017-04-01 08:48:58.016723873 +0200 +--- ./php-cs-fixer.rpm	2017-05-25 07:12:21.000000000 +0200 ++++ ./php-cs-fixer	2017-05-25 07:51:43.642438002 +0200  @@ -42,12 +42,7 @@ set_error_handler(function ($severity, $       }   }); @@ -15,10 +15,22 @@ 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; +         } +  ++        return Application::VERSION; ++ +         $currentMajor = (int) Application::VERSION; +         $changelogFile = __DIR__.'/../../../CHANGELOG.md'; +         $changelog = @file_get_contents($changelogFile);  diff -up ./tests/AutoReview/ProjectCodeTest.php.rpm ./tests/AutoReview/ProjectCodeTest.php ---- ./tests/AutoReview/ProjectCodeTest.php.rpm	2017-04-01 08:50:31.217299123 +0200 -+++ ./tests/AutoReview/ProjectCodeTest.php	2017-04-01 08:51:10.127539283 +0200 -@@ -314,6 +314,7 @@ final class ProjectCodeTest extends \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               ->files()               ->name('*.php')               ->in(__DIR__.'/../../src') diff --git a/php-cs-fixer.spec b/php-cs-fixer.spec index 6ee21aa..ab39539 100644 --- a/php-cs-fixer.spec +++ b/php-cs-fixer.spec @@ -6,7 +6,7 @@  #  # Please, preserve the changelog entries  # -%global gh_commit    8f33cf3da0da94b67b9cd696b2b9dda81c928f72 +%global gh_commit    5191e01d0fa0f579eb709350306cd11ad6427ca6  %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.3 +Version:        2.2.4  Release:        1%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist}  Summary:        A tool to automatically fix PHP code style @@ -36,23 +36,25 @@ BuildRequires:  php(language) >= 5.4  BuildRequires:  php-tokenizer  BuildRequires:  php-composer(doctrine/annotations)     <  2  BuildRequires:  php-composer(doctrine/annotations)     >= 1.2 -BuildRequires:  php-composer(symfony/console)          <  4 +BuildRequires:  php-composer(gecko-packages/gecko-php-unit) <  3 +BuildRequires:  php-composer(gecko-packages/gecko-php-unit) >= 2.0 +BuildRequires:  php-composer(symfony/console)          <  3  BuildRequires:  php-composer(symfony/console)          >= 2.4 -BuildRequires:  php-composer(symfony/event-dispatcher) <  4 +BuildRequires:  php-composer(symfony/event-dispatcher) <  3  BuildRequires:  php-composer(symfony/event-dispatcher) >= 2.1 -BuildRequires:  php-composer(symfony/filesystem)       <  4 +BuildRequires:  php-composer(symfony/filesystem)       <  3  BuildRequires:  php-composer(symfony/filesystem)       >= 2.4 -BuildRequires:  php-composer(symfony/finder)           <  4 +BuildRequires:  php-composer(symfony/finder)           <  3  BuildRequires:  php-composer(symfony/finder)           >= 2.4 -BuildRequires:  php-composer(symfony/options-resolver) <  4 +BuildRequires:  php-composer(symfony/options-resolver) <  3  BuildRequires:  php-composer(symfony/options-resolver) >= 2.6 -BuildRequires:  php-composer(symfony/polyfill-php55)   <  4 +BuildRequires:  php-composer(symfony/polyfill-php55)   <  2  BuildRequires:  php-composer(symfony/polyfill-php55)   >= 1.3 -BuildRequires:  php-composer(symfony/polyfill-php70)   <  4 +BuildRequires:  php-composer(symfony/polyfill-php70)   <  2  BuildRequires:  php-composer(symfony/polyfill-php70)   >= 1.3 -BuildRequires:  php-composer(symfony/process)          <  4 +BuildRequires:  php-composer(symfony/process)          <  3  BuildRequires:  php-composer(symfony/process)          >= 2.3 -BuildRequires:  php-composer(symfony/stopwatch)        <  4 +BuildRequires:  php-composer(symfony/stopwatch)        <  3  BuildRequires:  php-composer(symfony/stopwatch)        >= 2.5  BuildRequires:  php-composer(sebastian/diff)           <  2  BuildRequires:  php-composer(sebastian/diff)           >= 1.4 @@ -66,16 +68,15 @@ BuildRequires:  php-phar  BuildRequires:  php-spl  BuildRequires:  php-xml  # From composer.json,     "require-dev": { -#        "gecko-packages/gecko-php-unit": "^2.0", +# NOTICE: listener disabled +#        "johnkary/phpunit-speedtrap": "^1.0.1",  #        "justinrainbow/json-schema": "^5.0", -#        "phpunit/phpunit": "^4.5 || ^5.0", +#        "phpunit/phpunit": "^4.8.35 || ^5.4.3",  #        "satooshi/php-coveralls": "^1.0",  #        "symfony/phpunit-bridge": "^3.2" -BuildRequires:  php-composer(gecko-packages/gecko-php-unit) <  3 -BuildRequires:  php-composer(gecko-packages/gecko-php-unit) >= 2.0  BuildRequires:  php-composer(justinrainbow/json-schema) <  6  BuildRequires:  php-composer(justinrainbow/json-schema) >= 5 -BuildRequires:  php-composer(phpunit/phpunit) >= 4.5 +BuildRequires:  php-composer(phpunit/phpunit) >= 4.8.35  BuildRequires:  php-composer(symfony/phpunit-bridge)  # Autoloader  BuildRequires:  php-composer(fedora/autoloader) @@ -83,8 +84,10 @@ BuildRequires:  php-composer(fedora/autoloader)  # From composer.json,     "require": {  #        "php": "^5.3.6 || >=7.0 <7.2", -#        "doctrine/annotations": "^1.2", +#        "ext-json": "*",  #        "ext-tokenizer": "*", +#        "doctrine/annotations": "^1.2", +#        "gecko-packages/gecko-php-unit": "^2.0",  #        "sebastian/diff": "^1.4",  #        "symfony/console": "^2.4 || ^3.0",  #        "symfony/event-dispatcher": "^2.1 || ^3.0", @@ -99,28 +102,31 @@ BuildRequires:  php-composer(fedora/autoloader)  #        "symfony/stopwatch": "^2.5 || ^3.0"  # use 5.4 to avoid polyfill  Requires:       php(language) >= 5.4 +Requires:       php-json  Requires:       php-tokenizer  Requires:       php-composer(doctrine/annotations)     <  2  Requires:       php-composer(doctrine/annotations)     >= 1.2 +Requires:       php-composer(gecko-packages/gecko-php-unit) <  3 +Requires:       php-composer(gecko-packages/gecko-php-unit) >= 2.0  Requires:       php-composer(sebastian/diff)           <  2  Requires:       php-composer(sebastian/diff)           >= 1.4 -Requires:       php-composer(symfony/console)          <  4 +Requires:       php-composer(symfony/console)          <  3  Requires:       php-composer(symfony/console)          >= 2.4 -Requires:       php-composer(symfony/event-dispatcher) <  4 +Requires:       php-composer(symfony/event-dispatcher) <  3  Requires:       php-composer(symfony/event-dispatcher) >= 2.1 -Requires:       php-composer(symfony/filesystem)       <  4 +Requires:       php-composer(symfony/filesystem)       <  3  Requires:       php-composer(symfony/filesystem)       >= 2.4 -Requires:       php-composer(symfony/finder)           <  4 +Requires:       php-composer(symfony/finder)           <  3  Requires:       php-composer(symfony/finder)           >= 2.4 -Requires:       php-composer(symfony/options-resolver) <  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-php70)   <  2  Requires:       php-composer(symfony/polyfill-php70)   >= 1.0 -Requires:       php-composer(symfony/process)          <  4 +Requires:       php-composer(symfony/process)          <  3  Requires:       php-composer(symfony/process)          >= 2.3 -Requires:       php-composer(symfony/stopwatch)        <  4 +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.", @@ -132,7 +138,6 @@ Requires:       php-xml  Requires:       php-cli  Requires:       php-reflection  Requires:       php-dom -Requires:       php-json  Requires:       php-pcre  Requires:       php-phar  Requires:       php-spl @@ -164,10 +169,8 @@ require_once '%{php_home}/Fedora/Autoloader/autoload.php';  \Fedora\Autoloader\Autoload::addPsr4('PhpCsFixer\\', __DIR__);  \Fedora\Autoloader\Dependencies::required([      '%{php_home}/Doctrine/Common/Annotations/autoload.php', -    [ -        '%{php_home}/Symfony3/Component/autoload.php', -        '%{php_home}/Symfony/Component/autoload.php', -    ], +    '%{php_home}/GeckoPackages/PHPUnit/autoload.php', +    '%{php_home}/Symfony/Component/autoload.php',      '%{php_home}/SebastianBergmann/Diff/autoload.php',      '%{php_home}/Symfony/Polyfill/autoload.php',  ]); @@ -193,7 +196,6 @@ mkdir vendor  cat << 'EOF' | tee vendor/autoload.php  <?php  \Fedora\Autoloader\Dependencies::required([ -    '%{php_home}/GeckoPackages/PHPUnit/autoload.php',      [          '%{php_home}/Symfony3/Bridge/PhpUnit/autoload.php',          '%{php_home}/Symfony/Bridge/PhpUnit/autoload.php', @@ -204,28 +206,19 @@ cat << 'EOF' | tee vendor/autoload.php  \Fedora\Autoloader\Autoload::addPsr4('PhpCsFixer\\Tests\\', dirname(__DIR__) . '/tests');  EOF +# Ignore integration test +sed -e "/README.rst/s:__DIR__.*':'$PWD/README.rst':" \ +    -i tests/Console/Command/ReadmeCommandTest.php + +# Disable listener +sed -e 's/listeners/nolistener/' phpunit.xml.dist >phpunit.xml -# remirepo:11 -run=0 -ret=0 -if which php56; then -   php56 %{_bindir}/phpunit -   run=1 -fi -if which php71; then -   php71 %{_bindir}/phpunit -   run=1 -fi -if [ $run -eq 0 ]; then  # see https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/master/.travis.yml  if php -r 'exit (version_compare(PHP_VERSION, "5.6", "<") ? 0 : 1);'; then    export SKIP_LINT_TEST_CASES=1  fi -%{_bindir}/phpunit --verbose -# remirepo:2 -fi -exit $ret +%{_bindir}/phpunit -d memory_limit=1G --verbose  %else  : Test suite disabled  %endif @@ -241,6 +234,11 @@ exit $ret  %changelog +* 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 +- only Symfony 2 +  * Wed Apr 26 2017 Remi Collet <remi@remirepo.net> - 2.2.3-1  - Update to 2.2.3  | 
