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

Switch to DEVSENSE VSCode Plugins? #157

Open
JPustkuchen opened this issue Jan 11, 2024 · 7 comments
Open

Switch to DEVSENSE VSCode Plugins? #157

JPustkuchen opened this issue Jan 11, 2024 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@JPustkuchen
Copy link
Member

JPustkuchen commented Jan 11, 2024

Perhaps we should do this in an experimental branch first, but after testing for 30 days I think these VSCode plugins are better then the combination we're using currently.

https://www.devsense.com/en/features#vscode

List of problems:

  • Formatter is useless. Even when the code formatting style is set to "Drupal" it only partially follows the PHPCS rules.
  • Does not replace the PHPCS linter.
  • Inline references count to methods and variables might be a bit too much for some people.
  • AI Tab completion button is not reassignable (e.g. breaks "normal" code completion using TAB).
@JPustkuchen JPustkuchen added the enhancement New feature or request label Jan 11, 2024
@JPustkuchen JPustkuchen changed the title Switch to DEVSENSE VSCode Plugins Switch to DEVSENSE VSCode Plugins? Jan 11, 2024
@joshsedl
Copy link
Collaborator

joshsedl commented Jan 12, 2024

According to the documentation, this would make the following VSCode plugins obsolete:

  • xdebug.php-debug
  • neilbrayfield.php-docblocker
  • (cvergne.vscode-php-getters-setters-cv => only if we buy the premium service)
  • bmewburn.vscode-intelephense-client
  • (MehediDracula.php-namespace-resolver => seems to be premium only?)

But doesn't seem to replace "valeryanm.vscode-phpsab" (PHPCS) or it isn't stated on the feature list at least.

We shouldn't forget to adjust / delete any related VSCode settings!

@joshsedl
Copy link
Collaborator

I will start using it locally and give feedback, on what is missing / not working.

@joshsedl
Copy link
Collaborator

joshsedl commented Jan 12, 2024

I created a list of problems in the issue summary.

First problem:

  • Formatter is useless. Even when the code formatting style is set to "Drupal" it only partially follows the PHPCS rules. One basic PHPCS rule is, to add a comma to the last array element, this basic feature is an ADDITIONAL setting to the code formatting style, even if its part of the coding standards AND behind a paywall.

image

Here are a few PHPCS error after formatting a Drupal class with it:

  • Spaces must be used to indent lines; tabs are not allowed
  • A comma should follow the last multiline array item. Found: )

It also doesn't work as linter and won't replace the sniffer part of "PHP Sniffer & Beautifier for Visual Studio Code" and since the formatter doesn't work properly, it also won't replace the "beautifier part".

@joshsedl
Copy link
Collaborator

Just used it for a bit again, but I just don't see it...

  • The current implementation does NOT have a Linter at all, only a formatter, and it doesn't even cover the Drupal CS properly.
  • I really hate the inline reference information, just makes everything really cluttered.
  • The seems to only perform decent on PHP files and the tab completion is not rebindable.

As it currently stands, it just isn't an out-of-the-box plugin and probably needs vast custom configurations. I really don't see it for a price point of 120€ per YEAR!!
I rather just use intelephense for 20€ one time payment and even the free version of intelephense would suffice here.

I really don't see it with the amount of money + time investment to have a similar setup as the current one.

@joshsedl joshsedl closed this as not planned Won't fix, can't repro, duplicate, stale Feb 14, 2024
@joshsedl
Copy link
Collaborator

Of course, this isn't solely my decision to make. I just realized, that intelephense also doesn't provide PHP linting and its formatter isn't used either. To be fair, I rarely use any of the intelephense features at all, so if you @JPustkuchen find the DEVSENSE addon useful, we could of course integrate it and stay with "PHP Sniffer & Beautifier" as a linter / formatter like we currently do it with intelephense.

@joshsedl joshsedl reopened this Feb 14, 2024
@joshsedl
Copy link
Collaborator

Currently using it for JTL Plugin development together with PHP Code Beautifier and I think its fine. Although the Performance seems worse than Intelliphense (takes longer to suggest methods) and the doc block creation doesn't seem to work? Is this a premium feature?

@JPustkuchen
Copy link
Member Author

doc block works for me. ctrl+. on the function name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants