From d0ce1f28ad7617a304b3360f3e876170d3f7ccab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=93=AD=E6=98=95?= <715557344@qq.com> Date: Thu, 4 Jan 2024 17:01:14 +0800 Subject: [PATCH] Use default config name of phpunit and phpstan. --- .github/workflows/test.yml | 4 ++-- composer.json | 4 ++-- phpstan.neon => phpstan.neon.dist | 4 ++++ phpunit.xml => phpunit.xml.dist | 0 4 files changed, 8 insertions(+), 4 deletions(-) rename phpstan.neon => phpstan.neon.dist (93%) rename phpunit.xml => phpunit.xml.dist (100%) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7b68b23..24937b3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,8 +9,8 @@ jobs: strategy: matrix: os: [ ubuntu-latest ] - php-version: [ '8.1', '8.2' ] - swoole-version: [ 'v5.0.3', 'v5.1.0', 'master' ] + php-version: [ '8.1', '8.2', '8.3' ] + swoole-version: [ 'v5.0.3', 'v5.1.1', 'master' ] max-parallel: 5 env: SW_VERSION: ${{ matrix.swoole-version }} diff --git a/composer.json b/composer.json index 365951c..c93d3c2 100644 --- a/composer.json +++ b/composer.json @@ -81,10 +81,10 @@ "post-autoload-dump": [ "rm -rf runtime/container" ], - "analyse": "phpstan analyse --memory-limit 512M -l 0 -c phpstan.neon ./app ./config", + "analyse": "phpstan analyse --memory-limit 512M", "cs-fix": "php-cs-fixer fix $1", "start": "php ./bin/hyperf.php start", - "test": "co-phpunit --prepend test/bootstrap.php -c phpunit.xml --colors=always", + "test": "co-phpunit --prepend test/bootstrap.php --colors=always", "rector": "rector process --clear-cache" } } diff --git a/phpstan.neon b/phpstan.neon.dist similarity index 93% rename from phpstan.neon rename to phpstan.neon.dist index 71c2789..6a22055 100644 --- a/phpstan.neon +++ b/phpstan.neon.dist @@ -7,6 +7,10 @@ includes: # 需要执行 composer require phpstan/phpstan-deprecation-rules --dev # - vendor/phpstan/phpstan-deprecation-rules/rules.neon parameters: + level: 0 + paths: + - app + - config reportUnmatchedIgnoredErrors: false ignoreErrors: - '#Static call to instance method Hyperf\\HttpServer\\Router\\Router::[a-zA-Z0-9\\_]+\(\)#' diff --git a/phpunit.xml b/phpunit.xml.dist similarity index 100% rename from phpunit.xml rename to phpunit.xml.dist