composer.json 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  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. "phpunitgoodpractices/polyfill": "^1.6",
  53. "phpunitgoodpractices/traits": "^1.9.2",
  54. "symfony/phpunit-bridge": "^6.2.3",
  55. "symfony/yaml": "^5.4 || ^6.0"
  56. },
  57. "suggest": {
  58. "ext-dom": "For handling output formats in XML",
  59. "ext-mbstring": "For handling non-UTF8 characters."
  60. },
  61. "autoload": {
  62. "psr-4": {
  63. "PhpCsFixer\\": "src/"
  64. }
  65. },
  66. "autoload-dev": {
  67. "psr-4": {
  68. "PhpCsFixer\\Tests\\": "tests/"
  69. }
  70. },
  71. "bin": [
  72. "php-cs-fixer"
  73. ],
  74. "config": {
  75. "allow-plugins": {
  76. "ergebnis/composer-normalize": true
  77. },
  78. "sort-packages": true
  79. },
  80. "scripts": {
  81. "post-autoload-dump": [
  82. "@install-tools"
  83. ],
  84. "cs:check": "@php php-cs-fixer fix --dry-run --diff",
  85. "cs:fix": "@php php-cs-fixer fix",
  86. "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",
  87. "docs": "@php dev-tools/doc.php",
  88. "install-tools": "@composer --working-dir=dev-tools install",
  89. "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/*",
  90. "normalize": [
  91. "@composer normalize --working-dir=dev-tools --dry-run ../composer.json",
  92. "@composer normalize --working-dir=dev-tools --dry-run composer.json"
  93. ],
  94. "phpstan": "@php -d memory_limit=512M dev-tools/vendor/bin/phpstan analyse",
  95. "phpstan:baseline": "@php -d memory_limit=512M dev-tools/vendor/bin/phpstan analyse --generate-baseline=./dev-tools/phpstan/baseline.php",
  96. "qa": "@quality-assurance",
  97. "quality-assurance": [
  98. "Composer\\Config::disableProcessTimeout",
  99. "@install-tools --quiet",
  100. "@self-check",
  101. "@sa",
  102. "@test"
  103. ],
  104. "require-checker": "@php dev-tools/vendor/bin/composer-require-checker check composer.json --config-file .composer-require-checker.json",
  105. "sa": "@static-analysis",
  106. "self-check": [
  107. "./dev-tools/check_file_permissions.sh",
  108. "./dev-tools/check_trailing_spaces.sh",
  109. "@normalize",
  110. "@require-checker"
  111. ],
  112. "static-analysis": [
  113. "@cs:check",
  114. "@phpstan",
  115. "@mess-detector"
  116. ],
  117. "test": "@test:all",
  118. "test:all": [
  119. "Composer\\Config::disableProcessTimeout",
  120. "paraunit run --testsuite all"
  121. ],
  122. "test:coverage": [
  123. "Composer\\Config::disableProcessTimeout",
  124. "paraunit run --testsuite coverage"
  125. ]
  126. },
  127. "scripts-descriptions": {
  128. "cs:check": "Check coding standards",
  129. "cs:fix": "Fix coding standards",
  130. "cs:fix:parallel": "Fix coding standards in naive parallel mode (using xargs)",
  131. "docs": "Regenerate docs",
  132. "install-tools": "Install DEV tools",
  133. "mess-detector": "Analyse code with Mess Detector",
  134. "normalize": "Run normalization for composer.json files",
  135. "phpstan": "Run PHPStan analysis",
  136. "phpstan:baseline": "Dump PHPStan baseline file - use only for updating, do not add new errors when possible",
  137. "post-autoload-dump": "Run additional tasks after installing/updating main dependencies",
  138. "qa": "Alias for 'quality-assurance'",
  139. "quality-assurance": "Run QA suite",
  140. "require-checker": "Verifies if codebase does not contain soft dependencies",
  141. "sa": "Alias for 'static-analysis'",
  142. "self-check": "Run set of self-checks ensuring repository's validity",
  143. "static-analysis": "Run static analysis",
  144. "test": "Alias for 'test:all'",
  145. "test:all": "Run all tests",
  146. "test:coverage": "Run tool-related tests"
  147. }
  148. }