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

php-cs-fixer not working on win10 #1515

Closed
kdlsw opened this issue Feb 14, 2017 · 5 comments
Closed

php-cs-fixer not working on win10 #1515

kdlsw opened this issue Feb 14, 2017 · 5 comments
Assignees

Comments

@kdlsw
Copy link

kdlsw commented Feb 14, 2017

See https://github.com/FriendsOfPHP/PHP-CS-Fixer for program installation instructions. Your program is properly installed if running 'where.exe php' in your CMD prompt returns an absolute path to the executable. If this does not work then you have not installed the program correctly and so Atom Beautify will not find the program. Atom Beautify requires that the program be found in your PATH environment variable. Note that this is not an Atom Beautify issue if beautification does not work and the above command also does not work: this is expected behaviour, since you have not properly installed your program. Please properly setup the program and search through existing Atom Beautify issues before creating a new issue. See https://github.com/Glavin001/atom-beautify/search?q=php&type=Issues for related Issues and https://github.com/Glavin001/atom-beautify/tree/master/docs for documentation. If you are still unable to resolve this issue on your own then please create a new issue and ask for help.

This is the error output. I am not sure how to properly install this php-cs-fixer on a win10 PC, the installation guide given in the github page are all for linux. I tired to download the php-cs-fixer.phar and the archive files, set "path to php-cs-fixer" in atom to these files, and it did not work. All the researches I have done lead to linux or osx. Can someone tell me how do deal with it on win10. Thanks

@Stormix
Copy link

Stormix commented Mar 3, 2017

same here ...

E:\LARAGON\www\Portfolio (master){hg}
λ where.exe php
E:\LARAGON\bin\php\php-7.1.2\php.exe
E:\LARAGON\bin\php\php-7.1.1-Win32-VC14-x86\php.exe

E:\LARAGON\www\Portfolio (master){hg}
λ where.exe php-cs-fixer
C:\Users\Anas Mazouni\AppData\Roaming\Composer\vendor\bin\php-cs-fixer
C:\Users\Anas Mazouni\AppData\Roaming\Composer\vendor\bin\php-cs-fixer.bat

Everything is setup and configured, but same error message,

I even tried manually downloading PHP-CS-FIXER and adding its path to Atom Beautify Settings but nothing
E:\LARAGON\bin\php\php-7.1.2\php-cs-fixer-v2.phar

@DenaByte
Copy link

DenaByte commented Mar 9, 2017

I have a similar issue
the PHP beautify does not work and gives the above error. Also to add up to that , the where.exe does not return anything , it speaks of INFO: Could not find files for the given pattern(s).
Which is even worse :D I tried reinstalling from ATOM and from CMD, no progress though....

Still waiting for a possible solution

@x7peeps
Copy link

x7peeps commented May 20, 2017

i have the same issue.

Could not find 'php'. The program may not be installed.

E:\Brian Work\MyWeb Project\xtpeeps.cn\首页\test.php11:1 CRLFUTF-8PHP Could not find 'php'. The program may not be installed. See https://github.com/FriendsOfPHP/PHP-CS-Fixer for program installation instructions. Your program is properly installed if running 'where.exe php' in your CMD prompt returns an absolute path to the executable. If this does not work then you have not installed the program correctly and so Atom Beautify will not find the program. Atom Beautify requires that the program be found in your PATH environment variable. Note that this is not an Atom Beautify issue if beautification does not work and the above command also does not work: this is expected behaviour, since you have not properly installed your program. Please properly setup the program and search through existing Atom Beautify issues before creating a new issue. See https://github.com/Glavin001/atom-beautify/search?q=php&type=Issues for related Issues and https://github.com/Glavin001/atom-beautify/tree/master/docs for documentation. If you are still unable to resolve this issue on your own then please create a new issue and ask for help. Hide Stack Trace Error: Could not find 'php'. The program may not be installed. at PHPCSFixer.module.exports.Beautifier.commandNotFoundError (file:///C:/Users/42161/.atom/packages/atom-beautify/src/beautifiers/beautifier.coffee:231:14) at file:///C:/Users/42161/.atom/packages/atom-beautify/src/beautifiers/beautifier.coffee:331:22 at tryCatcher (C:\Users\42161\.atom\packages\atom-beautify\node_modules\bluebird\js\release\util.js:16:23) at Promise._settlePromiseFromHandler (C:\Users\42161\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:512:31) at Promise._settlePromise (C:\Users\42161\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:569:18) at Promise._settlePromise0 (C:\Users\42161\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:614:10) at Promise._settlePromises (C:\Users\42161\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:689:18) at Async._drainQueue (C:\Users\42161\.atom\packages\atom-beautify\node_modules\bluebird\js\release\async.js:133:16) at Async._drainQueues (C:\Users\42161\.atom\packages\atom-beautify\node_modules\bluebird\js\release\async.js:143:10) at Async.drainQueues (C:\Users\42161\.atom\packages\atom-beautify\node_modules\bluebird\js\release\async.js:17:14) at process._tickCallback (internal/process/next_tick.js:103:7)

@Glavin001
Copy link
Owner

I really want to focus on improving the installation experience for users. I have created a new Issue, #1687, to target this problem. Please provide your feedback! Thanks in advance.

@Glavin001
Copy link
Owner

#1687 has been published to v0.30.0. You should now be able to configure the executable/script path in Atom-Beautify package settings:
image

@Glavin001 Glavin001 self-assigned this Jun 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants