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