-
Notifications
You must be signed in to change notification settings - Fork 7.8k
gen_stub: Using $this when not in object context #18108
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
Comments
CC @kocsismate - it looks like this has been an issue since 8.2 Lines 1588 to 1597 in e144c58
Given that the bug is in part of the build system, should it be fixed on 8.2? Just 8.3+? Just master? |
Given that this hasn't been a problem so far, it's somewhat feature request-ish. I'd say master (unless an earlier branch makes merges easier). |
I agree with Tim, if noone needed a fix until now then we could just fix it for master :) And thanks for finding it BTW!
Then the exception message could be changed to avoid the problem in the first place ^^ Like only displaying the expression 🤔 |
I created a possible fix: #18327 It will display the following message for the example code:
What do you think? |
Works for me |
Description
In
ext/zend_test/test.stub.php
I addedand then ran
php build/gen_stub.php ext/zend_test/test.stub.php
Output:
Cause:
php-src/build/gen_stub.php
Lines 2119 to 2125 in 6329248
... later in that same static function ...
php-src/build/gen_stub.php
Lines 2169 to 2174 in 6329248
getVariableTypeName()
is only something that exists onVariableLike
instances so I'm not even sure what the correct replacement should bePHP Version
6329248
Operating System
No response
The text was updated successfully, but these errors were encountered: