composer.json 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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. "composer/semver": "^3.4",
  28. "composer/xdebug-handler": "^3.0.3",
  29. "sebastian/diff": "^4.0 || ^5.0 || ^6.0",
  30. "symfony/console": "^5.4 || ^6.0 || ^7.0",
  31. "symfony/event-dispatcher": "^5.4 || ^6.0 || ^7.0",
  32. "symfony/filesystem": "^5.4 || ^6.0 || ^7.0",
  33. "symfony/finder": "^5.4 || ^6.0 || ^7.0",
  34. "symfony/options-resolver": "^5.4 || ^6.0 || ^7.0",
  35. "symfony/polyfill-mbstring": "^1.28",
  36. "symfony/polyfill-php80": "^1.28",
  37. "symfony/polyfill-php81": "^1.28",
  38. "symfony/process": "^5.4 || ^6.0 || ^7.0",
  39. "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0"
  40. },
  41. "require-dev": {
  42. "facile-it/paraunit": "^1.3 || ^2.0",
  43. "infection/infection": "^0.27.11",
  44. "justinrainbow/json-schema": "^5.2",
  45. "keradus/cli-executor": "^2.1",
  46. "mikey179/vfsstream": "^1.6.11",
  47. "php-coveralls/php-coveralls": "^2.7",
  48. "php-cs-fixer/accessible-object": "^1.1",
  49. "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.4",
  50. "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.4",
  51. "phpunit/phpunit": "^9.6 || ^10.5.5 || ^11.0.2",
  52. "symfony/var-dumper": "^5.4 || ^6.0 || ^7.0",
  53. "symfony/yaml": "^5.4 || ^6.0 || ^7.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 --verbose --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. "infection": "@test:mutation",
  93. "install-tools": "@composer --working-dir=dev-tools install",
  94. "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/*",
  95. "normalize": [
  96. "@composer normalize --working-dir=dev-tools --dry-run ../composer.json",
  97. "@composer normalize --working-dir=dev-tools --dry-run composer.json"
  98. ],
  99. "phpstan": "@php -d memory_limit=512M dev-tools/vendor/bin/phpstan analyse",
  100. "phpstan:baseline": "@php -d memory_limit=512M dev-tools/vendor/bin/phpstan analyse --generate-baseline=./dev-tools/phpstan/baseline.php",
  101. "qa": "@quality-assurance",
  102. "quality-assurance": [
  103. "Composer\\Config::disableProcessTimeout",
  104. "@install-tools --quiet",
  105. "@self-check",
  106. "@static-analysis",
  107. "@test"
  108. ],
  109. "require-checker": "@php dev-tools/vendor/bin/composer-require-checker check composer.json --config-file .composer-require-checker.json",
  110. "sa": "@static-analysis",
  111. "self-check": [
  112. "./dev-tools/check_file_permissions.sh",
  113. "./dev-tools/check_trailing_spaces.sh",
  114. "@normalize",
  115. "@unused-deps",
  116. "@require-checker",
  117. "@auto-review"
  118. ],
  119. "static-analysis": [
  120. "@cs:check",
  121. "@phpstan",
  122. "@mess-detector"
  123. ],
  124. "test": "@test:all",
  125. "test:all": [
  126. "@test:unit",
  127. "@test:integration"
  128. ],
  129. "test:coverage": [
  130. "Composer\\Config::disableProcessTimeout",
  131. "@composer show facile-it/paraunit ^2 && (paraunit coverage --testsuite unit --pass-through=--exclude-group=covers-nothing) || (paraunit coverage --testsuite unit --exclude-group covers-nothing)"
  132. ],
  133. "test:integration": [
  134. "Composer\\Config::disableProcessTimeout",
  135. "paraunit run --testsuite integration"
  136. ],
  137. "test:mutation": [
  138. "Composer\\Config::disableProcessTimeout",
  139. "infection --threads=max --only-covered --min-covered-msi=80"
  140. ],
  141. "test:short-open-tag": [
  142. "Composer\\Config::disableProcessTimeout",
  143. "@php -d short_open_tag=1 ./vendor/bin/phpunit --do-not-cache-result --testsuite short-open-tag"
  144. ],
  145. "test:smoke": [
  146. "Composer\\Config::disableProcessTimeout",
  147. "paraunit run --testsuite smoke"
  148. ],
  149. "test:unit": [
  150. "Composer\\Config::disableProcessTimeout",
  151. "paraunit run --testsuite unit"
  152. ],
  153. "unused-deps": "@php dev-tools/vendor/bin/composer-unused --excludePackage=composer/xdebug-handler"
  154. },
  155. "scripts-descriptions": {
  156. "auto-review": "Execute Auto-review",
  157. "cs:check": "Check coding standards",
  158. "cs:fix": "Fix coding standards",
  159. "cs:fix:parallel": "Fix coding standards in naive parallel mode (using xargs)",
  160. "docs": "Regenerate docs",
  161. "infection": "Alias for 'test:mutation'",
  162. "install-tools": "Install DEV tools",
  163. "mess-detector": "Analyse code with Mess Detector",
  164. "normalize": "Run normalization for composer.json files",
  165. "phpstan": "Run PHPStan analysis",
  166. "phpstan:baseline": "Dump PHPStan baseline file - use only for updating, do not add new errors when possible",
  167. "post-autoload-dump": "Run additional tasks after installing/updating main dependencies",
  168. "qa": "Alias for 'quality-assurance'",
  169. "quality-assurance": "Run QA suite",
  170. "require-checker": "Verifies if codebase does not contain soft dependencies",
  171. "sa": "Alias for 'static-analysis'",
  172. "self-check": "Run set of self-checks ensuring repository's validity",
  173. "static-analysis": "Run static analysis",
  174. "test": "Alias for 'test:all'",
  175. "test:all": "Run Unit and Integration tests (but *NOT* Smoke tests)",
  176. "test:coverage": "Run tests that provide code coverage",
  177. "test:integration": "Run Integration tests",
  178. "test:mutation": "Run mutation tests",
  179. "test:short-open-tag": "Run tests with \"short_open_tag\" enabled",
  180. "test:smoke": "Run Smoke tests",
  181. "test:unit": "Run Unit tests",
  182. "unused-deps": "Verifies if app has dependencies that are not used"
  183. }
  184. }