composer.json 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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-filter": "*",
  25. "ext-json": "*",
  26. "ext-tokenizer": "*",
  27. "clue/ndjson-react": "^1.0",
  28. "composer/semver": "^3.4",
  29. "composer/xdebug-handler": "^3.0.3",
  30. "fidry/cpu-core-counter": "^1.0",
  31. "react/child-process": "^0.6.5",
  32. "react/event-loop": "^1.0",
  33. "react/promise": "^2.0 || ^3.0",
  34. "react/socket": "^1.0",
  35. "react/stream": "^1.0",
  36. "sebastian/diff": "^4.0 || ^5.0 || ^6.0",
  37. "symfony/console": "^5.4 || ^6.0 || ^7.0",
  38. "symfony/event-dispatcher": "^5.4 || ^6.0 || ^7.0",
  39. "symfony/filesystem": "^5.4 || ^6.0 || ^7.0",
  40. "symfony/finder": "^5.4 || ^6.0 || ^7.0",
  41. "symfony/options-resolver": "^5.4 || ^6.0 || ^7.0",
  42. "symfony/polyfill-mbstring": "^1.28",
  43. "symfony/polyfill-php80": "^1.28",
  44. "symfony/polyfill-php81": "^1.28",
  45. "symfony/process": "^5.4 || ^6.0 || ^7.0",
  46. "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0"
  47. },
  48. "require-dev": {
  49. "facile-it/paraunit": "^1.3 || ^2.0",
  50. "infection/infection": "^0.27.11",
  51. "justinrainbow/json-schema": "^5.2",
  52. "keradus/cli-executor": "^2.1",
  53. "mikey179/vfsstream": "^1.6.11",
  54. "php-coveralls/php-coveralls": "^2.7",
  55. "php-cs-fixer/accessible-object": "^1.1",
  56. "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.4",
  57. "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.4",
  58. "phpunit/phpunit": "^9.6 || ^10.5.5 || ^11.0.2",
  59. "symfony/var-dumper": "^5.4 || ^6.0 || ^7.0",
  60. "symfony/yaml": "^5.4 || ^6.0 || ^7.0"
  61. },
  62. "suggest": {
  63. "ext-dom": "For handling output formats in XML",
  64. "ext-mbstring": "For handling non-UTF8 characters."
  65. },
  66. "autoload": {
  67. "psr-4": {
  68. "PhpCsFixer\\": "src/"
  69. }
  70. },
  71. "autoload-dev": {
  72. "psr-4": {
  73. "PhpCsFixer\\Tests\\": "tests/"
  74. }
  75. },
  76. "bin": [
  77. "php-cs-fixer"
  78. ],
  79. "config": {
  80. "allow-plugins": {
  81. "ergebnis/composer-normalize": true,
  82. "infection/extension-installer": false
  83. },
  84. "prefer-stable": true,
  85. "sort-packages": true
  86. },
  87. "scripts": {
  88. "post-autoload-dump": [
  89. "@install-tools"
  90. ],
  91. "auto-review": [
  92. "Composer\\Config::disableProcessTimeout",
  93. "paraunit run --testsuite auto-review"
  94. ],
  95. "cs:check": "@php php-cs-fixer check --verbose --diff",
  96. "cs:fix": "@php php-cs-fixer fix",
  97. "cs:fix:parallel": [
  98. "echo '⚠️ This script is deprecated! Utilise built-in parallelisation instead.';",
  99. "@cs:fix"
  100. ],
  101. "docs": "@php dev-tools/doc.php",
  102. "infection": "@test:mutation",
  103. "install-tools": "@composer --working-dir=dev-tools install",
  104. "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/*",
  105. "normalize": [
  106. "@composer normalize --working-dir=dev-tools --dry-run ../composer.json",
  107. "@composer normalize --working-dir=dev-tools --dry-run composer.json"
  108. ],
  109. "phpstan": "@php -d memory_limit=512M dev-tools/vendor/bin/phpstan analyse",
  110. "phpstan:baseline": "@php -d memory_limit=512M dev-tools/vendor/bin/phpstan analyse --generate-baseline=./dev-tools/phpstan/baseline.php",
  111. "qa": "@quality-assurance",
  112. "quality-assurance": [
  113. "Composer\\Config::disableProcessTimeout",
  114. "@install-tools --quiet",
  115. "@self-check",
  116. "@static-analysis",
  117. "@test"
  118. ],
  119. "require-checker": "@php dev-tools/vendor/bin/composer-require-checker check composer.json --config-file .composer-require-checker.json",
  120. "sa": "@static-analysis",
  121. "self-check": [
  122. "./dev-tools/check_file_permissions.sh",
  123. "./dev-tools/check_trailing_spaces.sh",
  124. "@normalize",
  125. "@unused-deps",
  126. "@require-checker",
  127. "@auto-review"
  128. ],
  129. "static-analysis": [
  130. "@cs:check",
  131. "@phpstan",
  132. "@mess-detector"
  133. ],
  134. "test": "@test:all",
  135. "test:all": [
  136. "@test:unit",
  137. "@test:integration"
  138. ],
  139. "test:coverage": [
  140. "Composer\\Config::disableProcessTimeout",
  141. "@composer show facile-it/paraunit ^2 && (paraunit coverage --testsuite unit --pass-through=--exclude-group=covers-nothing) || (paraunit coverage --testsuite unit --exclude-group covers-nothing)"
  142. ],
  143. "test:integration": [
  144. "Composer\\Config::disableProcessTimeout",
  145. "paraunit run --testsuite integration"
  146. ],
  147. "test:mutation": [
  148. "Composer\\Config::disableProcessTimeout",
  149. "infection --threads=max --only-covered --min-covered-msi=80"
  150. ],
  151. "test:short-open-tag": [
  152. "Composer\\Config::disableProcessTimeout",
  153. "@php -d short_open_tag=1 ./vendor/bin/phpunit --do-not-cache-result --testsuite short-open-tag"
  154. ],
  155. "test:smoke": [
  156. "Composer\\Config::disableProcessTimeout",
  157. "paraunit run --testsuite smoke"
  158. ],
  159. "test:unit": [
  160. "Composer\\Config::disableProcessTimeout",
  161. "paraunit run --testsuite unit"
  162. ],
  163. "unused-deps": "@php dev-tools/vendor/bin/composer-unused --excludePackage=composer/xdebug-handler"
  164. },
  165. "scripts-descriptions": {
  166. "auto-review": "Execute Auto-review",
  167. "cs:check": "Check coding standards",
  168. "cs:fix": "Fix coding standards",
  169. "cs:fix:parallel": "⚠️DEPRECATED! Use cs:fix with proper parallel config",
  170. "docs": "Regenerate docs",
  171. "infection": "Alias for 'test:mutation'",
  172. "install-tools": "Install DEV tools",
  173. "mess-detector": "Analyse code with Mess Detector",
  174. "normalize": "Run normalization for composer.json files",
  175. "phpstan": "Run PHPStan analysis",
  176. "phpstan:baseline": "Dump PHPStan baseline file - use only for updating, do not add new errors when possible",
  177. "post-autoload-dump": "Run additional tasks after installing/updating main dependencies",
  178. "qa": "Alias for 'quality-assurance'",
  179. "quality-assurance": "Run QA suite",
  180. "require-checker": "Verifies if codebase does not contain soft dependencies",
  181. "sa": "Alias for 'static-analysis'",
  182. "self-check": "Run set of self-checks ensuring repository's validity",
  183. "static-analysis": "Run static analysis",
  184. "test": "Alias for 'test:all'",
  185. "test:all": "Run Unit and Integration tests (but *NOT* Smoke tests)",
  186. "test:coverage": "Run tests that provide code coverage",
  187. "test:integration": "Run Integration tests",
  188. "test:mutation": "Run mutation tests",
  189. "test:short-open-tag": "Run tests with \"short_open_tag\" enabled",
  190. "test:smoke": "Run Smoke tests",
  191. "test:unit": "Run Unit tests",
  192. "unused-deps": "Verifies if app has dependencies that are not used"
  193. }
  194. }