Skip to content

Fix GH-18108 gen_stub: Using $this when not in object context #18327

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 1 commit into from
Apr 15, 2025

Conversation

kocsismate
Copy link
Member

@kocsismate kocsismate commented Apr 15, 2025

Fix for #18108

Reproducer in ./ext/zend_test/test.stub.php:

 /** @var string */
const TEMP_TEST = __FILE__;

The new error message will be the following:

In ./ext/zend_test/test.stub.php:
Expression at line 12 must be a global, non-magic constant

@kocsismate kocsismate merged commit 93a3256 into php:master Apr 15, 2025
2 checks passed
@kocsismate kocsismate deleted the fix-gh-18108 branch April 15, 2025 18:56
@TimWolla
Copy link
Member

@kocsismate Prefer Squash and Merge for single-commit PRs and when the commit history of the PR is not important. Squash and Merge will apply GitHub's PGP signature on the squashed commit, whereas Rebase and Merge will not, resulting in an unsigned commit.

@kocsismate
Copy link
Member Author

@TimWolla Ah sorry, I made the same mistake a few weeks ago... I will try hard not to do it again :)

BTW I used "rebase and merge" because it was the default for me, and I thought there would be no difference between the two options in case of this single commit PR...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants