Visual Studio Code - Intelphense vs Intellisense |
Hello to all of you
better to make an example before to ask my question let's suppose I create an instance of the Email class since it is a library , if I understood properly, the suggested way to invoke it should be PHP Code: $email = service('email'); well at that point it comes my question so far I noticed that either Intelephense and Intellisense hovering on the service() method , will hint about it's definition but nothing is shown hovering on the 'email' string or on the $email property this happens also in others occasions e.g. with database methods like in this case, I can't see the where() method of the query builder class nevertheless it won't highlight mistypes , as you can see I have typed "fist" instead than "first" and no errors are in evidence Does any of you has a valid setup to have this a bit enhanced? Thank you for any Robert
Hi Corsari!
Have you setup extentions correclty? I have same issue please tell me solution if you found. Thanks
I m using php strom which is great ide it has lot of future
Enlightenment Is Freedom
For me it works without any problem, I don't use intellisense, only for CSS.
I have an additional question: what version of CodeIgniter do you use? It seems to be version 3, I'm using 4.
You need to find an extension for it to work the one that was around is no loger avaiable.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
I don't know if that's the case, but after I installed the extensions, I noticed that some overlapped each other in some functions. In certain functions, document formatting, for example, the VS Code requested the choice of which should be used.
This happens, in a way, between Intelephense and Intellesense, not forgetting the native extensions of VS Code. Allow me to suggest uninstalling one of the two to see how it works, until you are able to choose the one that most closely matches your needs.
1. For the service(), it has a documented return type of mixed so intelephense/intellisense cannot intelligently guess what specific object you are creating when you use that. I see 2 alternatives for that:
a. Inline annotate the variable $email PHP Code: /** var \CodeIgniter\Email\Email $email */ b. Use the Services class to get specific documentation. PHP Code: use Config\Services; 2. For the Model/Builder, there exists a "@mixin" relationship for the two. The Model has a __call method that delegates unknown method calls to the Builder if the Builder has those methods defined. That's why you can call where(), a Builder method, in the context of a Model. Unfortunately, there's no straightforward way to make the 2 extensions understand this relationship. Support for this may be complex for them. What I can see as a possible solution (although not 100% spot on solution) is to use the "@method" annotation in the class docblock of Model. But as I said that solution is a patch not a cure. I'm using VS Code so I am aware of these concerns. |
Welcome Guest, Not a member yet? Register Sign In |