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

Extension does nothing #24

Open
hamsterkacke opened this issue Nov 1, 2017 · 12 comments
Open

Extension does nothing #24

hamsterkacke opened this issue Nov 1, 2017 · 12 comments

Comments

@hamsterkacke
Copy link

Hey,

installed php-cs-fixer correctly as a global composer package, can run it from the command line.

Output from debug console inside of VSCode:

(4) ["fix", "--using-cache=no", "C:\Users\Philipp\AppData\Local\Temp/temp-wfkaylj.php", "--rules=@PSR2,@Symfony"] 0 : "fix" 1 : "--using-cache=no" 2 : "C:\Users\Philipp\AppData\Local\Temp/temp-wfkaylj.php" 3 : "--rules=@PSR2,@Symfony" length : 4

So there seems to be no error, but the formatted temp file doesn't get send back to vscode, i assume.

@ghost
Copy link

ghost commented Nov 17, 2017

This extension does nothing, no error, nothing.

@TheDutchCoder
Copy link

Agreed same issue for me.

No errors, but not functionality either. I specified PSR2 formatting but it doesn't actually do anything.

@CLOUGH
Copy link

CLOUGH commented Dec 11, 2017

I was having the same issue. Found a solution that worked for me here.

I was following the docs and was using the settings. Which did nothing

"phpformatter.logging": true,
    "phpformatter.arguments": [
        "--level=psr2",
        "--fixers=linefeed,short_tag,indentation"
    ]

after some digging this worked for me

"phpformatter.composer": true,
    "phpformatter.logging": true,
    "phpformatter.arguments": [
        "--rules=@PSR2"
    ]

@Jantho1990
Copy link

Tried using the above fix, it did not work for me.

@andresubri
Copy link

@Jantho1990 I just tried the above solution and its working, give it another try and verify the installation steps in case you missed something.

@mattyh88
Copy link

mattyh88 commented Apr 3, 2018

I got it to work with @CLOUGH's solution .. Well at least for the format document functionality .. "Format selection" is not working yet.

@FelipeGangrel
Copy link

@CLOUGH solution did works for me

@CNSKnight
Copy link

This should be in the install docs until fixed in the plugin?

"phpformatter.arguments": [
        "--rules=@PSR2"
    ]

@daaru00
Copy link

daaru00 commented Feb 8, 2019

I tried the solution suggest by @CLOUGH but nothing, still does not work, no logging, no document formatting, nothing at all.

@elbojoloco
Copy link

The document format works for me, but format selection is not working. I copy pasted CLOUGH's suggestion.

@definename
Copy link

definename commented Dec 7, 2019

I was failed to find "--rules=@PSR2" option in official documentation vscode-php-formatter/wiki/Configuration but looks like it helps.

@bvisonl
Copy link

bvisonl commented Oct 26, 2020

For me it was that I was confusing php-cs-fixer with the phpcs extension from Visual Studio Code's Marketplace.

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

No branches or pull requests