composer.json 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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.2",
  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 <7.2",
  46. "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0"
  47. },
  48. "require-dev": {
  49. "facile-it/paraunit": "^1.3.1 || ^2.4",
  50. "infection/infection": "^0.29.8",
  51. "justinrainbow/json-schema": "^5.3 || ^6.0",
  52. "keradus/cli-executor": "^2.1",
  53. "mikey179/vfsstream": "^1.6.12",
  54. "php-coveralls/php-coveralls": "^2.7",
  55. "php-cs-fixer/accessible-object": "^1.1",
  56. "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.5",
  57. "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.5",
  58. "phpunit/phpunit": "^9.6.21 || ^10.5.38 || ^11.4.3",
  59. "symfony/var-dumper": "^5.4.47 || ^6.4.15 || ^7.1.8",
  60. "symfony/yaml": "^5.4.45 || ^6.4.13 || ^7.1.6"
  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. "exclude-from-classmap": [
  71. "src/Fixer/Internal/*"
  72. ]
  73. },
  74. "autoload-dev": {
  75. "psr-4": {
  76. "PhpCsFixer\\PHPStan\\": "dev-tools/phpstan/src/",
  77. "PhpCsFixer\\Tests\\": "tests/"
  78. },
  79. "exclude-from-classmap": [
  80. "tests/Fixtures/"
  81. ]
  82. },
  83. "bin": [
  84. "php-cs-fixer"
  85. ],
  86. "config": {
  87. "allow-plugins": {
  88. "ergebnis/composer-normalize": true,
  89. "infection/extension-installer": false
  90. },
  91. "prefer-stable": true,
  92. "sort-packages": true
  93. },
  94. "scripts": {
  95. "post-autoload-dump": [
  96. "@install-tools"
  97. ],
  98. "auto-review": [
  99. "Composer\\Config::disableProcessTimeout",
  100. "paraunit run --testsuite auto-review"
  101. ],
  102. "cs:check": "@php php-cs-fixer check --verbose --diff",
  103. "cs:fix": "@php php-cs-fixer fix",
  104. "cs:fix:parallel": [
  105. "echo '⚠️ This script is deprecated! Utilise built-in parallelisation instead.';",
  106. "@cs:fix"
  107. ],
  108. "docs": "@php dev-tools/doc.php",
  109. "infection": "@test:mutation",
  110. "install-tools": "@composer --working-dir=dev-tools install",
  111. "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/*",
  112. "normalize": [
  113. "@composer normalize --working-dir=dev-tools --dry-run ../composer.json",
  114. "@composer normalize --working-dir=dev-tools --dry-run composer.json"
  115. ],
  116. "normalize:fix": [
  117. "@composer normalize --working-dir=dev-tools ../composer.json",
  118. "@composer normalize --working-dir=dev-tools composer.json"
  119. ],
  120. "phpstan": "@php -d memory_limit=512M dev-tools/vendor/bin/phpstan analyse",
  121. "phpstan:baseline": "@php -d memory_limit=512M dev-tools/vendor/bin/phpstan analyse --generate-baseline=./dev-tools/phpstan/baseline.php",
  122. "qa": "@quality-assurance",
  123. "quality-assurance": [
  124. "Composer\\Config::disableProcessTimeout",
  125. "@install-tools --quiet",
  126. "@self-check",
  127. "@static-analysis",
  128. "@test"
  129. ],
  130. "require-checker": "@php dev-tools/vendor/bin/composer-require-checker check composer.json --config-file .composer-require-checker.json",
  131. "sa": "@static-analysis",
  132. "self-check": [
  133. "./dev-tools/check_file_permissions.sh",
  134. "./dev-tools/check_trailing_spaces.sh",
  135. "@composer dump-autoload --dry-run --optimize --strict-psr",
  136. "@normalize",
  137. "@unused-deps",
  138. "@require-checker",
  139. "@auto-review"
  140. ],
  141. "static-analysis": [
  142. "@cs:check",
  143. "@phpstan",
  144. "@mess-detector"
  145. ],
  146. "test": "@test:all",
  147. "test:all": [
  148. "@test:unit",
  149. "@test:integration"
  150. ],
  151. "test:coverage": [
  152. "Composer\\Config::disableProcessTimeout",
  153. "@composer show facile-it/paraunit ^2 && (paraunit coverage --testsuite unit --pass-through=--exclude-group=covers-nothing) || (paraunit coverage --testsuite unit --exclude-group covers-nothing)"
  154. ],
  155. "test:integration": [
  156. "Composer\\Config::disableProcessTimeout",
  157. "paraunit run --testsuite integration"
  158. ],
  159. "test:mutation": [
  160. "Composer\\Config::disableProcessTimeout",
  161. "infection --threads=max --only-covered --min-covered-msi=80"
  162. ],
  163. "test:short-open-tag": [
  164. "Composer\\Config::disableProcessTimeout",
  165. "@php -d short_open_tag=1 ./vendor/bin/phpunit --do-not-cache-result --testsuite short-open-tag"
  166. ],
  167. "test:smoke": [
  168. "Composer\\Config::disableProcessTimeout",
  169. "paraunit run --testsuite smoke"
  170. ],
  171. "test:unit": [
  172. "Composer\\Config::disableProcessTimeout",
  173. "paraunit run --testsuite unit"
  174. ],
  175. "unused-deps": "@php dev-tools/vendor/bin/composer-unused --excludePackage=composer/xdebug-handler"
  176. },
  177. "scripts-descriptions": {
  178. "auto-review": "Execute Auto-review",
  179. "cs:check": "Check coding standards",
  180. "cs:fix": "Fix coding standards",
  181. "cs:fix:parallel": "⚠️DEPRECATED! Use cs:fix with proper parallel config",
  182. "docs": "Regenerate docs",
  183. "infection": "Alias for 'test:mutation'",
  184. "install-tools": "Install DEV tools",
  185. "mess-detector": "Analyse code with Mess Detector",
  186. "normalize": "Check normalization for composer.json files",
  187. "normalize:fix": "Run normalization for composer.json files",
  188. "phpstan": "Run PHPStan analysis",
  189. "phpstan:baseline": "Dump PHPStan baseline file - use only for updating, do not add new errors when possible",
  190. "post-autoload-dump": "Run additional tasks after installing/updating main dependencies",
  191. "qa": "Alias for 'quality-assurance'",
  192. "quality-assurance": "Run QA suite",
  193. "require-checker": "Verifies if codebase does not contain soft dependencies",
  194. "sa": "Alias for 'static-analysis'",
  195. "self-check": "Run set of self-checks ensuring repository's validity",
  196. "static-analysis": "Run static analysis",
  197. "test": "Alias for 'test:all'",
  198. "test:all": "Run Unit and Integration tests (but *NOT* Smoke tests)",
  199. "test:coverage": "Run tests that provide code coverage",
  200. "test:integration": "Run Integration tests",
  201. "test:mutation": "Run mutation tests",
  202. "test:short-open-tag": "Run tests with \"short_open_tag\" enabled",
  203. "test:smoke": "Run Smoke tests",
  204. "test:unit": "Run Unit tests",
  205. "unused-deps": "Verifies if app has dependencies that are not used"
  206. }
  207. }