vscode-intelephense
vscode-intelephense copied to clipboard
Add support for PHPSpec and Prophecy matchers
Feature description or problem with existing feature
I'm using your extension for a while now but I have trouble when using PHPSpec + Prophecy because it miss specific method understanding (even on the premium version).
As you can see in the following picture, most of the assertions methods are marked unknown :
Describe the solution you'd like
Since inside a spec file, every object injected in methods is constructed as a mock ("prophet" in the Prophecy world), it's not a real instance. Every method exists but must be configured with assertions / expectations. All the willReturn, shouldBeXXX are valid.
Same for the current object instance, when using $this every method for the currently specified object is available and the return value is a spy object that can be tested.
I don't know if you are familiar with these tools, I can help if necessary :smile:.
+1
I am also looking to add autocomplete for prophecy but it seems it is not as easy as other libraries/frameworks. It looks like prophecy is using a lot of "magic" (reference).
+1
Is there any status update on this?
+1
+1
+1
+1