{ "name": "shlinkio/shlink", "type": "project", "homepage": "https://shlink.io", "description": "A self-hosted and PHP-based URL shortener application with CLI and REST interfaces", "license": "MIT", "authors": [ { "name": "Alejandro Celaya Alastrué", "homepage": "https://www.alejandrocelaya.com", "email": "alejandro@alejandrocelaya.com" } ], "require": { "php": "^8.2", "ext-curl": "*", "ext-gd": "*", "ext-json": "*", "ext-pdo": "*", "akrabat/ip-address-middleware": "^2.1", "cakephp/chronos": "^3.0.2", "doctrine/migrations": "^3.6", "doctrine/orm": "^2.16", "endroid/qr-code": "^4.8", "friendsofphp/proxy-manager-lts": "^1.0", "geoip2/geoip2": "^3.0", "guzzlehttp/guzzle": "^7.5", "happyr/doctrine-specification": "^2.0", "jaybizzle/crawler-detect": "^1.2.116", "laminas/laminas-config": "^3.8", "laminas/laminas-config-aggregator": "^1.13", "laminas/laminas-diactoros": "^2.25", "laminas/laminas-inputfilter": "^2.27", "laminas/laminas-servicemanager": "^3.21", "laminas/laminas-stdlib": "^3.17", "league/uri": "^6.8", "matomo/matomo-php-tracker": "^3.2", "mezzio/mezzio": "^3.17", "mezzio/mezzio-fastroute": "^3.10", "mezzio/mezzio-problem-details": "^1.13", "mezzio/mezzio-swoole": "^4.7", "mlocati/ip-lib": "^1.18", "mobiledetect/mobiledetectlib": "^4.8", "pagerfanta/core": "^3.8", "php-middleware/request-id": "^4.1", "pugx/shortid-php": "^1.1", "ramsey/uuid": "^4.7", "shlinkio/shlink-common": "dev-main#1f1b3b8 as 5.8", "shlinkio/shlink-config": "^2.5", "shlinkio/shlink-event-dispatcher": "^3.1", "shlinkio/shlink-importer": "dev-main#4616c54 as 5.3", "shlinkio/shlink-installer": "dev-develop#cb0eaea as 8.7", "shlinkio/shlink-ip-geolocation": "dev-main#e8406aa as 3.4", "shlinkio/shlink-json": "^1.1", "spiral/roadrunner": "^2023.2", "spiral/roadrunner-cli": "^2.5", "spiral/roadrunner-http": "^3.1", "spiral/roadrunner-jobs": "^4.0", "symfony/console": "^6.3", "symfony/filesystem": "^6.3", "symfony/lock": "^6.3", "symfony/process": "^6.3", "symfony/string": "^6.3" }, "require-dev": { "devizzent/cebe-php-openapi": "^1.0.1", "devster/ubench": "^2.1", "infection/infection": "^0.27", "openswoole/ide-helper": "~22.0.0", "phpstan/phpstan": "^1.10", "phpstan/phpstan-doctrine": "^1.3", "phpstan/phpstan-phpunit": "^1.3", "phpstan/phpstan-symfony": "^1.3", "phpunit/php-code-coverage": "^10.1", "phpunit/phpunit": "^10.4", "roave/security-advisories": "dev-master", "shlinkio/php-coding-standard": "~2.3.0", "shlinkio/shlink-test-utils": "^3.8", "symfony/var-dumper": "^6.3", "veewee/composer-run-parallel": "^1.3" }, "conflict": { "symfony/var-exporter": ">=6.3.9,<=6.4.0" }, "autoload": { "psr-4": { "Shlinkio\\Shlink\\CLI\\": "module/CLI/src", "Shlinkio\\Shlink\\Rest\\": "module/Rest/src", "Shlinkio\\Shlink\\Core\\": "module/Core/src" }, "files": [ "config/constants.php", "module/Core/functions/array-utils.php", "module/Core/functions/functions.php" ] }, "autoload-dev": { "psr-4": { "ShlinkioTest\\Shlink\\CLI\\": "module/CLI/test", "ShlinkioCliTest\\Shlink\\CLI\\": "module/CLI/test-cli", "ShlinkioTest\\Shlink\\Rest\\": "module/Rest/test", "ShlinkioApiTest\\Shlink\\Rest\\": "module/Rest/test-api", "ShlinkioDbTest\\Shlink\\Rest\\": "module/Rest/test-db", "ShlinkioTest\\Shlink\\Core\\": "module/Core/test", "ShlinkioDbTest\\Shlink\\Core\\": "module/Core/test-db", "ShlinkioApiTest\\Shlink\\Core\\": "module/Core/test-api" }, "files": [ "config/test/constants.php" ] }, "scripts": { "ci": [ "@parallel cs stan swagger:validate test:unit:ci test:db:sqlite:ci test:db:mysql test:db:maria test:db:postgres test:db:ms", "@parallel infect:test:api infect:test:cli infect:ci:unit infect:ci:db" ], "cs": "phpcs -s", "cs:fix": "phpcbf", "stan": "APP_ENV=test php vendor/bin/phpstan analyse module/*/src module/*/test* module/*/config config docker/config data/migrations --level=8", "test": [ "@parallel test:unit test:db", "@parallel test:api test:cli" ], "test:unit": "@php vendor/bin/phpunit --order-by=random --colors=always --testdox", "test:unit:ci": "@test:unit --coverage-php=build/coverage-unit.cov --coverage-xml=build/coverage-unit/coverage-xml --log-junit=build/coverage-unit/junit.xml", "test:unit:pretty": "@test:unit --coverage-html build/coverage-unit/coverage-html", "test:db": "@parallel test:db:sqlite:ci test:db:mysql test:db:maria test:db:postgres test:db:ms", "test:db:sqlite": "APP_ENV=test php vendor/bin/phpunit --order-by=random --colors=always --testdox -c phpunit-db.xml", "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", "test:db:mysql": "DB_DRIVER=mysql composer test:db:sqlite", "test:db:maria": "DB_DRIVER=maria composer test:db:sqlite", "test:db:postgres": "DB_DRIVER=postgres composer test:db:sqlite", "test:db:ms": "DB_DRIVER=mssql composer test:db:sqlite", "test:api": "bin/test/run-api-tests.sh", "test:api:rr": "TEST_RUNTIME=rr bin/test/run-api-tests.sh", "test:api:ci": "GENERATE_COVERAGE=yes composer test:api", "test:api:pretty": "GENERATE_COVERAGE=pretty composer test:api", "test:cli": "APP_ENV=test DB_DRIVER=maria TEST_ENV=cli php vendor/bin/phpunit --order-by=random --colors=always --testdox -c phpunit-cli.xml --log-junit=build/coverage-cli/junit.xml", "test:cli:ci": "GENERATE_COVERAGE=yes composer test:cli", "test:cli:pretty": "GENERATE_COVERAGE=pretty composer test:cli", "infect:ci:base": "infection --threads=max --only-covered --skip-initial-tests", "infect:ci:unit": "@infect:ci:base --coverage=build/coverage-unit --min-msi=80", "infect:ci:db": "@infect:ci:base --coverage=build/coverage-db --min-msi=95 --configuration=infection-db.json5", "infect:ci:api": "@infect:ci:base --coverage=build/coverage-api --min-msi=95 --configuration=infection-api.json5", "infect:ci:cli": "@infect:ci:base --coverage=build/coverage-cli --min-msi=90 --configuration=infection-cli.json5", "infect:ci": "@parallel infect:ci:unit infect:ci:db infect:ci:api infect:ci:cli", "infect:test": [ "@parallel test:unit:ci test:db:sqlite:ci test:api:ci", "@infect:ci" ], "infect:test:unit": [ "@test:unit:ci", "@infect:ci:unit" ], "infect:test:db": [ "@test:db:sqlite:ci", "@infect:ci:db" ], "infect:test:api": [ "@test:api:ci", "@infect:ci:api" ], "infect:test:cli": [ "@test:cli:ci", "@infect:ci:cli" ], "swagger:validate": "php-openapi validate docs/swagger/swagger.json", "swagger:inline": "php-openapi inline docs/swagger/swagger.json docs/swagger/swagger-inlined.json", "clean:dev": "rm -f data/database.sqlite && rm -f config/params/generated_config.php" }, "scripts-descriptions": { "ci": "Alias for \"cs\", \"stan\", \"swagger:validate\", \"test:ci\" and \"infect:ci\"", "cs": "Checks coding styles", "cs:fix": "Fixes coding styles, when possible", "stan": "Inspects code with phpstan", "test": "Runs all test suites", "test:unit": "Runs unit test suites", "test:unit:ci": "Runs unit test suites, generating all needed reports and logs for CI envs", "test:unit:pretty": "Runs unit test suites and generates an HTML code coverage report", "test:db": "Runs database test suites on a SQLite, MySQL, MariaDB, PostgreSQL and MsSQL", "test:db:sqlite": "Runs database test suites on a SQLite database", "test:db:sqlite:ci": "Runs database test suites on a SQLite database, generating all needed reports and logs for CI envs", "test:db:mysql": "Runs database test suites on a MySQL database", "test:db:maria": "Runs database test suites on a MariaDB database", "test:db:postgres": "Runs database test suites on a PostgreSQL database", "test:db:ms": "Runs database test suites on a Microsoft SQL Server database", "test:api": "Runs API test suites", "test:api:ci": "Runs API test suites, and generates code coverage for CI", "test:api:pretty": "Runs API test suites, and generates code coverage in HTML format", "test:cli": "Runs CLI test suites", "test:cli:ci": "Runs CLI test suites, and generates code coverage for CI", "test:cli:pretty": "Runs CLI test suites, and generates code coverage in HTML format", "infect:ci": "Checks unit and db tests quality applying mutation testing with existing reports and logs", "infect:ci:unit": "Checks unit tests quality applying mutation testing with existing reports and logs", "infect:ci:db": "Checks db tests quality applying mutation testing with existing reports and logs", "infect:test": "Runs unit and db tests, then checks tests quality applying mutation testing", "swagger:validate": "Validates the swagger docs, making sure they fulfil the spec", "swagger:inline": "Inlines swagger docs in a single file", "clean:dev": "Deletes artifacts which are gitignored and could affect dev env" }, "config": { "sort-packages": true, "platform-check": false, "allow-plugins": { "composer/package-versions-deprecated": true, "dealerdirect/phpcodesniffer-composer-installer": true, "infection/extension-installer": true, "veewee/composer-run-parallel": true } } }