From 21ddf36151dd8d167d40081181c3c0efa39bdb62 Mon Sep 17 00:00:00 2001 From: starmen1265 Date: Sun, 1 Mar 2026 00:56:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=98=BE=E7=A4=BA=20PHP=20=E8=AF=AD?= =?UTF-8?q?=E6=B3=95=E6=A3=80=E6=9F=A5=E7=9A=84=E8=AF=A6=E7=BB=86=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/ci.yml | 5 ++++- .gitea/workflows/test.yml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 5918898..91c6bec 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -20,10 +20,13 @@ jobs: - name: PHP 语法检查 run: | echo "📝 PHP 语法检查..." + echo "PHP 版本: $(php -v | head -1)" errors=0 for file in $(find . -name "*.php" -not -path "./vendor/*"); do - if ! php -l "$file" > /dev/null 2>&1; then + output=$(php -l "$file" 2>&1) + if [ $? -ne 0 ]; then echo "错误: $file" + echo "$output" errors=$((errors + 1)) fi done diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 115d1ee..ba50724 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -25,10 +25,13 @@ jobs: - name: PHP 语法检查 run: | echo "📝 PHP 语法检查..." + echo "PHP 版本: $(php -v | head -1)" errors=0 for file in $(find . -name "*.php" -not -path "./vendor/*"); do - if ! php -l "$file" > /dev/null 2>&1; then + output=$(php -l "$file" 2>&1) + if [ $? -ne 0 ]; then echo "错误: $file" + echo "$output" errors=$((errors + 1)) fi done