soderlind / vscode-phpcbf

PHP Code Beautifier and Fixer for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=persoderlind.vscode-phpcbf
GNU General Public License v3.0
28 stars 10 forks source link

onWillSaveTextDocument-listener error #35

Open betweenbrain opened 4 years ago

betweenbrain commented 4 years ago

I've run into the following error being thrown by this extension:

[2019-09-30 18:10:03.524] [exthost] [error] onWillSaveTextDocument-listener from extension 'persoderlind.vscode-phpcbf' threw ERROR
[2019-09-30 18:10:03.524] [exthost] [error] Error: timeout
    at Timeout.define._deliverEventAsync.setTimeout [as _onTimeout] (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:475:26)
    at ontimeout (timers.js:425:11)
    at tryOnTimeout (timers.js:289:5)
    at listOnTimeout (timers.js:252:5)
    at Timer.processTimers (timers.js:212:10)

My settings.json is:

{
    "[css]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[html]": {
        "editor.defaultFormatter": "vscode.html-language-features"
    },
    "[javascript]": {
        "editor.defaultFormatter": "vscode.typescript-language-features"
    },
    "[php]": {
        "editor.defaultFormatter": "persoderlind.vscode-phpcbf"
    },
    "editor.minimap.enabled": false,
    "explorer.confirmDelete": false,
    "phpcbf.debug": true,
    "phpcbf.documentFormattingProvider": true,
    "phpcbf.executablePath": "/Users/mthomas/.composer/vendor/bin/phpcbf",
    "phpcbf.onsave": true,
    "phpcbf.standard": "WordPress",
    "workbench.startupEditor": "newUntitledFile",
    "javascript.updateImportsOnFileMove.enabled": "always",
    "editor.formatOnPaste": true,
    "editor.formatOnSave": true,
    "php.validate.run": "onType",
    "php.validate.enable": true,
    "php.suggest.basic": false,
    "editor.formatOnType": true,
    "eslint.alwaysShowStatus": true,
    "eslint.autoFixOnSave": true
}

I have tried restarting and uninstalling/re-installing this extension without any luck.

betweenbrain commented 4 years ago

Running phpcbf manually results in the following error:

PHPCBF RESULT SUMMARY
------------------------------------------------------------------------------------
FILE                                                                FIXED  REMAINING
------------------------------------------------------------------------------------
fields.php     FAILED TO FIX
------------------------------------------------------------------------------------
A TOTAL OF 0 ERRORS WERE FIXED IN 1 FILE
------------------------------------------------------------------------------------
PHPCBF FAILED TO FIX 1 FILE
------------------------------------------------------------------------------------

Time: 13 mins, 40.53 secs; Memory: 97.81MB

Closing this issue as it seems to be with PHPCBF and not this extension.

betweenbrain commented 4 years ago

Reopening this issue as I seem to be running into this with smaller files that manually running phpcbf completes fine with.