diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 85e49bf..85418d3 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -6,6 +6,7 @@ on: - master pull_request: +jobs: roave-bc-check: name: Roave BC Check runs-on: ubuntu-latest @@ -15,4 +16,4 @@ on: uses: actions/checkout@v2 - name: Roave BC Check - uses: docker://nyholm/roave-bc-check-ga + uses: "docker://nyholm/roave-bc-check-ga" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c4cef58..b480393 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,6 +2,8 @@ name: CI on: push: + branches: + - master pull_request: jobs: @@ -25,13 +27,13 @@ jobs: - name: Install PHP 7 dependencies run: composer update --prefer-dist --no-interaction --no-progress - if: "matrix.php != '8.0'" + if: "startsWith(matrix.php, '7.')" - name: Install PHP 8 dependencies run: | composer require "phpdocumentor/reflection-docblock:^5.2@dev" --no-interaction --no-update composer update --prefer-dist --prefer-stable --no-interaction --no-progress --ignore-platform-req=php - if: "matrix.php == '8.0'" + if: "startsWith(matrix.php, '8.')" - name: Execute tests run: composer test @@ -41,7 +43,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: ['7.1', '7.2', '7.3', '7.4'] + php: ['7.1', '7.4', '8.0'] steps: - name: Checkout code diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 8257a56..a8dcf9a 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -10,7 +10,7 @@ jobs: phpstan: name: PHPStan runs-on: ubuntu-latest - + steps: - name: Checkout code uses: actions/checkout@v2 @@ -31,4 +31,4 @@ jobs: - name: PHP-CS-Fixer uses: docker://oskarstark/php-cs-fixer-ga with: - args: --dry-run --diff-format udiff + args: --dry-run diff --git a/.gitignore b/.gitignore index 1029e28..8bca981 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -.php_cs -.php_cs.cache +.php-cs-fixer.php +.php-cs-fixer.cache /build/ /composer.lock /phpspec.yml diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php new file mode 100644 index 0000000..83809c2 --- /dev/null +++ b/.php-cs-fixer.dist.php @@ -0,0 +1,16 @@ +in(__DIR__.'/src') + ->name('*.php') +; + +$config = (new PhpCsFixer\Config()) + ->setRiskyAllowed(true) + ->setRules([ + '@Symfony' => true, + ]) + ->setFinder($finder) +; + +return $config; diff --git a/.php_cs.dist b/.php_cs.dist deleted file mode 100644 index 770eee4..0000000 --- a/.php_cs.dist +++ /dev/null @@ -1,16 +0,0 @@ -setRiskyAllowed(true) - ->setRules([ - '@Symfony' => true, - 'array_syntax' => ['syntax' => 'short'], - ]) - ->setFinder( - PhpCsFixer\Finder::create() - ->in(__DIR__.'/src') - ->name('*.php') - ) -; - -return $config; diff --git a/.styleci.yml b/.styleci.yml deleted file mode 100644 index 5328b61..0000000 --- a/.styleci.yml +++ /dev/null @@ -1,14 +0,0 @@ -preset: symfony - -finder: - exclude: - - "spec" - path: - - "src" - - "tests" - -enabled: - - short_array_syntax - -disabled: - - phpdoc_annotation_without_dot # This is still buggy: https://github.com/symfony/symfony/pull/19198 diff --git a/README.md b/README.md index aabcf25..fbfa5ec 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Latest Version](https://img.shields.io/github/release/php-http/httplug.svg?style=flat-square)](https://github.com/php-http/httplug/releases) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) -[![Build Status](https://img.shields.io/travis/php-http/httplug/master.svg?style=flat-square)](https://travis-ci.org/php-http/httplug) +[![Build Status](https://github.com/php-http/httplug/actions/workflows/ci.yml/badge.svg)](https://github.com/php-http/httplug/actions/workflows/ci.yml) [![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/php-http/httplug.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/httplug) [![Quality Score](https://img.shields.io/scrutinizer/g/php-http/httplug.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/httplug) [![Total Downloads](https://img.shields.io/packagist/dt/php-http/httplug.svg?style=flat-square)](https://packagist.org/packages/php-http/httplug) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index d45d0a4..c1629a6 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,7 +1,7 @@ parameters: ignoreErrors: - - message: "#^Method Http\\\\Client\\\\Exception\\\\HttpException\\:\\:create\\(\\) has no return typehint specified\\.$#" + message: "#^Method Http\\\\Client\\\\Exception\\\\HttpException\\:\\:create\\(\\) has no return type specified\\.$#" count: 1 path: src/Exception/HttpException.php @@ -11,12 +11,11 @@ parameters: path: src/Exception/HttpException.php - - message: "#^Method Http\\\\Client\\\\Exception\\\\NetworkException\\:\\:setRequest\\(\\) has no return typehint specified\\.$#" + message: "#^Method Http\\\\Client\\\\Exception\\\\NetworkException\\:\\:setRequest\\(\\) has no return type specified\\.$#" count: 1 path: src/Exception/NetworkException.php - - message: "#^Method Http\\\\Client\\\\Exception\\\\RequestException\\:\\:setRequest\\(\\) has no return typehint specified\\.$#" + message: "#^Method Http\\\\Client\\\\Exception\\\\RequestException\\:\\:setRequest\\(\\) has no return type specified\\.$#" count: 1 path: src/Exception/RequestException.php -