laravel/pint

[BUG] Extension shows "Formatting completed" but silently fails when host PHP version is incompatible

已关闭

#388 创建于 2025年8月5日

 (2 条评论) (1 个反应) (0 位负责人)PHP (189 个派生)user submission
help wanted

仓库指标

星标
 (3,127 个星标)
PR 合并指标
 (平均合并 2天 1小时) (30 天内合并 12 个 PR)

描述

Pint Version

1.24

PHP Version

7.4

Description

Host PHP: php -v 8.1

  • Project PHP: docker exec [container] php -v 8.2
  • OS: Ubuntu 22.04

Expected Behavior:

  • Extension should warn about PHP version mismatch
  • Formatting should fail visibly (not silently)

Additional Context:

  • Works when manually running ./vendor/bin/pint in the container
  • No errors in VS Code's "Laravel Pint" output panel

Steps To Reproduce

Proposed Fixes:

  1. Add PHP version validation before running Pint
  2. Show explicit errors when:
    • Host PHP < project's required version
    • No PHP binary is found

贡献者指南