Open stereoit opened 7 years ago
Facing same issue +1
+1
+1
+1
+1
-1 using
any update on this?
+1
I just would like to state I am using latest VSCode + php-cs-fixer 0.1.34 and PHP formatter 0.2.4. Whenever I paste any PHP text, I get the message in the topic. When I have only php-cs-fixer enabled nothing happens (basically I start to get this when I enable php-formatter extension). I am extending old symfony 1.4 project (if that helps).
+1
+1
+1 . mac vscode
+1. Doesn't work at all. A plugin should not require you to install outside dependencies. If you can't automatically install all dependencies via npm then fail.
+1
Is there anything I can do to resolve this? Somehow turn some setting on, provide logs?
On Thu, May 4, 2017 at 9:01 AM, Sagar Shah notifications@github.com wrote:
+1
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Dickurt/vscode-php-formatter/issues/17#issuecomment-299110705, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEDnCe9zggPknl5U2xl61U1GguyFsVuks5r2Xe0gaJpZM4MmY1g .
-- stereoIT s.r.o. Heřmanova 23 107 00 Praha 7 mob: +420 776 76 23 78
+1 :/
+1
+1
+1
+1
+1
+1
Is there any solution for this?
Hi everyone, i found out when added the setting "phpformatter.composer": true, "phpformatter.arguments":["--rules=@PSR2"] This issue could be solved. If you didn't use composer installed, must to point the "phpformatter.pharPath" path.
Try it! Thanks.
Didn't work for me...
Had the same problem, but I already had composer installed, so all I had to do was change the composer settings to true, and the problem went away.
"phpFormatter.composer": true
It's work on Linux OS with
intosettings.json
// Should point to php-cs-fixer.phar file, if you have installed this manually (without Composer). Should include .phar extension.
"phpformatter.pharPath": "/home/user/.config/composer/vendor/friendsofphp/php-cs-fixer/php-cs-fixer.phar",
// If the pharPath is set, and you are not using Composer, and you haven't added PHP to your PATH, this should point to the php.exe file.
"phpformatter.phpPath": "php",
// Whether the php-cs-fixer library has been installed using Composer. If true, the extension will override pharPath and assume you have added Composer to your PATH.
"phpformatter.composer": false,
// Add arguments to the executed fix command, like so: ['--level=psr2', '--fixers=linefeed,short_tag,indentation'].
"phpformatter.arguments": [
"--level=psr2"
],
// If true, the extension will log all sorts of (debug) info to the console. Useful for troubleshooting.
"phpformatter.logging": true,
// If true, the extension will show notifications.
"phpformatter.notifications": true
Hi,
the solution for me:
a) uninstall php-cs-fixer from VSCode b) install php-cs-fixer via composer: composer global require friendsofphp/php-cs-fixer c) modify setting (ctrl,) add ""phpformatter.composer": true
Then I do not receive any of those error messages.
On Fri, May 26, 2017 at 9:10 AM, Hein Zin notifications@github.com wrote:
It's work on Linux OS with into settings.json
// Should point to php-cs-fixer.phar file, if you have installed this manually (without Composer). Should include .phar extension. "phpformatter.pharPath": "/home/user/.config/composer/vendor/friendsofphp/php-cs-fixer/php-cs-fixer.phar",
// If the pharPath is set, and you are not using Composer, and you haven't added PHP to your PATH, this should point to the php.exe file. "phpformatter.phpPath": "php",
// Whether the php-cs-fixer library has been installed using Composer. If true, the extension will override pharPath and assume you have added Composer to your PATH. "phpformatter.composer": false,
// Add arguments to the executed fix command, like so: ['--level=psr2', '--fixers=linefeed,short_tag,indentation']. "phpformatter.arguments": [ "--level=psr2" ],
// If true, the extension will log all sorts of (debug) info to the console. Useful for troubleshooting. "phpformatter.logging": true,
// If true, the extension will show notifications. "phpformatter.notifications": true
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Dickurt/vscode-php-formatter/issues/17#issuecomment-304209749, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEDnE-xVaEJvT6Viz9Z0GIuS0VQ6QRLks5r9nr-gaJpZM4MmY1g .
-- stereoIT s.r.o. Heřmanova 23 107 00 Praha 7 mob: +420 776 76 23 78
+1
+1
+1
+1
+1
+1
still? +1
Guys ... Not the solution but Brackets is quite good, if you install a couple of plugins in it you would have a nice IDE
My case. After uninstall PHP Formatter(Sophisticode.php-formatter), the message did not show again.
+1
+1
+1
The message went away but I don't see any formatting! Should I do something other than right click format document?
did nothing
+1
+1
@all instead of saying +1, you should report on whether the solutions are working or not. @stereoit worked for me
@stereoit solution for me worked too. What I did:
a) Install cs fixer globally composer global require friendsofphp/php-cs-fixer
b) add composer binaries to path (if you haven't already)
export PATH="$PATH:$HOME/.composer/vendor/bin"
- for unix systems, similar for windows
c) you can confirm cs fixer is added to path by simply entering php-cs-fixer
in your terminal
d) in vscode update your settings to use the composer installed version "phpformatter.composer": true
Words cannot express how lame it is this has not been fixed by the developer after 6+ months. I've tried the various steps above. Now it just silently fails instead of showing the message given in the bug report.
@haydentech there's nothing to fix that's why, people don't follow simple instructions. See here: https://github.com/Dickurt/vscode-php-formatter/wiki/Prerequisites
@Lyricalz I've followed those instructions. That got me from "Not working, and gives me an error message" to "Not working, but gives no message whatsoever". php-cs-fixer is installed via composer, is on my path, and I have made the necessary change in the Code settings. I'm on Ubuntu 16.04 and Code 1.18.0 if that matters.
Trash extension... Gulp is a better choice
In visual studio code I've started to get the message in subject every time I save the PHP file. I working on older project with symfony 1.4.