Questions tagged [intelephense]

This tag should be used to discuss the PHP static code analysis and language tools provided by the Intelephense vscode plugin, including questions related to improving its effectiveness or correcting issues related to its installation, configuration, or potential bugs and shortcomings.

Intelephense is a high performance PHP language server packed full of essential features for productive PHP development. It provides PHP code intelligence for the Visual Studio Code editor.

78 questions
88
votes
6 answers

VS Code highlighted all my wordpress function name

I am using PHP Intelephense(version 1.3.7) which is the latest version and my VS Code is up to date There was no problem before but a few days ago, it keeps on highlighted all my wordpress function name I tried to downgrade my PHP Intelephense but…
CyberCatHK
  • 1,040
  • 1
  • 7
  • 10
28
votes
1 answer

Undefined type 'Imagick' in VSCode's intelephense

I had an issue where I installed Imagick via Pecl and Intelephense didn't know what to do with that extension and failed to show any code completion even though the extension was properly installed in the php.ini file and was working fine. Some…
ddruganov
  • 1,263
  • 13
  • 15
14
votes
1 answer

VS Code PHP Formatter Intelephense

I use Visual Studio Code as my editor and Intelephense as my PHP formatter. It works well for the most part, but Intelephense changes my format in several ways that makes it harder for me to read. For example, I like to format my code as follows: …
GTS Joe
  • 3,612
  • 12
  • 52
  • 94
9
votes
1 answer

Intelephense (1014)

It bothers me because with the most recent update to PHP Intelephense that I received today, the intelephense keeps displaying an error for an unknown property, functions. Intelephense (1014) and this is my code:
7
votes
1 answer

Why showing error undefined when using alias defined values in laravel application through VS code php intelephense extension?

In config/app.php 'aliases' => [ 'Route' => Illuminate\Support\Facades\Route::class, ], when I am using Route in routes/web.php like Route::get('/', 'UserController@home'); I installed php intelephense extension in my vs code. So that it is…
Senthurkumaran
  • 1,738
  • 2
  • 19
  • 29
7
votes
3 answers

PHP 8 in Visual Studio Code

I use the latest Version of Visual Studio Code (1.52.1) with PHP Intelephense 1.5.4 on Ubuntu. Despite it is the latest Version it seems not to know the new PHP 8 Syntax. For example it shows an error when using the nullsafe…
Peter
  • 2,051
  • 1
  • 15
  • 20
7
votes
2 answers

Can we set up Intelephense in VS Code as per WordPress coding Standard?

I am using PHPCS and PHPCBF for WordPress development in VS Code.( as per instructions mentioned in https://github.com/tommcfarlin/phpcs-wpcs-vscode ) While PHPCBF is formatting the codes as per WPCS, I still feel that the code looks really ugly,…
Dibakash
  • 186
  • 1
  • 1
  • 9
6
votes
2 answers

intelephense error on VS Code: Expected type 'string'. Found 'string[]'

Suppose the following piece of code:
Faye D.
  • 833
  • 1
  • 3
  • 16
6
votes
2 answers

How to declare a global class so I don't get an error in Undefined type in intelephense in visual code

I'm new to visual studio code and intelephense. I'm working with WordPress and using a class called WP_CLI which's a system installed. So, if I'm not wrong, class WP_CLI is not in my path so I get Undefined type 'WP_CLI'.intelephense(1009) The ideal…
Miquel Adell
  • 1,132
  • 3
  • 11
  • 24
6
votes
1 answer

How to use `intelephense` to remove blank lines when format my php script in vs code?

My system is centos 7.6,intelephense1.3.11,vs code 1.44.1 $options = array( PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, PDO::ATTR_EMULATE_PREPARES => false ); // Create a new PDO…
kittygirl
  • 2,255
  • 5
  • 24
  • 52
5
votes
0 answers

How to set VS Code extension Intelephense for PHP 8?

I would like to set my bought Visual Studio Code extension to use PHP 8 version for it's "intelisense" functionality. Checking defaultSettings.json for 'intelephense' search query gives lots of hits, but only one stands out to me for upgrading to…
s3c
  • 1,481
  • 19
  • 28
5
votes
1 answer

VS Code Intelephense Clear Cache and Reload

I use Visual Studio Code with Intelephense, and this works wonders on all of my projects except for one, where every class is shown as undefined until I open the file that contains the class. Therefore I have a suspicion that Intelephense is not…
Smithee
  • 710
  • 7
  • 14
4
votes
3 answers

How to fix 'layout' method undefined in Laravel 8 with livewire

I am using vscode when i make a component .. it gives me an error undefined method at layout even if i replace it with extends the intelephense plugin gives me the same error i installed ide_helper but it didn't work .. however the code works fine…
John Deck
  • 787
  • 1
  • 12
  • 27
4
votes
1 answer

Undefined type 'Auth' in Laravel routes Visual Studio Code

I'm new to Laravel. The Visual Studio code shows an error on my Laravel project laravel>routes>web.php file but the program runs fine without any errors. Any explanation on how this works?
4
votes
0 answers

Code Completion in Laravel Blade Templates - vscode

I really like vscode compared to phpstorm but How to get PHP Intelephense code completion to work in laravel blade templates? @php {{ $user->email }} <- autocomplete not working @endphp
1
2 3 4 5 6