Skip to content
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

do not treat __halt_compiler() as an expression being executed #6876

Merged
merged 1 commit into from
Nov 10, 2021

Conversation

pilif
Copy link
Contributor

@pilif pilif commented Nov 10, 2021

this fixes #6875

@orklah orklah added the release:fix The PR will be included in 'Fixes' section of the release notes label Nov 10, 2021
@orklah orklah merged commit a973b23 into vimeo:master Nov 10, 2021
@orklah
Copy link
Collaborator

orklah commented Nov 10, 2021

Thanks!

@pilif
Copy link
Contributor Author

pilif commented Nov 10, 2021

when reading this patch again, it occurred to me that the check for !($stmt instanceof PhpParser\Node\Stmt\InlineHTML) that's also being done is probably faulty:

<?php
exit(0);
?>
foo bar baz

I would expect this to be flagged as an issue because the text outside of the PHP tags is never emitted this way.

Would you agree? In that case, I'll create a followup issue and PR, though of course this might have some BC implications.

pilif added a commit to pilif/psalm that referenced this pull request Nov 10, 2021
pilif added a commit to pilif/psalm that referenced this pull request Nov 10, 2021
@weirdan
Copy link
Collaborator

weirdan commented Nov 10, 2021

@pilif yeah, please do.

@pilif
Copy link
Contributor Author

pilif commented Nov 10, 2021

See #6878

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:fix The PR will be included in 'Fixes' section of the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

__halt_compiler() is treated as an expression
3 participants