Open hamsterkacke opened 7 years ago
This extension does nothing, no error, nothing.
Agreed same issue for me.
No errors, but not functionality either. I specified PSR2 formatting but it doesn't actually do anything.
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"
]
Tried using the above fix, it did not work for me.
@Jantho1990 I just tried the above solution and its working, give it another try and verify the installation steps in case you missed something.
I got it to work with @CLOUGH's solution .. Well at least for the format document functionality .. "Format selection" is not working yet.
@CLOUGH solution did works for me
This should be in the install docs until fixed in the plugin?
"phpformatter.arguments": [
"--rules=@PSR2"
]
I tried the solution suggest by @CLOUGH but nothing, still does not work, no logging, no document formatting, nothing at all.
The document format works for me, but format selection is not working. I copy pasted CLOUGH's suggestion.
I was failed to find "--rules=@PSR2"
option in official documentation vscode-php-formatter/wiki/Configuration but looks like it helps.
For me it was that I was confusing php-cs-fixer
with the phpcs
extension from Visual Studio Code's Marketplace.
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.