-
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
Add config option for PHP Beautifier filters #107
Comments
I am unfamiliar with filters for |
If you could document in a little more detail your steps for |
Well, it was actually simple. I just used Pear and ran I'll investigate adding filters and get back to you tomorrow. Thanks for being so responsive!
|
It seems that you can add a line to the Atom Beautify settings for users to add command line arguments so that we can toggle filters on and off there, as we would when calling php_beautifier via the command line. Also, we can use callbacks within the specific files, but it seems that they are not working. This could be an Atom Beautify thing, or a PEBKAC thing, not sure. In any case, the ArrayNested filter seems to be the one I'm after. |
I am having some issues with using $ php_beautifier
Warning: require_once(PEAR.php): failed to open stream: No such file or directory in /Users/glavin/pear/bin/php_beautifier on line 37
Fatal error: require_once(): Failed opening required 'PEAR.php' (include_path='.:') in /Users/glavin/pear/bin/php_beautifier on line 37 Until I am able to resolve this I cannot test any changes that I make that are for PHP beautification. |
If you need a solution soon, you could try editing the Atom Beautify package yourself and see if you can get it working. If so, please submit a Pull Request! |
This is useless for us php developers without this setting! |
Published to v0.17.1 Added options:
As stated above, I am unable to test as I cannot get PHP_beautifier to work on my computer. Please test this and let me know if this is working or not. Thank you for your patients. |
Works beautifully. Thank you very much! |
So, my journey began when I wanted to easily beautify a particularly nasty PHP array. "I'll just use this neat looking package,
Atom Beautify
!" I said to myself. Turns out it requiresPHP Beautifier
. No problem, I'll just install it. Well, the package on the Atom package manager 404'd, so I went ahead to manually install it. And then I needed Pear. And then I needed to add it's include path to php.ini, but actually there is no php.ini so I needed to copy it over from wherever it was hiding (don't ask because I really have no idea where it was). Then I was finally able to add the include_path for Pear into php.ini, but only after googling around to figure out how nano works so as to avoid borking things further. I'm not willing to admit how many hours it took to get there.Imagine my despair when
php_beautifier
, used throughAtom Beautify
, simply compressed the entire array into a single line. Not ideal!Upon further research, I have found that there are filters out there that will help, but...
my real question is,
tl;dr: How do I use
php_beautify
filters withAtom Beautify
?The text was updated successfully, but these errors were encountered: