gh-2811: PHP8.4: New without parenthesis#2824
Conversation
464e5c9 to
6ecf6eb
Compare
6ecf6eb to
79b7bfe
Compare
|
Am I being dumb dan? (Almost certainly). I've deleted my phpactor diretory, and its cache. Re-run Thank you! |
|
you'll need to make sure you're on the works for me (even on an 8.3 runtime, although I get parse errors from PHP itself) |
|
I am - checked with |
|
If you'd like to investigate copy this test case to a new file in the same dir: lib/WorseReflection/Tests/Inference/new/new-no-parenthesis.test and put your class structure and method call chain in there so that: or whatever - then run to see if it works, and if it doesn't you could make an PR with the failing test. |
|
well, if it asserts that it's a string then it's working. Are you sure these are Phpactor errors and not PHPStan ones (assuming you have phpstan installed and enabled the phpactor integration)? which PHP runtime are you using on your host? |
|
PHP 8.4.3 I was pretty sure that this message was coming from phpactor, I'll feel even more of a plum than normal if it's coming from phpstan. I think my phpstan only does anything when I manually run it from the commandline, and I think these errors were coming up before I even installed phpstan quite recently. |
|
If I add a line, |
I don't follow that logic? To my untrained eye all that means is that the code works in php (which I know it does), not that phpactor is happy with it and finding nothing to complain about? 🤷♂️ |
no, it's testing that phpactor evaluates the code statically, Phpactor is the interpreter here (f.e. there is no |
|
Of course, I understand. I knew it was an internal function, but didn't quite process what was going on. I don't know if this is useful, but if I run Not sure if that clarifies where the message is coming from or not! |
|
Still having this issue, any further thoughts Dan? Thank you! |
|
OK, finally had time to look into this more. The issue is that I have two versions of phpactor installed. The one I've installed manually (dev-master) is NOT what neovim is loading in through Mason, which is stuck on 2024.11.28.1 I've tried to manually point Mason at the newer version, but can't seem to get it working and can't find (google/chatgpt) any concrete info on how to achieve this. I don't suppose you can either guide me, or release a new Tag? Thank you Dan, as always ❤️ |

Fixes #2811