composer.json 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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. "justinrainbow/json-schema": "^5.2",
  44. "keradus/cli-executor": "^2.1",
  45. "mikey179/vfsstream": "^1.6.11",
  46. "php-coveralls/php-coveralls": "^2.7",
  47. "php-cs-fixer/accessible-object": "^1.1",
  48. "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.4",
  49. "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.4",
  50. "phpunit/phpunit": "^9.6 || ^10.5.5 || ^11.0.2",
  51. "symfony/var-dumper": "^5.4 || ^6.0 || ^7.0",
  52. "symfony/yaml": "^5.4 || ^6.0 || ^7.0"
  53. },
  54. "suggest": {
  55. "ext-dom": "For handling output formats in XML",
  56. "ext-mbstring": "For handling non-UTF8 characters."
  57. },
  58. "autoload": {
  59. "psr-4": {
  60. "PhpCsFixer\\": "src/"
  61. }
  62. },
  63. "autoload-dev": {
  64. "psr-4": {
  65. "PhpCsFixer\\Tests\\": "tests/"
  66. }
  67. },
  68. "bin": [
  69. "php-cs-fixer"
  70. ],
  71. "config": {
  72. "allow-plugins": {
  73. "ergebnis/composer-normalize": true,
  74. "infection/extension-installer": false
  75. },
  76. "prefer-stable": true,
  77. "sort-packages": true
  78. },
  79. "scripts": {
  80. "post-autoload-dump": [
  81. "@install-tools"
  82. ],
  83. "auto-review": [
  84. "Composer\\Config::disableProcessTimeout",
  85. "paraunit run --testsuite auto-review"
  86. ],
  87. "cs:check": "@php php-cs-fixer check --verbose --diff",
  88. "cs:fix": "@php php-cs-fixer fix",
  89. "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",
  90. "docs": "@php dev-tools/doc.php",
  91. "install-tools": "@composer --working-dir=dev-tools install",
  92. "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/*",
  93. "normalize": [
  94. "@composer normalize --working-dir=dev-tools --dry-run ../composer.json",
  95. "@composer normalize --working-dir=dev-tools --dry-run composer.json"
  96. ],
  97. "phpstan": "@php -d memory_limit=512M dev-tools/vendor/bin/phpstan analyse",
  98. "phpstan:baseline": "@php -d memory_limit=512M dev-tools/vendor/bin/phpstan analyse --generate-baseline=./dev-tools/phpstan/baseline.php",
  99. "qa": "@quality-assurance",
  100. "quality-assurance": [
  101. "Composer\\Config::disableProcessTimeout",
  102. "@install-tools --quiet",
  103. "@self-check",
  104. "@static-analysis",
  105. "@test"
  106. ],
  107. "require-checker": "@php dev-tools/vendor/bin/composer-require-checker check composer.json --config-file .composer-require-checker.json",
  108. "sa": "@static-analysis",
  109. "self-check": [
  110. "./dev-tools/check_file_permissions.sh",
  111. "./dev-tools/check_trailing_spaces.sh",
  112. "@normalize",
  113. "@unused-deps",
  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. "@composer show facile-it/paraunit ^2 && (paraunit coverage --testsuite unit --pass-through=--exclude-group=covers-nothing) || (paraunit coverage --testsuite unit --exclude-group covers-nothing)"
  130. ],
  131. "test:integration": [
  132. "Composer\\Config::disableProcessTimeout",
  133. "paraunit run --testsuite integration"
  134. ],
  135. "test:short-open-tag": [
  136. "Composer\\Config::disableProcessTimeout",
  137. "@php -d short_open_tag=1 ./vendor/bin/phpunit --do-not-cache-result --testsuite short-open-tag"
  138. ],
  139. "test:smoke": [
  140. "Composer\\Config::disableProcessTimeout",
  141. "paraunit run --testsuite smoke"
  142. ],
  143. "test:unit": [
  144. "Composer\\Config::disableProcessTimeout",
  145. "paraunit run --testsuite unit"
  146. ],
  147. "unused-deps": "@php dev-tools/vendor/bin/composer-unused --excludePackage=composer/xdebug-handler"
  148. },
  149. "scripts-descriptions": {
  150. "auto-review": "Execute Auto-review",
  151. "cs:check": "Check coding standards",
  152. "cs:fix": "Fix coding standards",
  153. "cs:fix:parallel": "Fix coding standards in naive parallel mode (using xargs)",
  154. "docs": "Regenerate docs",
  155. "install-tools": "Install DEV tools",
  156. "mess-detector": "Analyse code with Mess Detector",
  157. "normalize": "Run normalization for composer.json files",
  158. "phpstan": "Run PHPStan analysis",
  159. "phpstan:baseline": "Dump PHPStan baseline file - use only for updating, do not add new errors when possible",
  160. "post-autoload-dump": "Run additional tasks after installing/updating main dependencies",
  161. "qa": "Alias for 'quality-assurance'",
  162. "quality-assurance": "Run QA suite",
  163. "require-checker": "Verifies if codebase does not contain soft dependencies",
  164. "sa": "Alias for 'static-analysis'",
  165. "self-check": "Run set of self-checks ensuring repository's validity",
  166. "static-analysis": "Run static analysis",
  167. "test": "Alias for 'test:all'",
  168. "test:all": "Run Unit and Integration tests (but *NOT* Smoke tests)",
  169. "test:coverage": "Run tests that provide code coverage",
  170. "test:integration": "Run Integration tests",
  171. "test:short-open-tag": "Run tests with \"short_open_tag\" enabled",
  172. "test:smoke": "Run Smoke tests",
  173. "test:unit": "Run Unit tests",
  174. "unused-deps": "Verifies if app has dependencies that are not used"
  175. }
  176. }