fix(workflow): 修正 PHP 版本变量名称为 php-version#657
Conversation
📝 WalkthroughWalkthrough此更改将 GitHub Actions 工作流中 Changes
Suggested labels
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Pull Request Overview
This PR fixes inconsistent variable naming in the GitHub Actions workflow by standardizing the PHP version reference to use php-version throughout the workflow file. The change corrects a mismatch between the matrix variable definition and its usage in the job name.
- Renamed matrix variable from
phptophp-versionfor consistency - Updated job name template to reference the corrected variable name
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
.github/workflows/test.yml (2)
9-9: 在 job 名称中加入空格,提升可读性
PHP${{ matrix.php-version }}会渲染成PHP8.1,数字与文字粘连。建议在PHP与版本号之间加入空格,使输出更友好。- name: PHP CS Fix on PHP${{ matrix.php-version }} ${{ matrix.swoole }} + name: PHP CS Fix on PHP ${{ matrix.php-version }} ${{ matrix.swoole }}
14-14: 保持变量一致:步骤里也应使用 matrix.php-version
虽然当前只有一个版本,但如果以后在 matrix 中追加版本,Setup PHP步骤仍写死'8.1'会导致配置不一致。建议改为引用同一变量。with: - php-version: '8.1' + php-version: ${{ matrix.php-version }}
Summary by CodeRabbit