-
Notifications
You must be signed in to change notification settings - Fork 547
FNSR ExpressionResultStorage #4628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 2.1.x
Are you sure you want to change the base?
Conversation
c0b8d16 to
8e54658
Compare
|
issue bot results look outstanding - too good to be real 🥸 |
|
Lots of diffs doesn't mean lots of bugs fixed 😀 The analysis is still too wrong. |
…ions to Scope debug
…lready stored expr result
8e54658 to
98587b0
Compare
01dfbcf to
895ce9e
Compare
…when FNSR is enabled)
895ce9e to
412cc4e
Compare
|
Alright, so this issue-bot report is far more realistic and closer to the end results. Solving issues like https://phpstan.org/r/8d3536cc-d647-455c-8919-300cc35d7abf and https://phpstan.org/r/59b9367b-8f29-4008-8536-91dca00362df is what I had in mind. |
|
I’m sure it’s used. It overrides an empty method from NodeScopeResolver.
Ondřej Mirtes
…On Fri 19. 12. 2025 at 7:30, Markus Staab ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/Analyser/Fiber/FiberNodeScopeResolver.php
<#4628 (comment)>:
> + $request->scope->toMutatingScope(),
+ $storage,
+ new NoopNodeCallback(),
+ ExpressionContext::createTopLevel(),
+ );
+ if ($storage->findResult($request->expr) === null) {
+ throw new ShouldNotHappenException(sprintf('processExprNode should have stored the result of %s on line %s', get_class($request->expr), $request->expr->getStartLine()));
+ }
+ $this->processPendingFibers($storage);
+
+ // Break and restart the loop since the array may have been modified
+ return;
+ }
+ }
+
+ protected function processPendingFibersForRequestedExpr(ExpressionResultStorage $storage, Expr $expr, ExpressionResult $result): void
this method seems unused
—
Reply to this email directly, view it on GitHub
<#4628 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAZTOFVYCLK67LVP4DOC2L4COLQPAVCNFSM6AAAAACOW6DOEWVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTKOJXGA4DMMJXG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
| } | ||
| } elseif ($expr instanceof Expr\Empty_) { | ||
| $this->processExprNode($stmt, $expr->expr, $scope, $storage, new NoopNodeCallback(), $context->enterDeep()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why/which expressions need to be processed twice? I can see this only happens for a few ones
| */ | ||
| public function cloneNode(Node $node): Node | ||
| { | ||
| $traverser = new NodeTraverser(new CloningVisitor()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.


No description provided.