Browse Source

StaticLambdaFixer - introduction

SpacePossum 7 years ago
parent
commit
d9ef407746
10 changed files with 280 additions and 57 deletions
  1. 1 0
      .appveyor.yml
  2. 25 7
      .github/ISSUE_TEMPLATE
  3. 7 0
      .php_cs.dist
  4. 8 4
      .travis.yml
  5. 130 0
      CHANGELOG.md
  6. 31 32
      CONTRIBUTING.md
  7. 73 10
      README.rst
  8. 1 1
      circle.yml
  9. 2 1
      composer.json
  10. 2 2
      doc/COOKBOOK-FIXERS.md

+ 1 - 0
.appveyor.yml

@@ -39,4 +39,5 @@ before_test:
 test_script:
     - cd C:\projects\php-cs-fixer
     - vendor\bin\phpunit
+    - set PHP_CS_FIXER_FUTURE_MODE=1
     - php php-cs-fixer --diff --dry-run -v fix

+ 25 - 7
.github/ISSUE_TEMPLATE

@@ -3,14 +3,32 @@ or visit: https://gitter.im/PHP-CS-Fixer
 
 When reporting an issue (bug) please provide the following information:
 
-The PHP version you are using:
-$ php -v
+#### The PHP version you are using (`$ php -v`):
+=> ....................................
 
-PHP CS Fixer version you are using:
-$ php-cs-fixer -V
+#### PHP CS Fixer version you are using (`$ php-cs-fixer -V`):
+=> ....................................
 
-The command you use to run the fixer (and the configuration file you are using if any).
+#### The command you use to run PHP CS Fixer:
+=> ....................................
 
-A minimal sample of valid PHP code that is not fixed correctly (if applicable).
+#### The configuration file you are using, if any:
+```php
+=> ....................................
+```
 
-The fixed version of that code after you run the fixer and the version you expected.
+#### If applicable, please provide minimum samples of PHP code (as plain text, not screenshots):
+ * before running PHP CS Fixer (no changes):
+```php
+=> ....................................
+```
+
+ * with unexpected changes applied when running PHP CS Fixer:
+```php
+=> ....................................
+```
+
+ * with the changes you expected instead:
+```php
+=> ....................................
+```

+ 7 - 0
.php_cs.dist

@@ -23,9 +23,14 @@ $config = PhpCsFixer\Config::create()
         'combine_consecutive_issets' => true,
         'combine_consecutive_unsets' => true,
         'compact_nullable_typehint' => true,
+        'escape_implicit_backslashes' => true,
+        'explicit_indirect_variable' => true,
+        'explicit_string_variable' => true,
+        'final_internal_class' => true,
         'header_comment' => ['header' => $header],
         'heredoc_to_nowdoc' => true,
         'list_syntax' => ['syntax' => 'long'],
