-
Notifications
You must be signed in to change notification settings - Fork 453
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
Update v0.30.x throws error "Could not find 'PHP-CS-Fixer'. The program may not be installed." #1725
Comments
Same problem here. |
@9585999 Are you find solution? |
Facing same issue after update. |
Hi everyone! I want to help solve this for you ASAP. The last release was specifically targeting improving the setup of third-party beautifiers (e.g. PHP-CS-Fixer) within Atom-Beautify. While all of my tests passed, I know this is a complicated matter and I need help for users like you to really make this experience great. Please provide:
In the mean time, you could downgrade to the last release with |
Published patch to v0.30.1 Please provide the above information if the latest release does not improve things for you. Thanks! |
For anyone experiencing this issue please provide the information I requested in #1725 (comment) |
At me all works, now even in options atom-beatufy I do not register a way to php-cs-fixer. Thanks for your work ! |
Work on my Win 10x64. Tnx Glavin001. |
PHPCBF was working perfectly recently until this happened in the new version, hope this gist is helpful for you to debug. Also tried adding the executables with no luck. |
Thanks, @prasadfutballer ! From your logs:
Note when
3.0.1 .
This should be a quick fix I will have to test out tomorrow and publish a new release. Until then, please downgrade so you can still be productive and I will fix this ASAP. Thanks! |
No problem @Glavin001 ..Just to help you out I just updated PHPcodesniffer to 3.0.1 after this error occurred just to check out if that solves the problem. I previously had PHP_Codesniffer v2.6.0 with the same error. |
Hi guys, Ran the latest package update today (v 0.30.1) and having the same issue as what's been described above. @Glavin001, here's the gist for my debug.md - hope it helps - https://gist.github.com/zesda/b39f127dcafe00a24128c1c406dac483 |
Just installed. Same issue v 0.30.1 |
Having this issue: the "PHP - PHP-CS-Fixer Path (cs_fixer_path)" configuration option has been deprecated. Please switch to using the option named "Executables - PHP-CS-Fixer - Path" in Atom-Beautify package settings now. Using Windows 10 64x, path of "which php-cs-fixer" exactly matches with atom beautify path required. The path in atom beautify that I have placed ends with C:/php-cs-fixer.phar from command line running php C:/php-cs-fixer.phar shows the available commands. Not too sure what the error meant. |
@nicholas-ooi Try removing the php-cs-fixer path from the atom-beautify settings |
@nicholas-ooi : @9585999 is correct. I will be removing the |
@prasadfutballer would you be able to create a new issue with your info for specifically Thank you everyone else for your |
Thanks for the clarification really appreciate it. I tested "where.exe php-cs-fixer" and it gave me the absolute path. I have also placed the relevant path in the ENV variable but still encountered same issue, since i tried to also shift the php-cs-fixer.phar in different folders. I know that the ENV works because I could type php-cs-fixer.phar in the command and it will launch it in my editor knowing that the path has been set. Furthermore, in the command line I was still able to execute php php-cs-fixer fix etc. by changing directory to where php-cs-fixer.phar is located. |
I think you may still need it manually configured, just using the |
@nicholas-ooi You have an atom installed php-cs-fixer? |
I had an atom php-cs-fixer installed long time ago but I had it uninstall immediately after I discovered beautify, which had been using for a couple of months. @Glavin001 Alright will try it out! and thanks! |
@zesda the version of PHP you are using was unsupported:
I will improve the version parsing to support |
@johanvanhelden and @kataklys from #1727 :
Hopefully the fix for @zesda will work for you, however without each of your |
Published fixes to v0.30.2 |
@Glavin001 6db34cd fixed it for me, thanks! |
* master: (79 commits) Update changelog [skip ci] Prepare 0.30.2 release Fixes Glavin001#1030. Add support for alpha versions of autopep8 Fixes Glavin001#1725. Fix version parsing of PHP executable Fixes Glavin001#1730. Correctly parse PHPCBF version and improve handling of Executable See Glavin001#1708. Re-generate documentation for Fortran file extension changes Prepare 0.30.1 release Prepare changelog for v0.30.1 See Glavin001#1725. Update changelog Fixes Glavin001#1725. Improve PHP-CS-Fixer support with handling script path Update changelog. See Glavin001#1030. Fix Glavin001#1030. Autopep8 Executable did not handle older and newer versions Prepare 0.30.0 release See Glavin001#1687. Update README, remove note about Executables now that it is supported See Glavin001#1687. Update Changelog with info about Executables Add Greenkeeper badge See Glavin001#1687. Update README docs to include details about Executables and Docker support Add more dependencies to next-update and greenkeep ignore list See Glavin001#1687. Fix typos in Travis CI config See Glavin001#1687. Install Sass-convert and Uncrustify beautifiers via Docker for Linux Travis CI build ... # Conflicts: # README.md
I'm still confused. I'm on Windows 10 inside of .atom/packages/php-cs-fixer. What file am I looking for here? I can't find any .phar files. There's an .editorconfig file, but then I get Spawn Unknown error. There's a .coffee file in lib, but same issue when I link to that. There's a .php_cs file in the examples folder, and when I run atom beautify I no longer get any error, but it also does not appear to be working. Stays ugly (white spaces) after running the beautifier. |
@jordan-webdev, it sounds like you're talking about the package https://atom.io/packages/php-cs-fixer not Atom-Beautify. If you are talking about Atom-Beautify then:
|
Yes, I'm talking about php-cs-fixer, but I'm using Atom beautify. I'm trying to update my path like this thread mentions, but I can't seem to find the right value to input in that field. |
The |
Also take a look at the |
Okay, I installed the .phar file from there now and linked to it in the path. Now when I run atom beautify, there is no error, but it does not work. Notice how there is no space between the opening php tag and the if statement in "if (is_front_page()"? I tried closing and reopening atom editor. https://gist.github.com/jordan-webdev/6938bb592335c379c99ecf5328904762 |
Your logs show:
Looks like a linting error in your code prevented PHP-CS-Fixer form working. If you have questions I recommend you ask them at https://github.com/FriendsOfPHP/PHP-CS-Fixer |
After the update, the PHP-CS-Fixer stopped working.
how to solve a problem?
The text was updated successfully, but these errors were encountered: