Skip to content

Update PhpStorm stubs - #6440

Merged
ondrejmirtes merged 4 commits into
2.2.xfrom
create-pull-request/patch-iuyiloj
Sep 14, 2026
Merged

Update PhpStorm stubs#6440
ondrejmirtes merged 4 commits into
2.2.xfrom
create-pull-request/patch-iuyiloj

Conversation

@phpstan-bot

Copy link
Copy Markdown
Collaborator

Update PhpStorm stubs

ondrejmirtes and others added 4 commits September 14, 2026 10:06
PhpStorm stubs now declare @throws \Exception on ReflectionClassConstant::__construct.
Mirror the ReflectionProperty extension so that constructing it for a known class
constant is not treated as throwing.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2hMwFhyMX7JHn6oVKrTPD
PhpStorm stubs now declare @throws \ValueError on trigger_error(), which replaced
the never-returning "may throw Throwable" treatment of E_USER_ERROR and the implicit
throw point of the other levels. Keep both, and report ValueError only for an
invalid error level on PHP 8.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2hMwFhyMX7JHn6oVKrTPD
…ement

Errors (ValueError, TypeError, DivisionByZeroError, ...) signal programmer mistakes,
nobody calls an otherwise pure expression just to have one thrown. Explicit throw
points whose type is entirely a subtype of Error therefore no longer prevent the
NoopExpressionNode, so sprintf(), strpos(), intdiv(), $a / $b and similar on a
separate line are reported again after PhpStorm stubs added @throws \ValueError
to them.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W2hMwFhyMX7JHn6oVKrTPD
@ondrejmirtes
ondrejmirtes force-pushed the create-pull-request/patch-iuyiloj branch from 08c8e57 to 40a4b94 Compare September 14, 2026 11:13
@ondrejmirtes
ondrejmirtes merged commit c7301f6 into 2.2.x Sep 14, 2026
152 checks passed
@ondrejmirtes
ondrejmirtes deleted the create-pull-request/patch-iuyiloj branch September 14, 2026 11:13
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.

2 participants