+        'method_chaining_indentation' => true,
         'method_argument_space' => ['ensure_fully_multiline' => true],
         'no_extra_consecutive_blank_lines' => ['tokens' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block']],
         'no_null_property_initialization' => true,
@@ -66,6 +71,8 @@ try {
     $config->setRules([]);
 } catch (UnexpectedValueException $e) {
     $config->setRules([]);
+} catch (InvalidArgumentException $e) {
+    $config->setRules([]);
 }
 
 return $config;

+ 8 - 4
.travis.yml

@@ -46,7 +46,7 @@ jobs:
 
 
         - &STANDARD_TEST_JOB
-            stage: Test
+            stage: Fast Test
             php: 7.0
             install:
                 # Composer: enforce given Symfony components version
@@ -57,20 +57,23 @@ jobs:
                 - composer info -D | sort
             script:
                 - vendor/bin/phpunit || travis_terminate 1
-                - php php-cs-fixer --diff --dry-run -v fix
+                - PHP_CS_FIXER_FUTURE_MODE=1 php php-cs-fixer --diff --dry-run -v fix
 
         -
             <<: *STANDARD_TEST_JOB
+            stage: Test
             php: 5.6
             env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
 
         -
             <<: *STANDARD_TEST_JOB
+            stage: Test
             php: 7.1
             env: SYMFONY_DEPRECATIONS_HELPER=weak PHP_CS_FIXER_TEST_USE_LEGACY_TOKENIZER=1 SYMFONY_VERSION="^4.0" MIN_STABILITY=dev
 
         -
             <<: *STANDARD_TEST_JOB
+            stage: Test
             php: 7.2
             env: COLLECT_COVERAGE=1
             before_script:
@@ -83,17 +86,18 @@ jobs:
                 - if [ $COLLECT_COVERAGE == 0 ]; then vendor/bin/phpunit || travis_terminate 1; fi
                 - if [ $COLLECT_COVERAGE == 1 ]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover build/logs/clover.xml || travis_terminate 1; fi
                 - PHP_CS_FIXER_FUTURE_MODE=1 php php-cs-fixer --diff --dry-run -v fix || travis_terminate 1
-                - if [ $COLLECT_COVERAGE == 1 ]; then php vendor/bin/coveralls -v; fi
+                - if [ $COLLECT_COVERAGE == 1 ]; then php vendor/bin/php-coveralls -v; fi
 
         -
             <<: *STANDARD_TEST_JOB
+            stage: Test
             php: nightly
             env: COMPOSER_FLAGS="--ignore-platform-reqs" PHP_CS_FIXER_IGNORE_ENV=1 SYMFONY_DEPRECATIONS_HELPER=weak
             script:
                 - php php-cs-fixer fix --rules @PHP71Migration,@PHP71Migration:risky,native_function_invocation -q || travis_terminate 1
                 - vendor/bin/phpunit || travis_terminate 1
                 - git checkout . -q
-                - php php-cs-fixer --diff --dry-run -v fix
+                - PHP_CS_FIXER_FUTURE_MODE=1 php php-cs-fixer --diff --dry-run -v fix
 
         -
             stage: Deployment

+ 130 - 0
CHANGELOG.md

@@ -3,6 +3,63 @@ CHANGELOG for PHP CS Fixer
 
 This file contains changelogs for stable releases only.
 
+Changelog for v2.8.4
+--------------------
+
+* bug #3281 SelfAccessorFixer - stop modifying traits (kubawerlos)
+* minor #3195 Add self-update command test (julienfalque)
+* minor #3287 FileCacheManagerTest - drop duplicated line (keradus)
+* minor #3292 PHPUnit - set memory limit (veewee)
+* minor #3306 Token - better input validation (keradus)
+* minor #3310 Upgrade PHP Coveralls (keradus)
+
+Changelog for v2.8.3
+--------------------
+
+* bug #3173 SimplifiedNullReturnFixer - handle nullable return types (Slamdunk)
+* bug #3268 PhpUnitNoExpectationAnnotationFixer - add case with backslashes (keradus, Slamdunk)
+* bug #3272 PhpdocTrimFixer - unicode support (SpacePossum)
+
+Changelog for v2.8.2
+--------------------
+
+* bug #3225 PhpdocTrimFixer - Fix handling of lines without leading asterisk (julienfalque)
+* bug #3241 NoExtraConsecutiveBlankLinesFixer - do not crash on ^M LF only (SpacePossum)
+* bug #3242 PhpUnitNoExpectationAnnotationFixer - fix ' handling (keradus)
+* bug #3243 PhpUnitExpectationFixer - don't create ->expectExceptionMessage(null) (keradus)
+* bug #3244 PhpUnitNoExpectationAnnotationFixer - expectation extracted from annotation shall be separated from rest of code with one blank line (keradus)
+* bug #3259 PhpUnitNamespacedFixer - fix isCandidate to not rely on class declaration (keradus)
+* bug #3261 PhpUnitNamespacedFixer - properly fix next usage of already fixed class (keradus)
+* bug #3262 ToolInfo - support installation by branch as well (keradus)
+* bug #3263 NoBreakCommentFixer - Fix handling comment text with PCRE characters (julienfalque)
+* bug #3266 PhpUnitConstructFixer - multiple asserts bug (kubawerlos)
+* minor #3239 Improve contributing guide and issue template (julienfalque)
+* minor #3246 Make ToolInfo methods non-static (julienfalque)
+* minor #3249 PhpUnitNoExpectationAnnotationFixerTest - fix hidden conflict (keradus)
+* minor #3250 Travis: fail early, spare resources, save the Earth (Slamdunk, keradus)
+* minor #3251 Create Title for config file docs section (IanEdington)
+* minor #3254 AutoReview/FixerFactoryTest::testFixersPriority: verbose assertion message (Slamdunk)
+* minor #3255 IntegrationTest: output exception stack trace (Slamdunk)
+* minor #3257 README.rst - Fixed bullet list formatting (moebrowne)
+
+Changelog for v2.8.1
+--------------------
+
+* bug #3199 TokensAnalyzer - getClassyElements (SpacePossum)
+* bug #3208 BracesFixer - Fix for instantiation in control structures (julienfalque, SpacePossum)
+* bug #3215 BinaryOperatorSpacesFixer - Fix spaces around multiple exception catching (|) (ntzm)
+* bug #3216 AbstractLinesBeforeNamespaceFixer - add min. and max. option, not only single target count (SpacePossum)
+* bug #3217 TokenizerLinter - fix lack of linting when code is cached (SpacePossum, keradus)
+* minor #3200 Skip slow test when Xdebug is loaded (julienfalque)
+* minor #3211 Use udiff format in CI (julienfalque)
+* minor #3212 Handle rulesets unknown to fabbot.io (julienfalque)
+* minor #3219 Normalise references to GitHub in docs (ntzm)
+* minor #3226 Remove unused imports (ntzm)
+* minor #3231 Fix typos (ntzm)
+* minor #3234 Simplify Cache\Signature::equals (ntzm)
+* minor #3237 UnconfigurableFixer - use only LF (keradus)
+* minor #3238 AbstractFixerTest - fix @cover annotation (keradus)
+
 Changelog for v2.8.0
 --------------------
 
@@ -17,6 +74,37 @@ Changelog for v2.8.0
 * minor #3185 IndentationTypeFixerTest - clean up (SpacePossum, keradus)
 * minor #3198 Cleanup: add test that there is no deprecated fixer in rule set (kubawerlos)
 
+Changelog for v2.7.5
+--------------------
+
+* bug #3225 PhpdocTrimFixer - Fix handling of lines without leading asterisk (julienfalque)
+* bug #3241 NoExtraConsecutiveBlankLinesFixer - do not crash on ^M LF only (SpacePossum)
+* bug #3262 ToolInfo - support installation by branch as well (keradus)
+* bug #3263 NoBreakCommentFixer - Fix handling comment text with PCRE characters (julienfalque)
+* bug #3266 PhpUnitConstructFixer - multiple asserts bug (kubawerlos)
+* minor #3239 Improve contributing guide and issue template (julienfalque)
+* minor #3246 Make ToolInfo methods non-static (julienfalque)
+* minor #3250 Travis: fail early, spare resources, save the Earth (Slamdunk, keradus)
+* minor #3251 Create Title for config file docs section (IanEdington)
+* minor #3254 AutoReview/FixerFactoryTest::testFixersPriority: verbose assertion message (Slamdunk)
+* minor #3255 IntegrationTest: output exception stack trace (Slamdunk)
+
+Changelog for v2.7.4
+--------------------
+
+* bug #3199 TokensAnalyzer - getClassyElements (SpacePossum)
+* bug #3208 BracesFixer - Fix for instantiation in control structures (julienfalque, SpacePossum)
+* bug #3215 BinaryOperatorSpacesFixer - Fix spaces around multiple exception catching (|) (ntzm)
+* bug #3216 AbstractLinesBeforeNamespaceFixer - add min. and max. option, not only single target count (SpacePossum)
+* bug #3217 TokenizerLinter - fix lack of linting when code is cached (SpacePossum, keradus)
+* minor #3200 Skip slow test when Xdebug is loaded (julienfalque)
+* minor #3219 Normalise references to GitHub in docs (ntzm)
+* minor #3226 Remove unused imports (ntzm)
+* minor #3231 Fix typos (ntzm)
+* minor #3234 Simplify Cache\Signature::equals (ntzm)
+* minor #3237 UnconfigurableFixer - use only LF (keradus)
+* minor #3238 AbstractFixerTest - fix @cover annotation (keradus)
+
 Changelog for v2.7.3
 --------------------
 
@@ -332,6 +420,48 @@ Changelog for v2.3.0
 * minor #2568 Require PHP 5.6+ (keradus)
 * minor #2672 Bump symfony/* deps (keradus)
 
+Changelog for v2.2.13
+---------------------
+
+* bug #3281 SelfAccessorFixer - stop modifying traits (kubawerlos)
+* minor #3195 Add self-update command test (julienfalque)
+* minor #3292 PHPUnit - set memory limit (veewee)
+* minor #3306 Token - better input validation (keradus)
+
+Changelog for v2.2.12
+---------------------
+
+* bug #3173 SimplifiedNullReturnFixer - handle nullable return types (Slamdunk)
+* bug #3272 PhpdocTrimFixer - unicode support (SpacePossum)
+
+Changelog for v2.2.11
+---------------------
+
+* bug #3225 PhpdocTrimFixer - Fix handling of lines without leading asterisk (julienfalque)
+* bug #3262 ToolInfo - support installation by branch as well (keradus)
+* bug #3266 PhpUnitConstructFixer - multiple asserts bug (kubawerlos)
+* minor #3239 Improve contributing guide and issue template (julienfalque)
+* minor #3246 Make ToolInfo methods non-static (julienfalque)
+* minor #3250 Travis: fail early, spare resources, save the Earth (Slamdunk, keradus)
+* minor #3251 Create Title for config file docs section (IanEdington)
+* minor #3254 AutoReview/FixerFactoryTest::testFixersPriority: verbose assertion message (Slamdunk)
+
+Changelog for v2.2.10
+---------------------
+
+* bug #3199 TokensAnalyzer - getClassyElements (SpacePossum)
+* bug #3208 BracesFixer - Fix for instantiation in control structures (julienfalque, SpacePossum)
+* bug #3215 BinaryOperatorSpacesFixer - Fix spaces around multiple exception catching (|) (ntzm)
+* bug #3216 AbstractLinesBeforeNamespaceFixer - add min. and max. option, not only single target count (SpacePossum)
+* bug #3217 TokenizerLinter - fix lack of linting when code is cached (SpacePossum, keradus)
+* minor #3200 Skip slow test when Xdebug is loaded (julienfalque)
+* minor #3219 Normalise references to GitHub in docs (ntzm)
+* minor #3226 Remove unused imports (ntzm)
+* minor #3231 Fix typos (ntzm)
+* minor #3234 Simplify Cache\Signature::equals (ntzm)
+* minor #3237 UnconfigurableFixer - use only LF (keradus)
+* minor #3238 AbstractFixerTest - fix @cover annotation (keradus)
+
 Changelog for v2.2.9
 --------------------
 

+ 31 - 32
CONTRIBUTING.md

@@ -1,42 +1,41 @@
-# Contributions are welcome!
+# Contributions Are Welcome!
 
-## Quick guide
+If you need any help, don't hesitate to ask the community on [Gitter](https://gitter.im/PHP-CS-Fixer/Lobby).
 
- * Fork the repo.
- * Checkout the branch you want to make changes on:
-  * Master if you make changes to the code that are not backward compatible.
-  * Default branch when adding new features.
-  * Branch before the default if you are fixing a bug for an existing feature (or the default/master branch if the feature was introduced in that version).
- * Install dependencies: `composer install`.
- * Create branch, e.g. `feature-foo` or `bugfix-bar`.
- * Make changes.
- * If you are adding functionality or fixing a bug - add a test!
- * Fix project itself: `php php-cs-fixer fix`.
- * Make sure there is no trailing spaces in code: `./check_trailing_spaces.sh`.
- * Regenerate readme: `php php-cs-fixer readme > README.rst`. Do not modify `README.rst` manually!
- * Check if tests pass: `phpunit` [(4.x or 5.x)](https://phpunit.de/manual/current/en/installation.html)
+## Quick Guide
 
-## Opening a pull request
+* [Fork](https://help.github.com/articles/fork-a-repo/) the repo.
+* [Checkout](https://git-scm.com/docs/git-checkout) the branch you want to make changes on:
+  * If you are fixing a bug or typo, improving tests or for any small tweak: the lowest maintained branch where the changes can be applied. Once your Pull Request is accepted, the changes will get merged up to highest branches.
+  * `master` in other cases (new feature, deprecation, or backwards compatibility breaking changes). Note that most of the time, `master` represents the next minor release of PHP CS Fixer, so Pull Requests that break backwards compatibility might be postponed.
+* Install dependencies: `composer install`.
+* Create a new branch, e.g. `feature-foo` or `bugfix-bar`.
+* Make changes.
+* If you are adding functionality or fixing a bug - add a test! Prefer adding new test cases over modifying existing ones.
+* Make sure there is no trailing spaces in code: `./check_trailing_spaces.sh`.
+* Regenerate README: `php php-cs-fixer readme > README.rst`. Do not modify `README.rst` manually!
+* Check if tests pass: `vendor/bin/phpunit`.
+* Fix project itself: `php php-cs-fixer fix`.
 
-You can do some things to increase the chance that your pull request is accepted the first time:
+## Opening a [Pull Request](https://help.github.com/articles/about-pull-requests/)
 
- * Submit one pull request per fix or feature.
- * If your changes are not up to date - rebase your branch on the parent branch.
- * Follow the conventions used in the project.
- * Remember about tests and documentation.
- * Don't bump version.
+You can do some things to increase the chance that your Pull Request is accepted the first time:
 
-## Making new fixers
+* Submit one Pull Request per fix or feature.
+* If your changes are not up to date, [rebase](https://git-scm.com/docs/git-rebase) your branch onto the parent branch.
+* Follow the conventions used in the project.
+* Remember about tests and documentation.
+* Don't bump version.
 
-There is a [cookbook](https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/master/doc/COOKBOOK-FIXERS.md) with basic instructions on how to build a new fixer. Consider reading it
+## Making New Fixers
+
+There is a [cookbook](doc/COOKBOOK-FIXERS.md) with basic instructions on how to build a new fixer. Consider reading it
 before opening a PR.
 
-## Project's standards
+## Project's Standards
 
- * [PSR-1: Basic Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md)
- * [PSR-2: Coding Style Guide](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)
- * [PSR-4: Autoloading Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md)
- * [PSR-5: PHPDoc (draft)](https://github.com/phpDocumentor/fig-standards/blob/master/proposed/phpdoc.md)
- * [Symfony Coding Standards](http://symfony.com/doc/current/contributing/code/standards.html)
- * [Symfony Documentation Standards](http://symfony.com/doc/current/contributing/documentation/standards.html)
- * Keep the order of class elements: static properties, instance properties, constructor (or setUp for PHPUnit), destructor (or tearDown for PHPUnit), static methods, instance methods, magic static methods, magic instance methods.
+* [PSR-1: Basic Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md)
+* [PSR-2: Coding Style Guide](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)
+* [PSR-4: Autoloading Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md)
+* [PSR-5: PHPDoc (draft)](https://github.com/phpDocumentor/fig-standards/blob/master/proposed/phpdoc.md)
+* [Symfony Coding Standards](https://symfony.com/doc/current/contributing/code/standards.html)

+ 73 - 10
README.rst

@@ -13,7 +13,7 @@ If you are already using a linter to identify coding standards problems in your
 code, you know that fixing them by hand is tedious, especially on large
 projects. This tool does not only detect them, but also fixes them for you.
 
-The PHP CS Fixer is maintained on github at https://github.com/FriendsOfPHP/PHP-CS-Fixer
+The PHP CS Fixer is maintained on GitHub at https://github.com/FriendsOfPHP/PHP-CS-Fixer
 bug reports and ideas about new features are welcome there.
 
 You can talk to us at https://gitter.im/PHP-CS-Fixer/Lobby about the project,
@@ -46,7 +46,7 @@ or with specified version:
 
 .. code-block:: bash
 
-    $ wget https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.8.0/php-cs-fixer.phar -O php-cs-fixer
+    $ wget https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.8.4/php-cs-fixer.phar -O php-cs-fixer
 
 or with curl:
 
@@ -197,6 +197,7 @@ The ``--dry-run`` flag will run the fixer without making changes to your files.
 The ``--diff`` flag can be used to let the fixer output all the changes it makes.
 
 The ``--diff-format`` option allows to specify in which format the fixer should output the changes it makes:
+
 * ``udiff``: unified diff format;
 * ``sbd``: Sebastianbergmann/diff format (default when using `--diff` without specifying `diff-format`).
 
@@ -323,6 +324,16 @@ Choose from the list of available rules:
   - ``space`` (``'none'``, ``'single'``): spacing to apply between cast and variable;
     defaults to ``'single'``
 
+* **class_attributes_separation** [@Symfony]
+
+  Class, trait and interface elements must be separated with one blank
+  line.
+
+  Configuration options:
+
+  - ``elements`` (``array``): list of classy elements; 'const', 'method',
+    'property'; defaults to ``['const', 'method', 'property']``
+
 * **class_definition** [@PSR2, @Symfony]
 
   Whitespace around the keywords of a class, trait or interfaces
@@ -535,7 +546,46 @@ Choose from the list of available rules:
 
   Replace deprecated ``ereg`` regular expression functions with preg.
 
-  *Risky rule: risky if the ``ereg`` funcion is overridden.*
+  *Risky rule: risky if the ``ereg`` function is overridden.*
+
+* **escape_implicit_backslashes**
+
+  Escape implicit backslashes in strings and heredocs to ease the
+  understanding of which are special chars interpreted by PHP and which
+  not.
+
+  Configuration options:
+
+  - ``double_quoted`` (``bool``): whether to fix double-quoted strings; defaults to
+    ``true``
+  - ``heredoc_syntax`` (``bool``): whether to fix heredoc syntax; defaults to ``true``
+  - ``single_quoted`` (``bool``): whether to fix single-quoted strings; defaults to
+    ``false``
+
+* **explicit_indirect_variable**
+
+  Add curly braces to indirect variables to make them clear to understand.
+  Requires PHP >= 7.0.
+
+* **explicit_string_variable**
+
+  Converts implicit variables into explicit ones in double-quoted strings
+  or heredoc syntax.
+
+* **final_internal_class**
+
+  Internal classes should be ``final``.
+
+  *Risky rule: changing classes to ``final`` might cause code execution to break.*
+
+  Configuration options:
+
+  - ``annotation-black-list`` (``array``): class level annotations tags that must be
+    omitted to fix the class, even if all of the white list ones are used
+    as well. (case in sensitive); defaults to ``['@final', '@Entity', '@ORM']``
+  - ``annotation-white-list`` (``array``): class level annotations tags that must be
+    set in order to fix the class. (case in sensitive); defaults to
+    ``['@internal']``
 
 * **full_opening_tag** [@PSR1, @PSR2, @Symfony]
 
@@ -683,9 +733,15 @@ Choose from the list of available rules:
   - ``keep_multiple_spaces_after_comma`` (``bool``): whether keep multiple spaces
     after comma; defaults to ``false``
 
-* **method_separation** [@Symfony]
+* **method_chaining_indentation**
 
-  Methods must be separated with one blank line.
+  Method chaining MUST be properly indented. Method chaining with
+  different levels of indentation is not supported.
+
+* **method_separation**
+
+  Methods must be separated with one blank line. DEPRECATED: use
+  ``class_attributes_separation`` instead.
 
 * **modernize_types_casting** [@Symfony:risky]
 
@@ -1231,8 +1287,8 @@ Choose from the list of available rules:
 
 * **self_accessor** [@Symfony]
 
-  Inside a classy element "self" should be preferred to the class name
-  itself.
+  Inside class or interface element "self" should be preferred to the
+  class name itself.
 
 * **semicolon_after_instruction** [@Symfony]
 
@@ -1253,8 +1309,6 @@ Choose from the list of available rules:
 
   A return statement wishing to return ``void`` should not return ``null``.
 
-  *Risky rule: risky since PHP 7.1 as ``null`` and ``void`` can be hinted as return type and have different meaning.*
-
 * **single_blank_line_at_eof** [@PSR2, @Symfony]
 
   A PHP file without end tag must always end with a single empty line
@@ -1310,6 +1364,12 @@ Choose from the list of available rules:
 
   Replace all ``<>`` with ``!=``.
 
+* **static_lambda**
+
+  Lambdas not (indirect) referencing ``$this`` must be declared ``static``.
+
+  *Risky rule: risky when using "->bindTo" on lambdas without referencing to ``$this``.*
+
 * **strict_comparison**
 
   Comparisons should be strict.
@@ -1396,9 +1456,12 @@ fixed but without actually modifying them:
 
     $ php php-cs-fixer.phar fix /path/to/code --dry-run
 
+Config file
+-----------
+
 Instead of using command line options to customize the rule, you can save the
 project configuration in a ``.php_cs.dist`` file in the root directory of your project.
-The file must return an instance of `PhpCsFixer\\ConfigInterface <https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/v2.8.0/src/ConfigInterface.php>`_
+The file must return an instance of `PhpCsFixer\\ConfigInterface <https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/v2.8.4/src/ConfigInterface.php>`_
 which lets you configure the rules, the files and directories that
 need to be analyzed. You may also create ``.php_cs`` file, which is
 the local configuration that will be used instead of the project configuration. It

+ 1 - 1
circle.yml

@@ -22,4 +22,4 @@ dependencies:
 test:
     override:
         - vendor/bin/phpunit
-        - php php-cs-fixer --diff --dry-run -v fix
+        - PHP_CS_FIXER_FUTURE_MODE=1 php php-cs-fixer --diff --dry-run -v fix

+ 2 - 1
composer.json

@@ -34,7 +34,8 @@
     "require-dev": {
         "johnkary/phpunit-speedtrap": "^1.1 || ^2.0@dev",
         "justinrainbow/json-schema": "^5.0",
-        "php-coveralls/php-coveralls": "^1.0.2",
+        "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",
         "symfony/phpunit-bridge": "^3.2.2 || ^4.0"

+ 2 - 2
doc/COOKBOOK-FIXERS.md

@@ -28,7 +28,7 @@ classes.
 ## Assumptions
 
 * You are familiar with Test Driven Development.
-* Forked FriendsOfPHP/PHP-CS-Fixer into your own Github Account.
+* Forked FriendsOfPHP/PHP-CS-Fixer into your own GitHub Account.
 * Cloned your forked repository locally.
 * Installed the dependencies of PHP CS Fixer using [Composer](https://getcomposer.org/).
 * You have read [`CONTRIBUTING.md`](/CONTRIBUTING.md).
@@ -428,7 +428,7 @@ This will fix all the coding style mistakes.
 
 After the final CS fix, you are ready to commit. Do it.
 
-Now, go to Github and open a Pull Request.
+Now, go to GitHub and open a Pull Request.
 
 
 ### Step 5 - Peer review: it is all about code and community building.

Some files were not shown because too many files changed in this diff