composer.json 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. {
  2. "name": "shlinkio/shlink",
  3. "type": "project",
  4. "homepage": "https://shlink.io",
  5. "description": "A self-hosted and PHP-based URL shortener application with CLI and REST interfaces",
  6. "license": "MIT",
  7. "authors": [
  8. {
  9. "name": "Alejandro Celaya Alastrué",
  10. "homepage": "https://www.alejandrocelaya.com",
  11. "email": "alejandro@alejandrocelaya.com"
  12. }
  13. ],
  14. "require": {
  15. "php": "^7.4 || ^8.0",
  16. "ext-json": "*",
  17. "ext-pdo": "*",
  18. "akrabat/ip-address-middleware": "^2.0",
  19. "cakephp/chronos": "^2.0",
  20. "cocur/slugify": "^4.0",
  21. "doctrine/cache": "^1.9",
  22. "doctrine/migrations": "^3.0.2",
  23. "doctrine/orm": "2.8.1 || ^2.8.3",
  24. "endroid/qr-code": "3.x-dev#0f1613a as 3.10",
  25. "geoip2/geoip2": "^2.9",
  26. "guzzlehttp/guzzle": "^7.0",
  27. "happyr/doctrine-specification": "2.x-dev#cb116d3 as 2.0",
  28. "laminas/laminas-config": "^3.3",
  29. "laminas/laminas-config-aggregator": "^1.1",
  30. "laminas/laminas-diactoros": "^2.1.3",
  31. "laminas/laminas-inputfilter": "^2.10",
  32. "laminas/laminas-servicemanager": "^3.6",
  33. "laminas/laminas-stdlib": "^3.2",
  34. "lcobucci/jwt": "^4.0",
  35. "league/uri": "^6.2",
  36. "lstrojny/functional-php": "^1.15",
  37. "mezzio/mezzio": "^3.3",
  38. "mezzio/mezzio-fastroute": "^3.1",
  39. "mezzio/mezzio-problem-details": "^1.3",
  40. "mezzio/mezzio-swoole": "^3.3",
  41. "monolog/monolog": "^2.0",
  42. "nikolaposa/monolog-factory": "^3.1",
  43. "ocramius/proxy-manager": "^2.11",
  44. "pagerfanta/core": "^2.5",
  45. "php-middleware/request-id": "^4.1",
  46. "predis/predis": "^1.1",
  47. "pugx/shortid-php": "^0.7",
  48. "ramsey/uuid": "^3.9",
  49. "shlinkio/shlink-common": "^3.5",
  50. "shlinkio/shlink-config": "^1.0",
  51. "shlinkio/shlink-event-dispatcher": "^2.1",
  52. "shlinkio/shlink-importer": "^2.2",
  53. "shlinkio/shlink-installer": "^5.4",
  54. "shlinkio/shlink-ip-geolocation": "^1.5",
  55. "symfony/console": "^5.1",
  56. "symfony/filesystem": "^5.1",
  57. "symfony/lock": "^5.1",
  58. "symfony/mercure": "^0.4.1",
  59. "symfony/process": "^5.1",
  60. "symfony/string": "^5.1"
  61. },
  62. "require-dev": {
  63. "devster/ubench": "^2.1",
  64. "dms/phpunit-arraysubset-asserts": "^0.2.1",
  65. "eaglewu/swoole-ide-helper": "dev-master",
  66. "infection/infection": "^0.21.0",
  67. "phpspec/prophecy-phpunit": "^2.0",
  68. "phpstan/phpstan": "^0.12.64",
  69. "phpunit/php-code-coverage": "^9.2",
  70. "phpunit/phpunit": "^9.5",
  71. "roave/security-advisories": "dev-master",
  72. "shlinkio/php-coding-standard": "~2.1.1",
  73. "shlinkio/shlink-test-utils": "^2.1",
  74. "symfony/var-dumper": "^5.2",
  75. "veewee/composer-run-parallel": "^0.1.0"
  76. },
  77. "autoload": {
  78. "psr-4": {
  79. "Shlinkio\\Shlink\\CLI\\": "module/CLI/src",
  80. "Shlinkio\\Shlink\\Rest\\": "module/Rest/src",
  81. "Shlinkio\\Shlink\\Core\\": "module/Core/src"
  82. },
  83. "files": [
  84. "module/Core/functions/functions.php"
  85. ]
  86. },
  87. "autoload-dev": {
  88. "psr-4": {
  89. "ShlinkioTest\\Shlink\\CLI\\": "module/CLI/test",
  90. "ShlinkioTest\\Shlink\\Rest\\": "module/Rest/test",
  91. "ShlinkioApiTest\\Shlink\\Rest\\": "module/Rest/test-api",
  92. "ShlinkioTest\\Shlink\\Core\\": [
  93. "module/Core/test",
  94. "module/Core/test-db"
  95. ]
  96. },
  97. "files": [
  98. "config/test/constants.php"
  99. ]
  100. },
  101. "scripts": {
  102. "ci": [
  103. "@cs",
  104. "@stan",
  105. "@test:ci",
  106. "@infect:ci"
  107. ],
  108. "ci:parallel": [
  109. "@parallel cs stan test:unit:ci test:db:sqlite:ci test:db:mysql test:db:maria test:db:postgres test:db:ms",
  110. "@parallel test:api infect:ci:unit infect:ci:db"
  111. ],
  112. "cs": "phpcs",
  113. "cs:fix": "phpcbf",
  114. "stan": "phpstan analyse module/*/src/ module/*/config config docker/config data/migrations --level=6",
  115. "test": [
  116. "@test:unit",
  117. "@test:db",
  118. "@test:api"
  119. ],
  120. "test:ci": [
  121. "@test:unit:ci",
  122. "@test:db",
  123. "@test:api"
  124. ],
  125. "test:unit": "@php vendor/bin/phpunit --order-by=random --colors=always --coverage-php build/coverage-unit.cov --testdox",
  126. "test:unit:ci": "@test:unit --coverage-xml=build/coverage-unit/coverage-xml --log-junit=build/coverage-unit/junit.xml",
  127. "test:db": "@parallel test:db:sqlite:ci test:db:mysql test:db:maria test:db:postgres test:db:ms",
  128. "test:db:sqlite": "APP_ENV=test php vendor/bin/phpunit --order-by=random --colors=always --testdox -c phpunit-db.xml",
  129. "test:db:sqlite:ci": "@test:db:sqlite --coverage-php build/coverage-db.cov --coverage-xml=build/coverage-db/coverage-xml --log-junit=build/coverage-db/junit.xml",
  130. "test:db:mysql": "DB_DRIVER=mysql composer test:db:sqlite",
  131. "test:db:maria": "DB_DRIVER=maria composer test:db:sqlite",
  132. "test:db:postgres": "DB_DRIVER=postgres composer test:db:sqlite",
  133. "test:db:ms": "DB_DRIVER=mssql composer test:db:sqlite",
  134. "test:api": "bin/test/run-api-tests.sh",
  135. "test:unit:pretty": "@php vendor/bin/phpunit --order-by=random --colors=always --coverage-html build/coverage-unit-html",
  136. "infect:ci:base": "infection --threads=4 --log-verbosity=default --only-covered --skip-initial-tests",
  137. "infect:ci:unit": "@infect:ci:base --coverage=build/coverage-unit --min-msi=80",
  138. "infect:ci:db": "@infect:ci:base --coverage=build/coverage-db --min-msi=95 --configuration=infection-db.json",
  139. "infect:ci": "@parallel infect:ci:unit infect:ci:db",
  140. "infect:test": [
  141. "@parallel test:unit:ci test:db:sqlite:ci",
  142. "@infect:ci"
  143. ],
  144. "clean:dev": "rm -f data/database.sqlite && rm -f config/params/generated_config.php"
  145. },
  146. "scripts-descriptions": {
  147. "ci": "<fg=blue;options=bold>Alias for \"cs\", \"stan\", \"test:ci\" and \"infect:ci\"</>",
  148. "ci:parallel": "<fg=blue;options=bold>Same as \"ci\", but parallelizing tasks as much as possible</>",
  149. "cs": "<fg=blue;options=bold>Checks coding styles</>",
  150. "cs:fix": "<fg=blue;options=bold>Fixes coding styles, when possible</>",
  151. "stan": "<fg=blue;options=bold>Inspects code with phpstan</>",
  152. "test": "<fg=blue;options=bold>Runs all test suites</>",
  153. "test:ci": "<fg=blue;options=bold>Runs all test suites, generating all needed reports and logs for CI envs</>",
  154. "test:unit": "<fg=blue;options=bold>Runs unit test suites</>",
  155. "test:unit:ci": "<fg=blue;options=bold>Runs unit test suites, generating all needed reports and logs for CI envs</>",
  156. "test:db": "<fg=blue;options=bold>Runs database test suites on a SQLite, MySQL, MariaDB, PostgreSQL and MsSQL</>",
  157. "test:db:sqlite": "<fg=blue;options=bold>Runs database test suites on a SQLite database</>",
  158. "test:db:sqlite:ci": "<fg=blue;options=bold>Runs database test suites on a SQLite database, generating all needed reports and logs for CI envs</>",
  159. "test:db:mysql": "<fg=blue;options=bold>Runs database test suites on a MySQL database</>",
  160. "test:db:maria": "<fg=blue;options=bold>Runs database test suites on a MariaDB database</>",
  161. "test:db:postgres": "<fg=blue;options=bold>Runs database test suites on a PostgreSQL database</>",
  162. "test:db:ms": "<fg=blue;options=bold>Runs database test suites on a Miscrosoft SQL Server database</>",
  163. "test:api": "<fg=blue;options=bold>Runs API test suites</>",
  164. "test:unit:pretty": "<fg=blue;options=bold>Runs unit test suites and generates an HTML code coverage report</>",
  165. "infect:ci": "<fg=blue;options=bold>Checks unit and db tests quality applying mutation testing with existing reports and logs</>",
  166. "infect:ci:unit": "<fg=blue;options=bold>Checks unit tests quality applying mutation testing with existing reports and logs</>",
  167. "infect:ci:db": "<fg=blue;options=bold>Checks db tests quality applying mutation testing with existing reports and logs</>",
  168. "infect:test": "<fg=blue;options=bold>Runs unit and db tests, then checks tests quality applying mutation testing</>",
  169. "clean:dev": "<fg=blue;options=bold>Deletes artifacts which are gitignored and could affect dev env</>"
  170. },
  171. "config": {
  172. "sort-packages": true,
  173. "platform-check": false
  174. }
  175. }