marlonfan / coc-phpls

🐭 php language server for coc.nvim
MIT License
212 stars 16 forks source link

Core functions all shows as "deprecated" #41

Closed AFwcxx closed 4 years ago

AFwcxx commented 4 years ago

Describe the bug The intelephense shows all core functions that ships with php as deprecated Example: [intelephense 1007] [H] 'strtolower' is deprecated.

Desktop (please complete the following information): vim version: NVIM v0.4.3 node version: v13.3.0 coc.nvim version: 0.0.74-d83536aa4e term: iTerm.app platform: darwin

dvaqueiro commented 4 years ago

Describe the bug Same issue, all core functions mark as deprecated: array_merge, strtoupper, bin2hex, ....

Desktop (please complete the following information): vim version: NVIM v0.3.8 node version: v8.16.2 coc.nvim version: 0.0.74-317e3212e3 term: screen-256color platform: linux

Maybe this can help:

Output channel: phpls

[Info - 15:16:20] Initialising intelephense 1.3.5 [Info - 15:16:20] Reading state from /home/dvaqueiro/.config/coc/extensions/coc-phpls-data/545e14fb. [Info - 15:16:22] Initialised in 2398 ms [Info - 15:16:22] Intelephense 1.2.3 ApplicationInsights:CorrelationIdManager [ { Error: getaddrinfo ENOTFOUND dc.services.visualstudio.com dc.services.visualstudio.com:443 at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26) errno: 'ENOTFOUND', code: 'ENOTFOUND', syscall: 'getaddrinfo', hostname: 'dc.services.visualstudio.com', host: 'dc.services.visualstudio.com', port: 443 } ] [Info - 15:18:20] Initialising intelephense 1.3.5

mubisco commented 4 years ago

Describe the bug Same issue, all php native functions tagged as deprecated.

Desktop (please complete the following information): vim version: NVIM v0.4.3 node version: v12.13.1 coc.nvim version: 0.0.74-d83536aa4e term: screen-256color platform: linux

Maybe this can help:

Output channel: phpls

[Info - 15:16:53] Initialising intelephense 1.3.5 [Info - 15:16:53] Reading state from /home/xbellon/.config/coc/extensions/coc-phpls-data/5e572f5e. [Info - 15:16:54] Initialised in 781 ms [Info - 15:16:54] Intelephense 1.2.3 [Info - 15:16:55] Indexing started. [Info - 15:16:55] Indexing ended. 1 files indexed in 0s. [Info - 15:16:55] Writing state to /home/xbellon/.config/coc/extensions/coc-phpls-data/5e572f5e. [Info - 15:16:55] Wrote state in 0.7s.

marlonfan commented 4 years ago

Hi guys, I don't see this problem in my environment.

Can you turn on verbose mode so I can see CocInfo Output?

@mubisco @dvaqueiro @AFwcxx

AFwcxx commented 4 years ago

Not sure how to turn on the verbose mode, But when I add the line as shown in the screenshot, the intelephense show that the function base64_decode is deprecated. Screenshot 2019-12-17 at 13 18 45

This is what shown in the coc log:

2019-12-17T13:16:41.396 INFO (pid:20444) [services] - registered service "highlight"

2019-12-17T13:16:41.471 INFO (pid:20444) [plugin] - coc 0.0.74-d83536aa4e initialized with node: v13.3.0

2019-12-17T13:16:41.477 INFO (pid:20444) [language-client-index] - highlight started with 20445

2019-12-17T13:16:41.561 INFO (pid:20444) [services] - highlight server state change: starting => running

2019-12-17T13:16:48.391 INFO (pid:20444) [language-client-index] - phpls started with 20450

2019-12-17T13:17:53.624 INFO (pid:20444) [completion-complete] - Results from: phpls

2019-12-17T13:17:54.428 INFO (pid:20444) [completion-complete] - Results from: around,buffer,phpls

2019-12-17T13:17:56.108 INFO (pid:20444) [completion-complete] - Results from: around,buffer,phpls

2019-12-17T13:17:56.806 INFO (pid:20444) [completion-complete] - Results from: around,phpls

2019-12-17T13:18:02.164 INFO (pid:20444) [completion-complete] - Results from: around,buffer

2019-12-17T13:18:02.318 INFO (pid:20444) [completion-complete] - Results from: around,buffer

