PHP CS Fixer v2.0.0 Release Notes

    • ๐Ÿ› bug #1001 MethodArgumentSpaceFixer - no need for multiple executions (keradus)
    • ๐Ÿ› bug #1006 NewWithBracesFixer - fix by adding BraceClassInstantiationTransformer (sstok)
    • ๐Ÿ› bug #1077 ConfigInterface - add missing methods (localheinz)
    • ๐Ÿ› bug #1103 added missing keyword token (gharlan)
    • ๐Ÿ› bug #1107 Added ImportTransformer (gharlan)
    • ๐Ÿ› bug #1157 Prevent token collection corruption by fixers (keradus, stof)
    • ๐Ÿ› bug #1256 Do not write the fixed output twice (SpacePossum)
    • ๐Ÿ› bug #1405 Linter - fix ignoring input parameter for constructor (keradus)
    • ๐Ÿ› bug #1414 Linter - fix escaping the php binary (GrahamCampbell, keradus)
    • bug #1606 Fixer - remove duplicate file_get_contents call (gharlan)
    • ๐Ÿ› bug #1629 Fix linting test cases (gharlan)
    • ๐Ÿ› bug #1800 ConfigurationResolver - Fix resolving intersection path (keradus)
    • ๐Ÿ› bug #1809 NoMultilineWhitespaceBeforeSemicolonsFixer - Semicolon should not be moved into comment (SpacePossum)
    • ๐Ÿ› bug #1838 BracesFixer - Removes line break (SpacePossum)
    • ๐Ÿ› bug #1847 Runner - always cache files, not only when something is changed (gharlan)
    • ๐Ÿ› bug #1852 ConfigurationResolver - disallow empty rule name (keradus)
    • ๐Ÿ› bug #1855 FixCommand - fix passing NullLinter to Runner (keradus)
    • ๐Ÿ› bug #1926 NoUselessElseFixer - fix wrong if handling (SpacePossum)
    • ๐Ÿ› bug #1946 NoEmptyCommentFixer - Only remove complete empty comment blocks (SpacePossum)
    • ๐Ÿ› bug #1965 AbstractPsrAutoloadingFixer - fix edge case of halting compiler for PHP 5.3 (keradus)
    • ๐Ÿ› bug #1974 composer.json - fix dependencies for PHP 5.3.6 (keradus)
    • ๐Ÿ› bug #2025 NoShortEchoTagFixer - adjust isCandidate check for hhvm (keradus)
    • ๐Ÿ› bug #2039 NoExtraConsecutiveBlankLinesFixer - Fix curly brace open false positive (SpacePossum)
    • ๐Ÿ› bug #2044 SingleClassElementPerStatementFixer - fix array handling (keradus)
    • ๐Ÿ› bug #2063 ConfigurationResolver - passing non-existing path is ignored (keradus)
    • ๐Ÿ› bug #2236 .gitattributes - fix ignoring tests during export (keradus)
    • ๐Ÿ› bug #2241 XmlReporter - fix used getter (keradus)
    • ๐Ÿ› bug #2283 FixCommand - Fix resolving format option (SpacePossum, keradus)
    • ๐Ÿ› bug #2287 NoExtraConsecutiveBlankLinesFixer - fix bug that removes empty line already after scope end (keradus)
    • ๐Ÿ› bug #2290 FixCommand - fix progress (keradus)
    • ๐Ÿ› bug #2292 GeneralPhpdocAnnotation*Fixer::configure - add missing return (keradus)
    • ๐Ÿ› bug #2305 ProcessLinter - fix running under phpdbg (keradus)
    • ๐Ÿ”‹ feature #1076 Enhancement: Allow to specify cache file (localheinz, keradus)
    • ๐Ÿ”‹ feature #1088 JoinFunctionFixer -> AliasFunctionsFixer (kalessil)
    • ๐Ÿ”‹ feature #1275 Added PhpdocInlineTagFixer (SpacePossum, keradus)
    • ๐Ÿ”‹ feature #1292 Added MethodSeparationFixer (SpacePossum)
    • ๐Ÿ”‹ feature #1383 Introduce rules and sets (keradus)
    • ๐Ÿ”‹ feature #1416 Mark fixers as risky (keradus)
    • ๐Ÿ”‹ feature #1440 Made AbstractFixerTestCase and AbstractIntegrationTestCase public (keradus)
    • ๐Ÿ”‹ feature #1489 Added Psr4Fixer (GrahamCampbell)
    • ๐Ÿ”‹ feature #1497 ExtraEmptyLinesFixer - allow to remove empty blank lines after configured tags (SpacePossum)
    • ๐Ÿ”‹ feature #1529 Added PhpdocPropertyFixer, refactored Tag and Annotation (GrahamCampbell)
    • ๐Ÿ”‹ feature #1628 Added OrderedClassElementsFixer (gharlan)
    • ๐Ÿ”‹ feature #1742 path argument is used to create an intersection with existing finder (keradus, gharlan)
    • ๐Ÿ”‹ feature #1779 Added GeneralPhpdocAnnotationRemoveFixer, GeneralPhpdocAnnotationRenameFixer (keradus)
    • ๐Ÿ”‹ feature #1811 Added NoSpacesInsideOfssetFixer (phansys)
    • ๐Ÿ”‹ feature #1819 Added DirConstantFixer, ModernizeTypesCastingFixer, RandomApiMigrationFixer (kalessil, SpacePossum, keradus)
    • ๐Ÿ”‹ feature #1825 Added junit format (ekho)
    • ๐Ÿ”‹ feature #1862 FixerFactory - Do not allow conflicting fixers (SpacePossum)
    • ๐Ÿ”‹ feature #1888 Cache refactoring, better cache handling in dry-run mode (localheinz)
    • ๐Ÿ”‹ feature #1889 Added SingleClassElementPerStatementFixer (phansys, SpacePossum)
    • ๐Ÿ”‹ feature #1903 FixCommand - allow to pass multiple path argument (keradus)
    • ๐Ÿ”‹ feature #1913 Introduce path-mode CLI option (keradus)
    • ๐Ÿ”‹ feature #1949 Added DeclareStrictTypesFixer, introduce options for HeaderCommentFixer (Seldaek, SpacePossum, keradus)
    • feature #1955 Introduce CT_ARRAY_INDEX_CURLY_BRACE_OPEN and CT_ARRAY_INDEX_CURLY_BRACE_CLOSE (keradus)
    • ๐Ÿ”‹ feature #1958 Added NormalizeIndexBraceFixer (keradus)
    • ๐Ÿ”‹ feature #2069 Add semicolon after instruction fixer (SpacePossum)
    • feature #2089 Add no_spaces_around_offset fixer (phansys)
    • ๐Ÿ”‹ feature #2179 BinaryOperatorSpacesFixer - add (un)align configuration options (SpacePossum)
    • ๐Ÿ”‹ feature #2192 Add PowToExponentiationFixer (SpacePossum, keradus)
    • ๐Ÿ”‹ feature #2207 Added ReturnTypeDeclarationFixer (keradus)
    • ๐Ÿ”‹ feature #2213 VisibilityRequiredFixer - Add support for class const visibility added in PHP7.1. (SpacePossum)
    • ๐Ÿ”‹ feature #2221 Add support for user-defined whitespaces (keradus)
    • ๐Ÿ”‹ feature #2244 Config cleanup (keradus, SpacePossum)
    • ๐Ÿ”‹ feature #2247 PhpdocAnnotationWithoutDotFixer - support more cases (keradus)
    • ๐Ÿ”‹ feature #2289 Add PhpdocAddMissingParamAnnotationFixer (keradus)
    • ๐Ÿ”‹ feature #2331 Add DescribeCommand (keradus, SpacePossum)
    • ๐Ÿ”‹ feature #2332 New colours of diff on console (keradus)
    • ๐Ÿ”‹ feature #829 add support for .php_cs.dist file (keradus)
    • ๐Ÿ”‹ feature #998 MethodArgumentSpaceFixer - enhance, now only one space after comma (trilopin, keradus)
    • minor #1007 Simplify Transformers (keradus)
    • minor #1050 Make Config's setDir() fluent like the rest of methods (gonzaloserrano)
    • minor #1062 Added NamespaceOperatorTransformer (gharlan)
    • minor #1078 Exit status should be 0 if there are no errors (gharlan)
    • minor #1101 CS: fix project itself (localheinz)
    • minor #1102 Enhancement: List errors occurred before, during and after fixing (localheinz)
    • ๐Ÿšš minor #1105 Token::isStructureAlternativeEnd - remove unused method (keradus)
    • minor #1106 readme grooming (SpacePossum, keradus)
    • minor #1115 Fixer - simplify flow (keradus)
    • ๐Ÿ”จ minor #1118 Process output refactor (SpacePossum)
    • ๐Ÿ‘• minor #1132 Linter - public methods should be first (keradus)
    • minor #1134 Token::isWhitespace - simplify interface (keradus)
    • minor #1140 FixerInterface - check if fixer should be applied by isCandidate method (keradus)
    • ๐Ÿ‘• minor #1146 Linter - detect executable (keradus)
    • ๐Ÿ”ง minor #1156 deleted old ConfigurationResolver class (keradus)
    • minor #1160 Grammar fix to README (Falkirks)
    • ๐ŸŽ minor #1174 DefaultFinder - boost performance by not filtering when files array is empty (keradus)
    • minor #1179 Exit with non-zero if invalid files were detected prior to fixing (localheinz)
    • minor #1186 Finder - do not search for .xml and .yml files (keradus)
    • ๐Ÿšš minor #1206 BracesFixer::getClassyTokens - remove duplicated method (keradus)
    • minor #1222 Made fixers final (GrahamCampbell)
    • minor #1229 Tokens - Fix PHPDoc (SpacePossum)
    • minor #1241 More details on exceptions. (SpacePossum)
    • minor #1263 Made internal classes final (GrahamCampbell)
    • minor #1272 Readme - Add spaces around PHP-CS-Fixer headers (Soullivaneuh)
    • ๐Ÿ›  minor #1283 Error - Fixed type phpdoc (GrahamCampbell)
    • minor #1284 Token - Fix PHPDoc (SpacePossum)
    • minor #1314 Added missing internal annotations (keradus)
    • ๐Ÿšš minor #1329 Psr0Fixer - move to contrib level (gharlan)
    • minor #1340 Clean ups (SpacePossum)
    • ๐Ÿ‘• minor #1341 Linter - throw exception when write fails (SpacePossum)
    • ๐Ÿ‘• minor #1348 Linter - Prefer error output when throwing a linting exception (GrahamCampbell)
    • minor #1350 Add "phpt" as a valid extension (henriquemoody)
    • minor #1376 Add time and memory to XML report (junichi11)
    • โœ… minor #1387 Made all test classes final (keradus)
    • โœ… minor #1388 Made all tests internal (keradus)
    • โœ… minor #1390 Added ProjectCodeTest that tests if all classes inside tests are internal and final or abstract (keradus)
    • minor #1391 Fixer::getLevelAsString is no longer static (keradus)
    • minor #1392 Add report to XML report as the root node (junichi11)
    • minor #1394 Stop mixing level from config file and fixers from CLI arg when one of fixers has dash (keradus)
    • minor #1426 MethodSeparationFixer - Fix spacing around comments (SpacePossum, keradus)
    • minor #1432 Fixer check on factory (Soullivaneuh)
    • โœ… minor #1434 Add Test\AccessibleObject class (keradus)
    • minor #1442 FixerFactory - disallow to register multiple fixers with same name (keradus)
    • minor #1477 rename PhpdocShortDescriptionFixer into PhpdocSummaryFixer (keradus)
    • โœ… minor #1481 Fix running the tests (keradus)
    • ๐Ÿšš minor #1482 move AbstractTransformerTestBase class outside Tests dir (keradus)
    • minor #1530 Added missing internal annotation (GrahamCampbell)
    • minor #1534 Clean ups (SpacePossum)
    • minor #1536 Typo fix (fabpot)
    • ๐Ÿ›  minor #1555 Fixed indentation in composer.json (GrahamCampbell)
    • minor #1558 [2.0] Cleanup the tags property in the abstract phpdoc types fixer (GrahamCampbell)
    • ๐Ÿ–จ minor #1567 PrintToEchoFixer - add to symfony rule set (gharlan)
    • ๐ŸŽ minor #1607 performance improvement (gharlan)
    • minor #1621 Switch to PSR-4 (keradus)
    • ๐Ÿ”ง minor #1631 Configuration exceptions exception cases on master. (SpacePossum)
    • ๐Ÿšš minor #1646 Remove non-default Config/Finder classes (keradus)
    • minor #1648 Fixer - avoid extra calls to getFileRelativePathname (GrahamCampbell)
    • minor #1649 Consider the php version when caching (GrahamCampbell)
    • minor #1652 Rename namespace "Symfony\CS" to "PhpCsFixer" (gharlan)
    • minor #1666 new Runner, ProcessOutputInterface, DifferInterface and ResultInterface (keradus)
    • minor #1674 Config - add addCustomFixers method (PedroTroller)
    • โœ… minor #1677 Enhance tests (keradus)
    • minor #1695 Rename Fixers (keradus)
    • โฌ†๏ธ minor #1702 Upgrade guide (keradus)
    • ๐Ÿ”ง minor #1707 ExtraEmptyLinesFixer - fix configure docs (keradus)
    • ๐Ÿšš minor #1712 NoExtraConsecutiveBlankLinesFixer - Remove blankline after curly brace open (SpacePossum)
    • minor #1718 CLI: rename --config-file argument (keradus)
    • minor #1722 Renamed not_operators_with_space to not_operator_with_space (GrahamCampbell)
    • minor #1728 PhpdocNoSimplifiedNullReturnFixer - rename back to PhpdocNoEmptyReturnFixer (keradus)
    • minor #1729 Renamed whitespacy_lines to no_whitespace_in_blank_lines (GrahamCampbell)
    • minor #1731 FixCommand - value for config option is required (keradus)
    • ๐Ÿšš minor #1732 move fixer classes from level subdirs to thematic subdirs (gharlan, keradus)
    • ๐Ÿ”ง minor #1733 ConfigurationResolver - look for .php_cs file in cwd as well (keradus)
    • minor #1737 RuleSet/FixerFactory - sort arrays content (keradus)
    • ๐Ÿ”ง minor #1751 FixerInterface::configure - method should always override configuration, not patch it (keradus)
    • ๐Ÿšš minor #1752 Remove unused code (keradus)
    • minor #1756 Finder - clean up code (keradus)
    • ๐Ÿ”ง minor #1757 Psr0Fixer - change way of configuring the fixer (keradus)
    • ๐Ÿšš minor #1762 Remove ConfigInterface::getDir, ConfigInterface::setDir, Finder::setDir and whole FinderInterface (keradus)
    • ๐Ÿšš minor #1764 Remove ConfigAwareInterface (keradus)
    • ๐Ÿ”ง minor #1780 AbstractFixer - throw error on configuring non-configurable Fixer (keradus)
    • minor #1782 rename fixers (gharlan)
    • minor #1815 NoSpacesInsideParenthesisFixer - simplify implementation (keradus)
    • minor #1821 Ensure that PhpUnitDedicateAssertFixer runs after NoAliasFunctionsFixer, clean up NoEmptyCommentFixer (SpacePossum)
    • minor #1824 Reporting extracted to separate classes (ekho, keradus, SpacePossum)
    • ๐Ÿšš minor #1826 Fixer - remove measuring fixing time per file (keradus)
    • minor #1843 FileFilterIterator - add missing import (GrahamCampbell)
    • ๐Ÿ‘• minor #1845 FileCacheManager - Allow linting to determine the cache state too (GrahamCampbell)
    • minor #1846 FileFilterIterator - Corrected an iterator typehint (GrahamCampbell)
    • ๐Ÿšš minor #1848 DocBlock - Remove some old unused phpdoc tags (GrahamCampbell)
    • ๐Ÿšš minor #1856 NoDuplicateSemicolonsFixer - Remove overcomplete fixer (SpacePossum)
    • minor #1861 Fix: Ofsset should be Offset (localheinz)
    • ๐Ÿ–จ minor #1867 Print non-report output to stdErr (SpacePossum, keradus)
    • minor #1873 Enhancement: Show path to cache file if it exists (localheinz)
    • ๐Ÿ“ฆ minor #1875 renamed Composer package (fabpot)
    • minor #1882 Runner - Handle throwables too (GrahamCampbell)
    • minor #1886 PhpdocScalarFixer - Fix lowercase str to string too (GrahamCampbell)
    • โšก๏ธ minor #1940 README.rst - update CI example (keradus)
    • โœ… minor #1947 SCA, CS, add more tests (SpacePossum, keradus)
    • โœ… minor #1954 tests - stop using deprecated method (sebastianbergmann)
    • โœ… minor #1962 TextDiffTest - tests should not produce cache file (keradus)
    • ๐Ÿ‘• minor #1973 Introduce fast PHP7 based linter (keradus)
    • minor #1999 Runner - No need to determine relative file name twice (localheinz)
    • โœ… minor #2002 FileCacheManagerTest - Adjust name of test and variable (localheinz)
    • minor #2010 NoExtraConsecutiveBlankLinesFixer - SF rule set, add 'extra' (SpacePossum)
    • minor #2013 no_whitespace_in_blank_lines -> no_whitespace_in_blank_line (SpacePossum)
    • โœ… minor #2024 AbstractFixerTestCase - check if there is no duplicated Token instance inside Tokens collection (keradus)
    • โšก๏ธ minor #2031 COOKBOOK-FIXERS.md - update calling doTest method (keradus)
    • minor #2032 code grooming (keradus)
    • minor #2068 Code grooming (keradus)
    • ๐Ÿšš minor #2073 DeclareStrictTypesFixer - Remove fix CS fix logic from fixer. (SpacePossum)
    • ๐Ÿ‘• minor #2088 TokenizerLintingResult - expose line number of parsing error (keradus)
    • minor #2093 Tokens - add block type BLOCK_TYPE_ARRAY_INDEX_CURLY_BRACE (SpacePossum)
    • minor #2095 Transformers - add required PHP version (keradus)
    • minor #2096 Introduce CT for PHP7 (keradus)
    • minor #2119 Create @Symfony:risky ruleset (keradus)
    • ๐Ÿšš minor #2163 ClassKeywordRemoveFixerTest - Fix tests (SpacePossum)
    • minor #2180 FixCommand - don't refer to renamed rules (keradus)
    • ๐Ÿ‘• minor #2181 Disallow to disable linter (keradus)
    • minor #2194 semicolon_after_instruction,no_unneeded_control_parentheses prio issue (SpacePossum)
    • minor #2199 make fixers less risky (SpacePossum)
    • minor #2206 Add PHP70Migration ruleset (keradus)
    • โšก๏ธ minor #2217 SelfUpdateCommand - Print version of update fixer (SpacePossum)
    • โšก๏ธ minor #2223 update integration test format (keradus)
    • minor #2227 Stop polluting global namespace with CT (keradus)
    • โœ… minor #2237 DX: extend integration tests for PSR2 and Symfony rulesets (keradus)
    • minor #2240 Make some objects immutable (keradus)
    • minor #2251 ProtectedToPrivateFixer - fix priority, fix comments with new fixer names (SpacePossum)
    • ๐Ÿ”ง minor #2252 ClassDefinitionFixer - Set configuration of the fixer in the RuleSet of SF. (SpacePossum)
    • โœ… minor #2257 extend Symfony_whitespaces itest (keradus)
    • ๐Ÿ”ง minor #2258 README.rst - indicate configurable rules (keradus)
    • minor #2267 RuleSet - validate set (keradus)
    • minor #2268 Use strict parameters for PHP functions (keradus)
    • ๐Ÿ›  minor #2273 fixed typo (fabpot)
    • ๐Ÿ”€ minor #2274 ShortArraySyntaxFixer/LongArraySyntaxFixer - Merge conflicting fixers (SpacePossum)
    • minor #2275 Clean ups (SpacePossum)
    • minor #2278 Concat*Fixer - unify concat fixers (SpacePossum, keradus)
    • minor #2279 Use Prophecy (keradus)
    • minor #2284 Code grooming (SpacePossum)
    • minor #2285 IntegrationCase is now aware about RuleSet but not Fixers (keradus, SpacePossum)
    • minor #2286 Phpdoc*Fixer - unify rename fixers (SpacePossum, keradus)
    • ๐Ÿ”ง minor #2288 FixerInterface::configure(null) reset fixer to use default configuration (keradus)
    • minor #2291 Make fixers ready to use directly after creation (keradus)
    • minor #2295 Code grooming (keradus)
    • โœ… minor #2296 ProjectCodeTest - make test part of regular testsuite, not standalone one (keradus)
    • ๐Ÿ”ง minor #2298 ConfigurationResolver - grooming (SpacePossum)
    • minor #2300 Simplify rule set (SpacePossum, keradus)
    • ๐Ÿšš minor #2306 DeclareStrictTypesFixer - do not move tokens (SpacePossum)
    • minor #2312 RuleSet - sort rules (localheinz)
    • โœ… minor #2313 DX: provide doctyping for tests (keradus)
    • โœ… minor #2317 Add utests (keradus)
    • โœ… minor #2318 *TestCase - Reduce visibility of setUp() (localheinz)
    • minor #2319 Code grooming (keradus)
    • minor #2322 DX: use whitemessy aware assertion (keradus)
    • ๐Ÿ–จ minor #2324 Echo|Print*Fixer - unify printing fixers (SpacePossum, keradus)
    • minor #2337 Normalize rule naming (keradus)
    • ๐Ÿ‘ minor #2338 Drop hacks for unsupported HHVM (keradus)
    • minor #2339 Add some Fixer descriptions (SpacePossum, keradus)
    • minor #2343 PowToExponentiationFixer - allow to run on 5.6.0 as well (keradus)
    • minor #767 Add @internal tag (keradus)
    • ๐Ÿšš minor #807 Tokens::isMethodNameIsMagic - remove unused method (keradus)
    • minor #809 Split Tokens into Tokens and TokensAnalyzer (keradus)
    • minor #844 Renamed phpdoc_params to phpdoc_align (GrahamCampbell)
    • 0๏ธโƒฃ minor #854 Change default level to PSR2 (keradus)
    • 0๏ธโƒฃ minor #873 Config - using cache by default (keradus)
    • minor #902 change FixerInterface (keradus)
    • ๐Ÿšš minor #911 remove Token::$line (keradus)
    • minor #914 All Transformer classes should be named with Transformer as suffix (keradus)
    • minor #915 add UseTransformer (keradus)
    • minor #916 add ArraySquareBraceTransformer (keradus)
    • โœ… minor #917 clean up Transformer tests (keradus)
    • minor #919 CurlyBraceTransformer - one transformer to handle all curly braces transformations (keradus)
    • ๐Ÿšš minor #928 remove Token::getLine (keradus)
    • minor #929 add WhitespacyCommentTransformer (keradus)
    • ๐Ÿ“„ minor #937 fix docs/typehinting in few classes (keradus)
    • ๐Ÿšš minor #958 FileCacheManager - remove code for BC support (keradus)
    • ๐ŸŽ minor #979 Improve Tokens::clearEmptyTokens performance (keradus)
    • minor #981 Tokens - code grooming (keradus)
    • minor #988 Fixers - no need to search for tokens of given kind in extra loop (keradus)
    • minor #989 No need for loop in Token::equals (keradus)