composer.json 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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. "doctrine/annotations": "^2",
  29. "doctrine/lexer": "^2 || ^3",
  30. "sebastian/diff": "^4.0 || ^5.0",
  31. "symfony/console": "^5.4 || ^6.0",
  32. "symfony/event-dispatcher": "^5.4 || ^6.0",
  33. "symfony/filesystem": "^5.4 || ^6.0",
  34. "symfony/finder": "^5.4 || ^6.0",
  35. "symfony/options-resolver": "^5.4 || ^6.0",
  36. "symfony/polyfill-mbstring": "^1.27",
  37. "symfony/polyfill-php80": "^1.27",
  38. "symfony/polyfill-php81": "^1.27",
  39. "symfony/process": "^5.4 || ^6.0",
  40. "symfony/stopwatch": "^5.4 || ^6.0"
  41. },
  42. "require-dev": {
  43. "facile-it/paraunit": "^1.3 || ^2.0",
  44. "justinrainbow/json-schema": "^5.2",
  45. "keradus/cli-executor": "^2.0",
  46. "mikey179/vfsstream": "^1.6.11",
  47. "php-coveralls/php-coveralls": "^2.5.3",
  48. "php-cs-fixer/accessible-object": "^1.1",
  49. "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2",
  50. "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1",
  51. "phpspec/prophecy": "^1.16",
  52. "phpspec/prophecy-phpunit": "^2.0",
  53. "phpunit/phpunit": "^9.5",
  54. "phpunitgoodpractices/polyfill": "^1.6",
  55. "phpunitgoodpractices/traits": "^1.9.2",
  56. "symfony/phpunit-bridge": "^6.2.3",
  57. "symfony/yaml": "^5.4 || ^6.0"
  58. },
  59. "suggest": {
  60. "ext-dom": "For handling output formats in XML",
  61. "ext-mbstring": "For handling non-UTF8 characters."
  62. },
  63. "autoload": {
  64. "psr-4": {
  65. "PhpCsFixer\\": "src/"
  66. }
  67. },
  68. "autoload-dev": {
  69. "psr-4": {
  70. "PhpCsFixer\\Tests\\": "tests/"
  71. }
  72. },
  73. "bin": [
  74. "php-cs-fixer"
  75. ],
  76. "config": {
  77. "allow-plugins": {
  78. "ergebnis/composer-normalize": true
  79. },
  80. "sort-packages": true
  81. },
  82. "scripts": {
  83. "post-autoload-dump": [
  84. "@install-tools"
  85. ],
  86. "cs:check": "@php php-cs-fixer fix --dry-run --diff",
  87. "cs:fix": "@php php-cs-fixer fix",
  88. "docs": "@php dev-tools/doc.php",
  89. "install-tools": "@composer --working-dir=dev-tools install",
  90. "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/*",
  91. "normalize": [
  92. "@composer normalize --working-dir=dev-tools --dry-run ../composer.json",
  93. "@composer normalize --working-dir=dev-tools --dry-run composer.json"
  94. ],
  95. "phpstan": "@php -d memory_limit=512M dev-tools/vendor/bin/phpstan analyse",
  96. "phpstan:baseline": "@php -d memory_limit=512M dev-tools/vendor/bin/phpstan analyse --generate-baseline=./dev-tools/phpstan/baseline.php",
  97. "qa": "@quality-assurance",
  98. "quality-assurance": [
  99. "Composer\\Config::disableProcessTimeout",
  100. "@install-tools --quiet",
  101. "@normalize",
  102. "@self-check",
  103. "@sa",
  104. "@test"
  105. ],
  106. "sa": "@static-analysis",
  107. "self-check": [
  108. "./dev-tools/check_file_permissions.sh",
  109. "./dev-tools/check_trailing_spaces.sh"
  110. ],
  111. "static-analysis": [
  112. "@cs:check",
  113. "@phpstan",
  114. "@mess-detector"
  115. ],
  116. "test": "@test:all",
  117. "test:all": [
  118. "Composer\\Config::disableProcessTimeout",
  119. "paraunit run --testsuite all"
  120. ],
  121. "test:coverage": [
  122. "Composer\\Config::disableProcessTimeout",
  123. "paraunit run --testsuite coverage"
  124. ]
  125. },
  126. "scripts-descriptions": {
  127. "cs:check": "Check coding standards",
  128. "cs:fix": "Fix coding standards",
  129. "docs": "Regenerate docs",
  130. "install-tools": "Install DEV tools",
  131. "mess-detector": "Analyse code with Mess Detector",
  132. "normalize": "Run normalization for composer.json files",
  133. "phpstan": "Run PHPStan analysis",
  134. "phpstan:baseline": "Dump PHPStan baseline file - use only for updating, do not add new errors when possible",
  135. "post-autoload-dump": "Run additional tasks after installing/updating main dependencies",
  136. "qa": "Run QA suite",
  137. "quality-assurance": "Run QA suite",
  138. "sa": "Run static analysis",
  139. "self-check": "Run set of self-checks ensuring repository's validity",
  140. "static-analysis": "Run static analysis",
  141. "test": "Run tests",
  142. "test:all": "Run all tests",
  143. "test:coverage": "Run tool-related tests"
  144. }
  145. }