Skip to content

Remove formatting #501

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

Closed
felixfbecker opened this issue Oct 23, 2017 · 5 comments · Fixed by #504
Closed

Remove formatting #501

felixfbecker opened this issue Oct 23, 2017 · 5 comments · Fixed by #504

Comments

@felixfbecker
Copy link
Owner

felixfbecker commented Oct 23, 2017

At this point there are countless issues about the formatting done by CodeSniffer. It plain out doesn't work in many cases (while editing), overrides format options that are contributed by other extensions in VS Code and does not reuse any of our AST parsing. For that reason, I am starting to think there is no reason to keep it in here until we have proper pretty-printing support from https://github.com/Microsoft/tolerant-php-parser that actually reuses our ASTs and can work while editing. For people who want to use CodeSniffer to format their code, there could be a standalone CodeSniffer language server (like there is a TSLint language server and ESLint language server). As said, we don't reuse our state anyway.

cc @roblourens @mniewrzal @kaloyan-raev

@kaloyan-raev
Copy link
Contributor

I agree. The CodeSniffer formatting looked like a good idea in the early days of the PHP LS. But if it causes so much trouble, it is better to look for an alternative.

@felixfbecker
Copy link
Owner Author

To be clear, I am proposing to remove it even without having an alternative

@roblourens
Copy link
Contributor

I agree that tolerant-php-parser needs to support this, but in the meantime, is there no other alternative for PHP pretty printing?

felixfbecker added a commit that referenced this issue Oct 28, 2017
BREAKING CHANGE: removes formatting support

closes #501
@felixfbecker
Copy link
Owner Author

also cc @damieng

felixfbecker added a commit that referenced this issue Oct 28, 2017
BREAKING CHANGE: removes formatting support

closes #501
closes #474
closes #473
closes #468
closes #450
closes #445
closes #443
closes #423
closes #343
closes #296
closes #293
felixfbecker added a commit that referenced this issue Oct 28, 2017
BREAKING CHANGE: removes formatting support

closes #501
closes #474
closes #473
closes #468
closes #450
closes #445
closes #443
closes #423
closes #343
closes #296
closes #293
closes #499
closes #471
felixfbecker added a commit that referenced this issue Oct 28, 2017
BREAKING CHANGE: removes formatting support

closes #501
closes #474
closes #473
closes #468
closes #450
closes #445
closes #443
closes #423
closes #343
closes #296
closes #293
closes #499
closes #471
felixfbecker added a commit that referenced this issue Oct 28, 2017
BREAKING CHANGE: removes formatting support

closes #501
closes #474
closes #473
closes #468
closes #450
closes #445
closes #443
closes #423
closes #343
closes #296
closes #293
closes #499
closes #471
felixfbecker added a commit that referenced this issue Oct 28, 2017
BREAKING CHANGE: removes formatting support

closes #501
closes #474
closes #473
closes #468
closes #450
closes #445
closes #443
closes #423
closes #343
closes #296
closes #293
closes #499
closes #471
@damieng
Copy link

damieng commented Oct 28, 2017

No change needed in the Atom package - although we register the ability to code format in the package.json it still degrades functionality dynamically based on the initializationResponse.

felixfbecker added a commit that referenced this issue Nov 5, 2017
At this point there are countless issues about the formatting done by CodeSniffer. It plain out doesn't work in many cases, overrides format options that are contributed by other extensions in VS Code and does not reuse any of our AST parsing. For that reason, I am starting to think there is no reason to keep it in here until we have proper pretty-printing support from https://github.com/Microsoft/tolerant-php-parser that actually reuses our ASTs and can work while editing. For people who want to use CodeSniffer to format their code, there could be a standalone CodeSniffer language server (like there is a TSLint language server and ESLint language server). As said, we don't reuse our state anyway.

BREAKING CHANGE: removes formatting support

closes #501
closes #474
closes #473
closes #468
closes #450
closes #445
closes #443
closes #423
closes #343
closes #296
closes #293
closes #499
closes #471
felixfbecker added a commit to felixfbecker/vscode-php-intellisense that referenced this issue Nov 19, 2017
Updates the language server to 5.2.0
 - Don't suggest <?php on > character in HTML
 - Properly resolve self, static, parent
 - Warn if $this is used in invalid contexts

BREAKING CHANGE:
This update removes the PHP CodeSniffer formatting support.
To get the same formatter back in VS Code, please install https://marketplace.visualstudio.com/items?itemName=ikappas.phpcs
See felixfbecker/php-language-server#501 for details.
cgxxv pushed a commit to cgxxv/php-language-server that referenced this issue Mar 25, 2022
At this point there are countless issues about the formatting done by CodeSniffer. It plain out doesn't work in many cases, overrides format options that are contributed by other extensions in VS Code and does not reuse any of our AST parsing. For that reason, I am starting to think there is no reason to keep it in here until we have proper pretty-printing support from https://github.com/Microsoft/tolerant-php-parser that actually reuses our ASTs and can work while editing. For people who want to use CodeSniffer to format their code, there could be a standalone CodeSniffer language server (like there is a TSLint language server and ESLint language server). As said, we don't reuse our state anyway.

BREAKING CHANGE: removes formatting support

closes felixfbecker#501
closes felixfbecker#474
closes felixfbecker#473
closes felixfbecker#468
closes felixfbecker#450
closes felixfbecker#445
closes felixfbecker#443
closes felixfbecker#423
closes felixfbecker#343
closes felixfbecker#296
closes felixfbecker#293
closes felixfbecker#499
closes felixfbecker#471
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants