Skip to content

Conversation

@samsonasik
Copy link
Member

@samsonasik samsonasik commented Nov 21, 2025

This PR try to move away AlwaysRememberedExpr tweak from Printer to separate service after processing \PHPStan\Analyser\NodeScopeResolver::processNodes() calls.

Twis was requires 2 locations which not fully patch, then move to printer, this time apply full patch with verify both AlwaysRememberedExpr and origNode itself a Match_, but move out from the Printer.

There was an issue that only reproduced via https://getrector.com/demo/ , so this requires verification after merged.

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba I think it is ready :)

@samsonasik
Copy link
Member Author

samsonasik commented Nov 22, 2025

For reference, if it merged, this need to be tested in reported getrector.com/demo page below back in 2024:

https://getrector.com/demo/a0ce0012-bcac-40d9-90b6-cf3699dd0502

That can't be reproduced by unit test, but was only fixable via patch on BetterStandardPrinter.

see referenced PRs:

It will needs some people to test on original/related issue with it.

@TomasVotruba
Copy link
Member

Looks good, lets give this a go 👍

@TomasVotruba TomasVotruba merged commit bcc8a96 into main Nov 27, 2025
54 checks passed
@TomasVotruba TomasVotruba deleted the expr-add-virtual branch November 27, 2025 10:36
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.

3 participants