Skip to content

Function containing inlineHtml has side-effects #3072

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

Merged
merged 2 commits into from
May 14, 2024

Conversation

staabm
Copy link
Contributor

@staabm staabm commented May 13, 2024

Verified

This commit was signed with the committer’s verified signature.
st0012 Stan Lo
$hasYield = false;
$throwPoints = [];
$impurePoints = [
new ImpurePoint($scope, $stmt, 'inlineHtml', 'inlineHtml', true),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please test the error message when this is done inside @phpstan-pure function. It should be nicer than inlineHtml.

I'd even say that the identifier should be renamed to something like betweenPhpTags or something.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not realize these strings are taken into the rule error message.

I still have to learn the new classes and their implications :)

@staabm staabm force-pushed the pure-inlinehtml branch from d3bbee4 to 2c78787 Compare May 13, 2024 17:21
@ondrejmirtes ondrejmirtes merged commit b8a871d into phpstan:1.11.x May 14, 2024
444 of 445 checks passed
@ondrejmirtes
Copy link
Member

Thank you.

@staabm staabm deleted the pure-inlinehtml branch May 14, 2024 12:11
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.

does not have side-effects false-positive
2 participants