From 14b12386400ded5e8775f9fbf824a2bf543b55f0 Mon Sep 17 00:00:00 2001 From: JanHuang <384099566@qq.com> Date: Mon, 26 Oct 2026 22:31:02 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20PHP=20=E5=9F=BA=E7=BA=BF=E5=8D=87?= =?UTF-8?q?=E7=BA=A7=E5=88=B0=208.4=20=E5=B9=B6=E6=8E=A5=E5=85=A5=20GitHub?= =?UTF-8?q?=20Actions=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - composer php 约束统一为 >=8.4 - PHPUnit 统一到 ^10.0 - 新增 PHP 8.4 CI workflow,移除旧 .travis.yml - README PHP 版本说明同步 --- .github/workflows/ci.yml | 28 ++++++++++++++++++++++++++++ .travis.yml | 8 -------- README.md | 2 +- composer.json | 2 +- 4 files changed, 30 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..02aae24 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,28 @@ +name: CI + +on: + push: + branches: [master] + pull_request: + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.4' + extensions: mbstring + coverage: none + tools: composer:v2 + - name: Validate composer.json + run: composer validate --no-check-publish --no-check-lock + - name: Install dependencies + run: composer update --prefer-dist --no-progress --no-interaction + - name: Run tests + run: vendor/bin/phpunit --no-coverage diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 33764c1..0000000 --- a/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: php -php: -- '7.3' -- '7.4' - -install: composer install -vvv - -script: vendor/bin/phpunit diff --git a/README.md b/README.md index f94a2f3..414e088 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ FastD Middleware 是一个实现了 PSR-15 HTTP 服务器中间件标准的轻 ## 环境依赖说明 -* PHP >= 8.2 +* PHP >= 8.4 * PSR-7 HTTP 消息接口实现 * PSR-15 HTTP 服务器中间件标准 diff --git a/composer.json b/composer.json index 42dcd5b..36ac32e 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ } ], "require": { - "php": ">=8.2", + "php": ">=8.4", "fastd/http": "^8.0", "psr/http-server-middleware": "*" },