Repository navigation
Commit fc4f414
Patch nikic/php-parser with the
`BuilderHelpers::normalizeType()` turns every type name it does not know as a
builtin into a `Name` node, i.e. a class name - including `resource`. Apply the
upstream fix from nikic/PHP-Parser#1166 as a patch file
so the builder API produces an `Identifier` for it.
Note this has no effect on PHPStan's analysis on its own: `PhpStormStubsSourceStubber`
pretty-prints the stub node back to source and the source is re-parsed, and a
`resource` typehint in PHP source is a class name again. The patch is here
because the builder API should not claim `resource` is a class; the actual fix
is in the following commit.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>resource builtin type from PHP-Parser#11661 parent c058b09 commit fc4f414
3 files changed
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
144 | 147 | | |
145 | 148 | | |
146 | 149 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments