12

I have this error in my vscode after I upgraded to PHP8.

enter image description here

I tried to increase my memory_limit to 4GB or 8GB as this link described.

enter image description here

also, I using the v2.3.14 (last version) of the PHP IntelliSense extension.

enter image description here

Gama11
  • 31,714
  • 9
  • 78
  • 100
Pejman Kheyri
  • 4,044
  • 9
  • 32
  • 39
  • Kindly check the log and output that `Help / Toggle Developer Tools, tab Console` – dev_mustafa Mar 01 '21 at 16:11
  • 1
    Disable it and contact the author. Also make sure that installed version of plugin supports your PHP version and update it if required. – biesior Mar 01 '21 at 16:20
  • 1
    Check your [**PHP Error logs**](https://stackoverflow.com/questions/5127838/where-does-php-store-the-error-log-php5-apache-fastcgi-cpanel) and resolve issues that they present. – Martin Mar 04 '21 at 16:55
  • 1
    If you are using PHP 8 then PHP IntelliSense may not be ready for PHP 8 as version 2.3.14 was only made in late 2019. – Martin Mar 04 '21 at 16:57
  • @Martin You are probably right about 2019 made but I'm checking the errors as you mentioned for getting closer to solve the problem. thank you. – Pejman Kheyri Mar 04 '21 at 17:03

5 Answers5

25

This fixed it for me on PHP 8.0.3:

cd ~/.vscode/extensions/felixfbecker.php-intellisense-2.3.14/

composer update

https://github.com/felixfbecker/php-language-server/issues/779

tertek
  • 890
  • 1
  • 10
  • 20
  • 2
    I try to run this command on 8.0.7 Win 10, but it seems to be going in some sort of infinite loop of deprecation error message, Is that normal? as I waited for 5 minute but it keep going. and then I quit the command. – Sumit Gupta Jun 17 '21 at 11:30
  • @SumitGupta same with me, have you fixed it? – Jimmy.B Jun 30 '21 at 08:58
  • @SumitGupta Maybe [this](https://superuser.com/a/332872/1334887) can help you, since Windows may not recognize the "~" (tilde) – tertek Jun 30 '21 at 17:43
  • 1
    Well After I break my loop (Ctrl + C) I just restart Code and it works fine without issue. so I never rerun command or do anything after that and it works. – Sumit Gupta Jul 01 '21 at 09:52
  • Got the same deprecation loop – Mellester Jul 15 '21 at 09:38
  • Same depreciation loop. My solution was to uninstall this extension. – RL85 Mar 21 '22 at 18:31
6

Looks like Felix Becker's Extension is now unmaintained. I fixed the issue by replacing his extension with Damjan Cvetko's PHP IntelliSense, which is a maintained fork of this one: https://marketplace.visualstudio.com/items?itemName=zobo.php-intellisense

air-dex
  • 4,130
  • 2
  • 25
  • 25
5

I also had same issue on WSL2 Ubuntu 20.04.2 LTS trying to use PHP 8.0.2, although my vscode server path is slightly different. Ran the update, reopened vscode and everything is working like it should.

cd ~/.vscode-server/extensions/felixfbecker.php-intellisense-2.3.14/
composer update
Garrick Crouch
  • 309
  • 4
  • 11
0

The problem for me is that I had both extensions installed. Uninstalling felix's solved the issue.

  • This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](https://stackoverflow.com/questions/ask). To get notified when this question gets new answers, you can [follow this question](https://meta.stackexchange.com/q/345661). Once you have enough [reputation](https://stackoverflow.com/help/whats-reputation), you can also [add a bounty](https://stackoverflow.com/help/privileges/set-bounties) to draw more attention to this question. - [From Review](/review/late-answers/34364961) – ryanwebjackson May 12 '23 at 21:51
0

The simplest way is:

uninstall

reload

install

Ahmed Mabrouk
  • 31
  • 1
  • 6