diff --git a/.circleci/config.yml b/.circleci/config.yml index 04415070..880abdc4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,7 +10,7 @@ jobs: steps: - checkout - run: php -v - - run: composer install --no-interaction --no-suggest --prefer-source + - run: composer install --no-interaction - run: XDEBUG_MODE=coverage php vendor/bin/phpunit --coverage-text php72: docker: @@ -18,7 +18,7 @@ jobs: steps: - checkout - run: php -v - - run: composer install --no-interaction --no-suggest --prefer-source + - run: composer install --no-interaction - run: XDEBUG_MODE=coverage php vendor/bin/phpunit --coverage-text php73: docker: @@ -26,7 +26,7 @@ jobs: steps: - checkout - run: php -v - - run: composer install --no-interaction --no-suggest --prefer-source + - run: composer install --no-interaction - run: XDEBUG_MODE=coverage php vendor/bin/phpunit --coverage-text php74: docker: @@ -34,7 +34,7 @@ jobs: steps: - checkout - run: php -v - - run: composer install --no-interaction --no-suggest --prefer-source + - run: composer install --no-interaction - run: XDEBUG_MODE=coverage php vendor/bin/phpunit --coverage-text php80: docker: @@ -42,7 +42,7 @@ jobs: steps: - checkout - run: php -v - - run: composer install --no-interaction --no-suggest --prefer-source + - run: composer install --no-interaction - run: XDEBUG_MODE=coverage php vendor/bin/phpunit --coverage-text workflows: version: 2 diff --git a/.gitignore b/.gitignore index ac89ebde..a6bde413 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ /phpbench.json /phpcs.xml /phpunit.xml +/psalm.xml /vendor/ diff --git a/README.md b/README.md index a7253883..f3f7e4ee 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -# HTTP router for PHP 7.1+ (incl. PHP 8 with attributes) based on PSR-7 and PSR-15 with support for annotations and OpenAPI (Swagger) Specification +# HTTP router for PHP 7.1+ based on PSR-7 and PSR-15 with support for annotations/attributes and OpenAPI (Swagger) Specification + +**psr router**, **router with annotations**, **router with attributes**, **php router**. [![Build Status](https://circleci.com/gh/sunrise-php/http-router.svg?style=shield)](https://circleci.com/gh/sunrise-php/http-router) [![Code Coverage](https://scrutinizer-ci.com/g/sunrise-php/http-router/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/sunrise-php/http-router/?branch=master) @@ -693,8 +695,6 @@ $router->setEventDispatcher($eventDispatcher); composer test ``` ---- - ## Useful links * https://www.php-fig.org/psr/psr-7/ diff --git a/composer.json b/composer.json index 2760633c..2b3b0962 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "sunrise/http-router", "homepage": "https://github.com/sunrise-php/http-router", - "description": "Sunrise // HTTP router for PHP 7.1+ (incl. PHP 8 with attributes) based on PSR-7 and PSR-15 with support for annotations and OpenApi Specification", + "description": "Sunrise // HTTP router for PHP 7.1+ based on PSR-7 and PSR-15 with support for annotations/attributes and OpenAPI (Swagger) Specification", "license": "MIT", "keywords": [ "fenric", @@ -22,8 +22,8 @@ "authors": [ { "name": "Anatoly Fenric", - "email": "anatoly@fenric.ru", - "homepage": "https://anatoly.fenric.ru/" + "email": "afenric@gmail.com", + "homepage": "https://github.com/fenric" } ], "require": { @@ -38,7 +38,7 @@ "require-dev": { "phpunit/phpunit": "7.5.20|9.5.0", "sunrise/coding-standard": "1.0.0", - "sunrise/http-factory": "1.1.0", + "sunrise/http-factory": "2.0.0", "doctrine/annotations": "^1.6", "symfony/console": "^4.4", "symfony/event-dispatcher": "^4.4" @@ -64,6 +64,7 @@ "scripts": { "test": [ "phpcs", + "psalm", "XDEBUG_MODE=coverage phpunit --coverage-text --colors=always" ], "build": [ diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 07bd1fa1..66c8dba8 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,12 +1,15 @@ - + ./src - + ./tests/ diff --git a/psalm.xml.dist b/psalm.xml.dist new file mode 100644 index 00000000..3becd9ba --- /dev/null +++ b/psalm.xml.dist @@ -0,0 +1,14 @@ + + + + + + + + +