tomsteg commented 4 years ago

I get "[intelephense 1010] [E] Undefined function" for example for is_null, sleep, Exception .

Coc Log: 2019-12-18T11:16:07.986 INFO (pid:93964) [services] - registed service "languageserver.intelephense" 2019-12-18T11:16:07.988 INFO (pid:93964) [services] - intelephense state change: stopped => starting 2019-12-18T11:16:08.003 INFO (pid:93964) [services] - registed service "eslint" 2019-12-18T11:16:08.207 INFO (pid:93964) [language-client-index] - languageserver.intelephense started with 93969 2019-12-18T11:16:08.214 INFO (pid:93964) [language-client-index] - phpls started with 93970 2019-12-18T11:16:08.216 INFO (pid:93964) [plugin] - coc 0.0.74-bc017b02e6 initialized with node: v13.3.0 2019-12-18T11:16:08.240 INFO (pid:93964) [services] - registed service "json" 2019-12-18T11:16:08.240 INFO (pid:93964) [services] - Json language server state change: stopped => starting 2019-12-18T11:16:08.247 INFO (pid:93964) [language-client-index] - json started with 93973 2019-12-18T11:16:08.324 INFO (pid:93964) [services] - Json language server state change: starting => running 2019-12-18T11:16:08.327 INFO (pid:93964) [services] - service json started 2019-12-18T11:16:09.200 INFO (pid:93964) [services] - intelephense state change: starting => running 2019-12-18T11:16:09.201 INFO (pid:93964) [services] - service languageserver.intelephense started

marlonfan commented 4 years ago

@AFwcxx @dvaqueiro @mubisco @tomsteg Hi, please update to latest version. Does it work?

Norbytus commented 4 years ago

Hm i have this problem too, after last update, but before updae all was normal

marlonfan commented 4 years ago

@Norbytus Because of some problems with the upstream LSP server, it should have been fixed

AFwcxx commented 4 years ago

@AFwcxx @dvaqueiro @mubisco @tomsteg Hi, please update to latest version. Does it work?

Seems like it's still behaving the same.

mubisco commented 4 years ago

@AFwcxx @dvaqueiro @mubisco @tomsteg Hi, please update to latest version. Does it work?

Currently with coc-phpls 2.1.6 Still marks core functions as deprecated

Terseus commented 4 years ago

@Norbytus Because of some problems with the upstream LSP server, it should have been fixed

Can confirm that with coc-phpls 2.1.7 the problem still exists, core functions and interfaces (e.g. \Serializable) are marked as deprecated.

tomsteg commented 4 years ago

I can confirm, that the problem still exists with coc-phpls 2.1.7. The error message is 'undefined function', when an error is marked on standard functions. There is an other problem, that maybe correlates: In my composer.json I have an autoload section for autoloading classes for psr-4 and classmap. Those classes are marked as 'undefined type', but in php on the server everything works fine.

rosmanov commented 4 years ago

The same problem here.

vim version: NVIM v0.4.3
node version: v12.13.1
coc.nvim version: 0.0.74-bc017b02e6
term: screen-256color
platform: linux

coc-phpls: 2.1.7
stormpat commented 4 years ago

Same issue

vim version: NVIM v0.4.3
node version: v13.3.0
coc.nvim version: 0.0.74-d83536aa4e
term: xterm-kitty
platform: darwin

EDIT.

This seemed to be a cache issue. Anyone still facing this delete the cache, restart vim and let coc reindex the files.

> rm -rf ~/.config/coc/extensions/coc-phpls-data
tomsteg commented 4 years ago

@stormpat Yes, that fixed everything. Thank you very much. Great and simple.

Terseus commented 4 years ago

I can confirm that the issue goes away after deleting the coc-phpls cache.

Thanks a lot for the info @stormpat ^_^

AFwcxx commented 4 years ago

Same issue

vim version: NVIM v0.4.3
node version: v13.3.0
coc.nvim version: 0.0.74-d83536aa4e
term: xterm-kitty
platform: darwin

EDIT.

This seemed to be a cache issue. Anyone still facing this delete the cache, restart vim and let coc reindex the files.

> rm -rf ~/.config/coc/extensions/coc-phpls-data

Use this to rectify issue.

dvaqueiro commented 4 years ago

Yes, remove the cache solve the problem in my case. Thanks