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

Phpcbf path is not defined #2140

Closed
4 of 5 tasks
Aporie opened this issue May 22, 2018 · 6 comments · Fixed by #2141
Closed
4 of 5 tasks

Phpcbf path is not defined #2140

Aporie opened this issue May 22, 2018 · 6 comments · Fixed by #2141

Comments

@Aporie
Copy link

Aporie commented May 22, 2018

Description

Was trying to setup drupal standard for phpcbf so I've made a new global install of it with composer. After entering the new path in the executable, running beautify result in "error path is not defined".

Input Before Beautification

Not relevant

Expected Output

Not relevant

Actual Output

Not relevant

Steps to Reproduce

composer global require drupal/coder
composer global require dealerdirect/phpcodesniffer-composer-installer

Setting up path to phpcbf in atom beautify settings
Optionally setting up phpcbf standard to Drupal,DrupalPractice (neither works with PEAR).

Debug

Here is a link to the debug.md Gist: https://gist.github.com/Aporie/2e43838a1a2d1af321dd44487862e97c

Checklist

I have:

  • Tried uninstalling and reinstalling Atom Beautify to ensure it installed properly
  • Reloaded (or restarted) Atom to ensure it is not a caching issue
  • Searched through existing Atom Beautify Issues at https://github.com/Glavin001/atom-beautify/issues
    so I know this is not a duplicate issue
  • Filled out the Input, Expected, and Actual sections above or have edited/removed them in a way that fully describes the issue.
  • Generated debugging information by executing Atom Beautify: Help Debug Editor command in Atom and added link for debug.md Gist to this issue
@ghost
Copy link

ghost commented May 22, 2018

Please follow the issue template provided. More specifically, update the original comment for this issue by adding a link to the required debug.md gist which includes debugging information that answers our most commonly asked questions. Thank you.

@stevenzeck
Copy link
Contributor

@Aporie I see the specific issue with the path, that definitely needs to be fixed. But it looks like you are installing it globally. Can you try running phpcs and/or phpcbf from the terminal (just get the version or something) and see if it runs? If so, you probably don't even need the paths there.

@stevenzeck stevenzeck mentioned this issue May 22, 2018
6 tasks
@helpr helpr bot added the pr-available label May 22, 2018
@Aporie
Copy link
Author

Aporie commented May 23, 2018

Hi @szeck87,

No I haven't installed it globally (and I don't really want to) :

$ phpcbf -i
bash: phpcbf: command not found...
Install package 'php-pear-PHP-CodeSniffer' to provide command 'phpcbf'? [N/y]

Whereas :

$ .config/composer/vendor/squizlabs/php_codesniffer/scripts/phpcbf -i
The installed coding standards are PEAR, PSR2, Squiz, MySource, Zend, PSR1, PHPCS, DrupalPractice and Drupal

@helpr helpr bot added the pr-available label May 23, 2018
@stevenzeck
Copy link
Contributor

I'm surprised it even got that far. I thought it would error out when checking PHPCBF's version. I have a PR ready to fix this.

@Aporie
Copy link
Author

Aporie commented May 24, 2018

I've tested your PR and it did the trick :) thanks.

@stevenzeck
Copy link
Contributor

Fixed with v0.32.5.

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

Successfully merging a pull request may close this issue.

2 participants