kokororin / vscode-phpfmt

Integrates phpfmt into VS Code
https://marketplace.visualstudio.com/items?itemName=kokororin.vscode-phpfmt
BSD 3-Clause "New" or "Revised" License
129 stars 30 forks source link

Passes/Excludes no longer works #105

Closed henry-cotton closed 1 year ago

henry-cotton commented 1 year ago

After the update to 1.15, the passes/exclude fields declare that all the options are invalid. I've had the demo for using tabs rather than spaces from the start, but it now no longer works.

My settings.json: "phpfmt.enable_auto_align": true, "phpfmt.indent_with_space": 4, "phpfmt.passes": [ "PSR2KeywordsLowerCase", "PSR2LnAfterNamespace", "PSR2CurlyOpenNextLine", "PSR2ModifierVisibilityStaticOrder", "PSR2SingleEmptyLineAndStripClosingTag", "ReindentSwitchBlocks" ], "phpfmt.exclude": ["ReindentComments", "StripNewlineWithinClassBody"], "phpfmt.psr1": true, "phpfmt.psr2": false, "[php]": { "editor.defaultFormatter": "kokororin.vscode-phpfmt" }, "editor.formatOnSave": true

However, saving now gives the error message:

phpfmt: passes or exclude invalid: PSR2KeywordsLowerCase, PSR2LnAfterNamespace, PSR2CurlyOpenNextLine, PSR2ModifierVisibilityStaticOrder, PSR2SingleEmptyLineAndStripClosingTag, ReindentComments

kokororin commented 1 year ago

We have upgrade to new fmt.phar, which not includes some of the old passes.

You can see which passes are supported now in readme.

kokororin commented 1 year ago

fixed in 1.1.6