fix: 显示 PHP 语法检查的详细错误信息
Test CI / 快速测试 (push) Failing after 0s

This commit is contained in:
2026-03-01 00:56:51 +08:00
parent 4532b29910
commit 21ddf36151
2 changed files with 8 additions and 2 deletions
+4 -1
View File
@@ -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