You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Replace `npm install -g @anthropic-ai/claude-code` + `claude -p` with
`anthropics/claude-code-action@v1` in fix-issue and fix-pr-ci workflows
- Pass prompts via safe YAML `with: prompt:` parameter instead of shell
heredocs, eliminating injection risks from untrusted content
- Move inline ${{ }} expression to env var in react-on-comment workflow
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Issue body is in the file /tmp/issue-body.txt — read it before proceeding.
73
+
Issue body is in the file /tmp/issue-body.txt — read it before proceeding.
82
74
83
-
## Step 1: Write a regression test
75
+
## Step 1: Write a regression test
84
76
85
-
Read .claude/skills/regression-test/SKILL.md for detailed guidance on writing regression tests for PHPStan bugs.
77
+
Read .claude/skills/regression-test/SKILL.md for detailed guidance on writing regression tests for PHPStan bugs.
86
78
87
-
The issue body is already provided above — start from Step 2 of the skill (deciding test type). For Step 1 (gathering context), you only need to fetch the playground samples from any playground links found in the issue body.
79
+
The issue body is already provided above — start from Step 2 of the skill (deciding test type). For Step 1 (gathering context), you only need to fetch the playground samples from any playground links found in the issue body.
88
80
89
-
Skip Steps 5-6 of the skill (reverting fix and committing) — those are not needed here.
81
+
Skip Steps 5-6 of the skill (reverting fix and committing) — those are not needed here.
90
82
91
-
The regression test should fail without the fix — verify this by running it before implementing the fix.
83
+
The regression test should fail without the fix — verify this by running it before implementing the fix.
92
84
93
-
## Step 2: Fix the bug
85
+
## Step 2: Fix the bug
94
86
95
-
Implement the fix in the source code under src/. Common areas to look:
96
-
- src/Analyser/NodeScopeResolver.php - AST traversal and scope management
97
-
- src/Analyser/MutatingScope.php - Type tracking
98
-
- src/Analyser/TypeSpecifier.php - Type narrowing from conditions
99
-
- src/Type/ - Type system implementations
100
-
- src/Rules/ - Rule implementations
101
-
- src/Reflection/ - Reflection layer
87
+
Implement the fix in the source code under src/. Common areas to look:
88
+
- src/Analyser/NodeScopeResolver.php - AST traversal and scope management
89
+
- src/Analyser/MutatingScope.php - Type tracking
90
+
- src/Analyser/TypeSpecifier.php - Type narrowing from conditions
91
+
- src/Type/ - Type system implementations
92
+
- src/Rules/ - Rule implementations
93
+
- src/Reflection/ - Reflection layer
102
94
103
-
Read CLAUDE.md for important guidelines about the codebase architecture and common patterns.
95
+
Read CLAUDE.md for important guidelines about the codebase architecture and common patterns.
104
96
105
-
## Step 3: Verify the fix
97
+
## Step 3: Verify the fix
106
98
107
-
1. Run the regression test to confirm it passes now
108
-
2. Run the full test suite: make tests
109
-
3. Run PHPStan self-analysis: make phpstan
110
-
4. Fix any failures that come up
111
-
5. Run make cs-fix to fix any coding standard violations
112
-
6. Run make name-collision and fix violations - add different tests in unique namespaces. If the function and class declarations are exactly the same, you can reuse them across files instead of duplicating them.
99
+
1. Run the regression test to confirm it passes now
100
+
2. Run the full test suite: make tests
101
+
3. Run PHPStan self-analysis: make phpstan
102
+
4. Fix any failures that come up
103
+
5. Run make cs-fix to fix any coding standard violations
104
+
6. Run make name-collision and fix violations - add different tests in unique namespaces. If the function and class declarations are exactly the same, you can reuse them across files instead of duplicating them.
113
105
114
-
Do not create a branch, push, or create a PR - this will be handled automatically.
106
+
Do not create a branch, push, or create a PR - this will be handled automatically.
115
107
116
-
## Step 4: Write a summary
108
+
## Step 4: Write a summary
117
109
118
-
After completing the fix, write two files:
110
+
After completing the fix, write two files:
119
111
120
-
1. /tmp/commit-message.txt - A concise commit message (first line: short summary under 72 chars, then a blank line, then a few bullet points describing key changes). Example:
121
-
Fix array_key_exists narrowing for template types
112
+
1. /tmp/commit-message.txt - A concise commit message (first line: short summary under 72 chars, then a blank line, then a few bullet points describing key changes). Example:
113
+
Fix array_key_exists narrowing for template types
122
114
123
-
- Added handling for TemplateType in TypeSpecifier when processing array_key_exists
124
-
- New regression test in tests/PHPStan/Analyser/nsrt/bug-12345.php
125
-
- The root cause was that TypeSpecifier did not unwrap template bounds before narrowing
115
+
- Added handling for TemplateType in TypeSpecifier when processing array_key_exists
116
+
- New regression test in tests/PHPStan/Analyser/nsrt/bug-12345.php
117
+
- The root cause was that TypeSpecifier did not unwrap template bounds before narrowing
126
118
127
-
2. /tmp/pr-description.md - A pull request description in this format:
128
-
## Summary
129
-
Brief description of what the issue was about and what the fix does.
119
+
2. /tmp/pr-description.md - A pull request description in this format:
120
+
## Summary
121
+
Brief description of what the issue was about and what the fix does.
130
122
131
-
## Changes
132
-
- Bullet points of specific code changes made
133
-
- Reference file paths where changes were made
123
+
## Changes
124
+
- Bullet points of specific code changes made
125
+
- Reference file paths where changes were made
134
126
135
-
## Root cause
136
-
Explain why the bug happened and how the fix addresses it.
127
+
## Root cause
128
+
Explain why the bug happened and how the fix addresses it.
137
129
138
-
## Test
139
-
Describe the regression test that was added.
130
+
## Test
131
+
Describe the regression test that was added.
140
132
141
-
Fixes phpstan/phpstan#${{ inputs.issue-number }}
133
+
Fixes phpstan/phpstan#${{ inputs.issue-number }}
142
134
143
-
These files are critical - they will be used for the commit message and PR description.
144
-
PROMPT_EOF
145
-
)"
135
+
These files are critical - they will be used for the commit message and PR description.
0 commit comments