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 beautifier does not beautify #147

Closed
NathanHazout opened this issue Dec 2, 2014 · 5 comments
Closed

php beautifier does not beautify #147

NathanHazout opened this issue Dec 2, 2014 · 5 comments
Assignees

Comments

@NathanHazout
Copy link

  • Create a new file
  • Set the language as PHP
  • Write ugly PHP code:
<?php
if(  true){
    echo    "Hello World" ;
                    }
  • CTRL+ALT+B
  • It shows a popup saying "Beautification in progress"
  • Nothing gets beautified.

The developer tools console says:

Deleting output file Error: ENOENT, unlink '/var/folders/75/kt5ttf453_3bjj107x2f4xs40000gn/T/114112-11610-fh4bip' {errno: -2, code: "ENOENT", path: "/var/folders/75/kt5ttf453_3bjj107x2f4xs40000gn/T/114112-11610-fh4bip", stack: (...), message: "ENOENT, unlink '/var/folders/75/kt5ttf453_3bjj107x2f4xs40000gn/T/114112-11610-fh4bip'"}

Running:
OSX 10.10.1
Atom 0.152.0
Atom Beautify 0.17.1
Php beautifier path: /Users/nathanh/pear/bin

@NathanHazout
Copy link
Author

While trying to get the php_beautifier version, I ran into an error, which might explain:

nathanh$ ./php_beautifier --version
PHP Warning:  require_once(PHP/Beautifier.php): failed to open stream: No such file or directory in /Users/nathanh/pear/bin/php_beautifier on line 49
PHP Fatal error:  require_once(): Failed opening required 'PHP/Beautifier.php' (include_path='.:/usr/share/pear') in /Users/nathanh/pear/bin/php_beautifier on line 49

No idea where this file is supposed to be and how to set the correct path. I've installed (difficultly) php_beautifier via pear just to be able to use it in Atom Beautify.

@Glavin001 Glavin001 self-assigned this Dec 2, 2014
@Glavin001 Glavin001 added the bug label Dec 2, 2014
@Glavin001
Copy link
Owner

Thanks for creating this issue. Will get to this in a few days after my exams.

@aparedes
Copy link
Contributor

aparedes commented Dec 4, 2014

The error Deleting output file Error: ENOENT, unlink is avoided if in settings you set the Beautifier Filters Folder and a Filter.
After that it works perfectly.

@Glavin001
Copy link
Owner

@aparedes is correct. There is a bug caused by a typo in the update for #107.
See #148 (comment) for more details.

I'll try to get this fixed this weekend. It is a very simple fix for anyone willing to make a pull request. Thanks for your patients.

@Glavin001 Glavin001 added duplicate and removed bug labels Dec 27, 2014
@Glavin001
Copy link
Owner

Essentially this is a duplicate of #148.

@Glavin001 Glavin001 added this to the My Christmas List milestone Dec 27, 2014
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

3 participants