composer.json 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. {
  2. "name": "friendsofphp/php-cs-fixer",
  3. "description": "A tool to automatically fix PHP code style",
  4. "license": "MIT",
  5. "type": "application",
  6. "keywords": [
  7. "fixer",
  8. "standards",
  9. "static analysis",
  10. "static code analysis"
  11. ],
  12. "authors": [
  13. {
  14. "name": "Fabien Potencier",
  15. "email": "fabien@symfony.com"
  16. },
  17. {
  18. "name": "Dariusz Rumiński",
  19. "email": "dariusz.ruminski@gmail.com"
  20. }
  21. ],
  22. "require": {
  23. "php": "^7.4 || ^8.0",
  24. "ext-json": "*",
  25. "ext-tokenizer": "*",
  26. "composer/semver": "^3.3",
  27. "composer/xdebug-handler": "^3.0.3",
  28. "sebastian/diff": "^4.0 || ^5.0",
  29. "symfony/console": "^5.4 || ^6.0",
  30. "symfony/event-dispatcher": "^5.4 || ^6.0",
  31. "symfony/filesystem": "^5.4 || ^6.0",
  32. "symfony/finder": "^5.4 || ^6.0",
  33. "symfony/options-resolver": "^5.4 || ^6.0",
  34. "symfony/polyfill-mbstring": "^1.27",
  35. "symfony/polyfill-php80": "^1.27",
  36. "symfony/polyfill-php81": "^1.27",
  37. "symfony/process": "^5.4 || ^6.0",
  38. "symfony/stopwatch": "^5.4 || ^6.0"
  39. },
  40. "require-dev": {
  41. "facile-it/paraunit": "^1.3 || ^2.0",
  42. "justinrainbow/json-schema": "^5.2",
  43. "keradus/cli-executor": "^2.0",
  44. "mikey179/vfsstream": "^1.6.11",
  45. "php-coveralls/php-coveralls": "^2.5.3",
  46. "php-cs-fixer/accessible-object": "^1.1",
  47. "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2",
  48. "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1",
  49. "phpspec/prophecy": "^1.16",
  50. "phpspec/prophecy-phpunit": "^2.0",
  51. "phpunit/phpunit": "^9.5",
  52. "symfony/phpunit-bridge": "^6.2.3",
  53. "symfony/yaml": "^5.4 || ^6.0"
  54. },
  55. "suggest": {
  56. "ext-dom": "For handling output formats in XML",
  57. "ext-mbstring": "For handling non-UTF8 characters."
  58. },
  59. "autoload": {
  60. "psr-4": {
  61. "PhpCsFixer\\": "src/"
  62. }
  63. },
  64. "autoload-dev": {
  65. "psr-4": {
  66. "PhpCsFixer\\Tests\\": "tests/"
  67. }
  68. },
  69. "bin": [
  70. "php-cs-fixer"
  71. ],
  72. "config": {
  73. "allow-plugins": {
  74. "ergebnis/composer-normalize": true,
  75. "infection/extension-installer": false
  76. },
  77. "prefer-stable": true,
  78. "sort-packages": true
  79. },
  80. "scripts": {
  81. "post-autoload-dump": [
  82. "@install-tools"
  83. ],
  84. "auto-review": [
  85. "Composer\\Config::disableProcessTimeout",
  86. "paraunit run --testsuite auto-review"
  87. ],
  88. "cs:check": "@php php-cs-fixer check --diff",
  89. "cs:fix": "@php php-cs-fixer fix",
  90. "cs:fix:parallel": "echo '🔍 Will run in batches of 50 files.'; if [[ -f .php-cs-fixer.php ]]; then FIXER_CONFIG=.php-cs-fixer.php; else FIXER_CONFIG=.php-cs-fixer.dist.php; fi; php php-cs-fixer list-files --config=$FIXER_CONFIG | xargs -n 50 -P 8 php php-cs-fixer fix --config=$FIXER_CONFIG --path-mode intersection 2> /dev/null",
  91. "docs": "@php dev-tools/doc.php",
  92. "install-tools": "@composer --working-dir=dev-tools install",
  93. "mess-detector": "@php dev-tools/vendor/bin/phpmd . ansi dev-tools/mess-detector/phpmd.xml --exclude vendor/*,dev-tools/vendor/*,dev-tools/phpstan/*,tests/Fixtures/*",
  94. "normalize": [
  95. "@composer normalize --working-dir=dev-tools --dry-run ../composer.json",
  96. "@composer normalize --working-dir=dev-tools --dry-run composer.json"
  97. ],
  98. "phpstan": "@php -d memory_limit=512M dev-tools/vendor/bin/phpstan analyse",
  99. "phpstan:baseline": "@php -d memory_limit=512M dev-tools/vendor/bin/phpstan analyse --generate-baseline=./dev-tools/phpstan/baseline.php",
  100. "qa": "@quality-assurance",
  101. "quality-assurance": [
  102. "Composer\\Config::disableProcessTimeout",
  103. "@install-tools --quiet",
  104. "@self-check",
  105. "@static-analysis",
  106. "@test"
  107. ],
  108. "require-checker": "@php dev-tools/vendor/bin/composer-require-checker check composer.json --config-file .composer-require-checker.json",
  109. "sa": "@static-analysis",
  110. "self-check": [
  111. "./dev-tools/check_file_permissions.sh",
  112. "./dev-tools/check_trailing_spaces.sh",
  113. "@normalize",
  114. "@require-checker",
  115. "@auto-review"
  116. ],
  117. "static-analysis": [
  118. "@cs:check",
  119. "@phpstan",
  120. "@mess-detector"
  121. ],
  122. "test": "@test:all",
  123. "test:all": [
  124. "@test:unit",
  125. "@test:integration"
  126. ],
  127. "test:coverage": [
  128. "Composer\\Config::disableProcessTimeout",
  129. "paraunit coverage --testsuite unit --exclude-group covers-nothing"
  130. ],
  131. "test:integration": [
  132. "Composer\\Config::disableProcessTimeout",
  133. "paraunit run --testsuite integration"
  134. ],
  135. "test:smoke": [
  136. "Composer\\Config::disableProcessTimeout",
  137. "paraunit run --testsuite smoke"
  138. ],
  139. "test:unit": [
  140. "Composer\\Config::disableProcessTimeout",
  141. "paraunit run --testsuite unit"
  142. ]
  143. },
  144. "scripts-descriptions": {
  145. "auto-review": "Execute Auto-review",
  146. "cs:check": "Check coding standards",
  147. "cs:fix": "Fix coding standards",
  148. "cs:fix:parallel": "Fix coding standards in naive parallel mode (using xargs)",
  149. "docs": "Regenerate docs",
  150. "install-tools": "Install DEV tools",
  151. "mess-detector": "Analyse code with Mess Detector",
  152. "normalize": "Run normalization for composer.json files",
  153. "phpstan": "Run PHPStan analysis",
  154. "phpstan:baseline": "Dump PHPStan baseline file - use only for updating, do not add new errors when possible",
  155. "post-autoload-dump": "Run additional tasks after installing/updating main dependencies",
  156. "qa": "Alias for 'quality-assurance'",
  157. "quality-assurance": "Run QA suite",
  158. "require-checker": "Verifies if codebase does not contain soft dependencies",
  159. "sa": "Alias for 'static-analysis'",
  160. "self-check": "Run set of self-checks ensuring repository's validity",
  161. "static-analysis": "Run static analysis",
  162. "test": "Alias for 'test:all'",
  163. "test:all": "Run Unit and Integration tests (but *NOT* Smoke tests)",
  164. "test:coverage": "Run tests that provide code coverage",
  165. "test:integration": "Run Integration tests",
  166. "test:smoke": "Run Smoke tests",
  167. "test:unit": "Run Unit tests"
  168. }
  169. }