Skip to content

Fix phplint workflow if-condition syntax#110

Open
aaronware wants to merge 1 commit into
v2from
fix/phplint-if-syntax
Open

Fix phplint workflow if-condition syntax#110
aaronware wants to merge 1 commit into
v2from
fix/phplint-if-syntax

Conversation

@aaronware

Copy link
Copy Markdown
Contributor

Summary

  • Fix malformed if conditions on the "PHP Lint 8.0+" and "PHP Lint 7.4" steps in phplint.yml
  • The old expressions mixed literal text with ${{ }} tokens (e.g. ( ${{ inputs.php_version }} == 8.0 ...)), which GitHub Actions evaluates as always truthy and emits a syntax warning
  • Replaced with proper expressions where the entire condition is evaluated as a workflow expression

What was wrong

# Before (broken) — literal text outside ${{ }} tokens
if: ( ${{ inputs.php_version }} == 8.0 || ${{ inputs.php_version }} == 8.2 ) && ${{ steps.check_commit_message.outputs.skip_lint }} != 'true'"
# After (fixed) — clean expression, version values quoted as strings
if: (inputs.php_version == '8.0' || inputs.php_version == '8.2') && steps.check_commit_message.outputs.skip_lint != 'true'

This was surfacing as a workflow syntax warning in downstream repos (e.g. resourcingedge) that call this reusable workflow.

🤖 Generated with Claude Code

The conditional expressions on the PHP Lint steps mixed literal text
with ${{ }} replacement tokens, causing GitHub Actions to always
evaluate them as truthy and emit syntax warnings.

Wrap the entire expression properly so version checks and skip-lint
guards work as intended.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant