PHP code intelephase error in Laravel
Those who don’t use visual studio for coding Intelephense is a high performance PHP language server packed full of essential features for productive PHP development. After latest update of PHP intelephase some developers reported they are getting errors. Majority of them reported that intelephase keeps showing an error for undefined symbols for the route or class. When there is no error in your code and it keeps showing the error freaks out everyone. Now we will look at what is new in the latest update. Intelephase 1.3 added undefined type, function, constant, class constant, method, property diagnosis. In the previous update there was only undefined variable diagnostics. Some frameworks like Laravel are written in a way that provides easy shortcuts for users. This could be difficult for static analysis engines to discover symbols that are available at runtime. For this reason intelephase changed config options to enable/disable each category of undefined symbol to match editor and coding style. Shown below are the options in intelephase now.
intelephense.diagnostics.undefinedTypes intelephense.diagnostics.undefinedFunctions intelephense.diagnostics.undefinedConstants intelephense.diagnostics.undefinedClassConstants intelephense.diagnostics.undefinedMethods intelephense.diagnostics.undefinedProperties intelephense.diagnostics.undefinedVariables
In the above set intelephense.diagnostics.undefinedVariables as true and all the others to false will give intelephase 1.2 behaviour.
Comments
0 comments
Please Sign in or Create an account to Post Comments