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 #1225

Closed
4 tasks done
ipranjal opened this issue Sep 25, 2016 · 4 comments
Closed
4 tasks done

php-cs-fixer not working #1225

ipranjal opened this issue Sep 25, 2016 · 4 comments
Assignees
Labels
Milestone

Comments

@ipranjal
Copy link

ipranjal commented Sep 25, 2016

Description

shows php-cs-fixer error even though its installed properly
screen shot 2016-09-25 at 9 20 48 pm

Steps to Reproduce

  1. Add code to Atom editor
  2. Run command Atom Beautify: Beautify Editor
  3. Php-cs-fixer not found!

    Debug

Nothing is output/gist is form on Atom Beautify:Help Debug Editor #1224

Checklist

  • Running which php outputs :

screen shot 2016-09-25 at 9 24 42 pm

  • Running which php-cs-fixer outputs:

screen shot 2016-09-25 at 9 25 31 pm

  • Running Atom Beautify:Help Debug Editor outputs nothing Issue with Debug #1224
  • Added php-cs-fixer path still error persists :

screen shot 2016-09-25 at 9 27 56 pm

Additional info

@ipranjal
Copy link
Author

@Glavin001 Debug File: https://gist.github.com/anonymous/2ebcad7854e30b8640d7a032262a45e4
The path seems correct ! whats the issue?

@Glavin001
Copy link
Owner

It looks like cs_fixer_path is not used for Mac/Linux only Windows: https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/php-cs-fixer.coffee#L66

  cs_fixer_path: '/Users/pranjalp/.composer/vendor/bin/php-cs-fixer',

For Mac/Linux it uses the PATH environment variable:

PATH=/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/Applications/XAMPP/xamppfiles/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/pranjalp/Desktop/caddy/:/opt/X11/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/Applications/XAMPP/xamppfiles/bin

I recommend adding /Users/pranjalp/.composer/vendor/bin/ to your PATH and it should work. If not, re-run Help Debug Editor again and we can see what the next issue is.

@Glavin001 Glavin001 self-assigned this Sep 25, 2016
@Glavin001 Glavin001 added this to the v0.30.0 milestone Sep 25, 2016
@ipranjal
Copy link
Author

Manually adding PATH to the paths file fixed the issue . Hats off to your support @Glavin001
10/10 to this package ! Thank you :)

@Glavin001
Copy link
Owner

Awesome to hear, @physcocode! Let me know if you need anything else. Hopefully the next version of Atom-Beautify will be less prone to these kinds of errors 😃 .

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

No branches or pull requests

2 participants