Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP autocomplete doesn't work with latest Intelephense #17493

Closed
5 of 22 tasks
danidoedel opened this issue Jul 27, 2020 · 14 comments
Closed
5 of 22 tasks

PHP autocomplete doesn't work with latest Intelephense #17493

danidoedel opened this issue Jul 27, 2020 · 14 comments
Labels
area/languages Issues related to Language extensions or plugins integration. area/plugins kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.

Comments

@danidoedel
Copy link

Describe the bug

Auto-completion is not working anymore/only working partially.

Che version

Steps to reproduce

  1. Set up a Symfony 5 project
  2. Use the latest Intelephense version (1.5.3, also reproduced with 1.4.0)
  3. Edit some PHP/SCSS files
  4. In a controller if I want to write Response as return type, there will be suggestions for R, but if I type Re* or more the suggestions disappear. If I want to write RediretResponse there will be suggestions for R, but not for Re, but again for Red and every following letter.
    Similar situation for CSS properties in a SCSS file. If I want to write display**, there are no suggestions at all, but after display: i, there will be suggestions for inline-block for example.
    I tried it in Gitpod and VS Code and there were no issues.
    See screenshots.

*This error message appears in the console after typing Re (see above):

errors.ts:26 Uncaught Error: Cannot read property 'Deprecated' of undefined

TypeError: Cannot read property 'Deprecated' of undefined
    at v (/tmp/vscode-unpacked/redhat.php-new.1.4.0.rinuousiea.vscode-intelephense-client-1.4.0.vsix/extension/lib/extension.js:1)
    at /tmp/vscode-unpacked/redhat.php-new.1.4.0.rinuousiea.vscode-intelephense-client-1.4.0.vsix/extension/lib/extension.js:1
    at R (/tmp/vscode-unpacked/redhat.php-new.1.4.0.rinuousiea.vscode-intelephense-client-1.4.0.vsix/extension/lib/extension.js:1)
    at Array.map (<anonymous>)
    at asCompletionResult (/tmp/vscode-unpacked/redhat.php-new.1.4.0.rinuousiea.vscode-intelephense-client-1.4.0.vsix/extension/lib/extension.js:1)
    at errors.ts:26

**This error message appears in the console when trying to type display in a SCSS file (see above):

errors.ts:26 Uncaught Error: Cannot read property 'Deprecated' of undefined

TypeError: Cannot read property 'Deprecated' of undefined
    at y (/default-theia-plugins/vscode-builtin-css-language-features/extension/client/dist/cssMain.js:1)
    at /default-theia-plugins/vscode-builtin-css-language-features/extension/client/dist/cssMain.js:1
    at C (/default-theia-plugins/vscode-builtin-css-language-features/extension/client/dist/cssMain.js:1)
    at Array.map (<anonymous>)
    at asCompletionResult (/default-theia-plugins/vscode-builtin-css-language-features/extension/client/dist/cssMain.js:1)
    at errors.ts:26

Expected behavior

Suggestions and auto-completion should always work

Runtime

  • kubernetes (include output of kubectl version)
  • Openshift (include output of oc version)
  • minikube (include output of minikube version and kubectl version)
  • minishift (include output of minishift version and oc version)
  • docker-desktop + K8S (include output of docker version and kubectl version)
  • other: (please specify)

Screenshots

image

image

Installation method

  • chectl
    • provide a full command that was used to deploy Eclipse Che (including the output)
    • provide an output of chectl version command
  • OperatorHub
  • I don't know

Environment

  • my computer
    • Windows
    • Linux
    • macOS
  • Cloud
    • Amazon
    • Azure
    • GCE
    • other (please specify)
  • other: please specify
@danidoedel danidoedel added the kind/bug Outline of a bug - must adhere to the bug report template. label Jul 27, 2020
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Jul 27, 2020
@danidoedel danidoedel changed the title No suggestion/auto-completion No code suggestion/auto-completion Jul 27, 2020
@ericwill ericwill added area/plugins severity/P1 Has a major impact to usage or development of the system. area/languages Issues related to Language extensions or plugins integration. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Jul 27, 2020
@ericwill ericwill added this to the 7.18 milestone Jul 27, 2020
@ericwill
Copy link
Contributor

Taking a look at the issue, I see you are using Intelephense version 1.5.3 and 1.4.0. Right now we only have 1.3.11 in the plugin registry. I can't say for sure, but it looks like there is some theia API missing.

Thanks for the bug report, we'll look into updating to Intelephense 1.5.3, including all the needed API to go with it.

@danidoedel
Copy link
Author

Thanks for taking a look @ericwill
I tested it with Gitpod and it works fine there, they are using Intelephense 1.4.0 so I assume it might be something else.
But I would be happy if you could check updating it to 1.5.3.
Also, the css issue should be unrelated to the Intelephense version.

@l0rd l0rd changed the title No code suggestion/auto-completion PHP autocomplete doesn't work with latest Intelephense Jul 28, 2020
@danidoedel
Copy link
Author

@l0rd Are you sure it is Intelephense only as it is also not working with CSS?

@l0rd
Copy link
Contributor

l0rd commented Jul 28, 2020

@danidoedel no I am not but things may be related and the original title wasn't explicit enough.

@ericwill ericwill mentioned this issue Jul 30, 2020
29 tasks
@ericwill
Copy link
Contributor

@danidoedel I tried reproducing the issue with a Symfony project and intelphense 1.5.3, but I was unable to reproduce the error. Can you share your devfile or a link to the project which reproduces the crash?

@danidoedel
Copy link
Author

@ericwill as the devfile and project are work related I can't share them, but I'll try to set something simple up to reproduce it.

@danidoedel
Copy link
Author

@ericwill I did some tests and found out the following:

  • Intelephense 1.3.11 seems to work fine now
  • Intelephense 1.5.4 doesn't seem to work for me

However if I create a workspace with this devfile:
https://github.com/eclipse/che-devfile-registry/blob/master/devfiles/php-symfony/devfile.yaml

And try to edit some SCSS file and type something like display I don't get any suggestion and this error in the console (same for the Intelephense issue, just with Intelephense instead of vscode-builtin-css):

Uncaught Error: Cannot read property 'Deprecated' of undefined

TypeError: Cannot read property 'Deprecated' of undefined
    at y (/default-theia-plugins/vscode-builtin-css-language-features/extension/client/dist/cssMain.js:1)
    at /default-theia-plugins/vscode-builtin-css-language-features/extension/client/dist/cssMain.js:1
    at C (/default-theia-plugins/vscode-builtin-css-language-features/extension/client/dist/cssMain.js:1)
    at Array.map (<anonymous>)
    at asCompletionResult (/default-theia-plugins/vscode-builtin-css-language-features/extension/client/dist/cssMain.js:1)
    at cdn.jsdelivr.net/npm/@theia/[email protected]/min/vs/editor/editor.main.js:30

I hope you can reproduce it with these information and a fix might also solve the Intelephense issue.. hopfully ;)

@ericwill
Copy link
Contributor

@ericwill I did some tests and found out the following:

* Intelephense 1.3.11 seems to work fine now

* Intelephense 1.5.4 doesn't seem to work for me

However if I create a workspace with this devfile:
https://github.com/eclipse/che-devfile-registry/blob/master/devfiles/php-symfony/devfile.yaml

And try to edit some SCSS file and type something like display I don't get any suggestion and this error in the console (same for the Intelephense issue, just with Intelephense instead of vscode-builtin-css):

Uncaught Error: Cannot read property 'Deprecated' of undefined

TypeError: Cannot read property 'Deprecated' of undefined
    at y (/default-theia-plugins/vscode-builtin-css-language-features/extension/client/dist/cssMain.js:1)
    at /default-theia-plugins/vscode-builtin-css-language-features/extension/client/dist/cssMain.js:1
    at C (/default-theia-plugins/vscode-builtin-css-language-features/extension/client/dist/cssMain.js:1)
    at Array.map (<anonymous>)
    at asCompletionResult (/default-theia-plugins/vscode-builtin-css-language-features/extension/client/dist/cssMain.js:1)
    at cdn.jsdelivr.net/npm/@theia/[email protected]/min/vs/editor/editor.main.js:30

I hope you can reproduce it with these information and a fix might also solve the Intelephense issue.. hopfully ;)

Sadly I still can't reproduce it. How have you deployed Che? Judging by the error, it might be worth it to try a more recent che-theia release, like 7.17 or 7.16.2.

@danidoedel
Copy link
Author

Currently we are running 7.17.1 on kubernetes, not sure how it was deployed though. I also tired it with che-theia next.
Is there anything I could try out?

@ericwill ericwill mentioned this issue Aug 20, 2020
32 tasks
@danidoedel
Copy link
Author

@ericwill seems to be not just me: eclipse-theia/theia#8475

@ericwill
Copy link
Contributor

@ericwill seems to be not just me: eclipse-theia/theia#8475

Looks like there is a PR open for that issue, maybe it will fix the PHP case as well. I'm also planning on updating Che's PHP plugin this sprint.

@ericwill
Copy link
Contributor

The theia PR has been merged, I would try testing this on Che 7.20 (when it's released) and see if the bug is still there.

@danidoedel
Copy link
Author

@ericwill I can confirm it is fixed with Che Theia next 👍

@ericwill
Copy link
Contributor

Perfect!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/languages Issues related to Language extensions or plugins integration. area/plugins kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

4 participants