Glavin001 / atom-beautify

:mega: Help Wanted - Looking for Maintainer: https://github.com/Glavin001/atom-beautify/issues/2572 | :lipstick: Universal beautification package for Atom editor (:warning: Currently migrating to https://github.com/Unibeautify/ and have very limited bandwidth for Atom-Beautify Issues. Thank you for your patience and understanding :heart: )
http://unibeautify.com/
MIT License
1.5k stars 453 forks source link

Beautify and PHP problem #2527

Open GeniusBroccoli opened 4 years ago

GeniusBroccoli commented 4 years ago

Description

Beautify doesn't work with PHP

Input Before Beautification

This is what the code looked like before:

<?php for ($i=0;$i<;$i++){echo "string";echo "string";echo "string";echo "string";echo "string";echo "string";}?>

Actual Output

I see progress bar, but nothing changes. Try to use atom-beautify from menu and from command palette.

Steps to Reproduce

I googled this trouble, tried for many instructions, and nothing. Now I have clean install of Win7 x64 and do this:

  1. Install atom
  2. Install only one package: atom-beautify
  3. Download official old PHP version 7.2.34 (but I'm tried newer versions too) and place it in C:\php72 directory
  4. Add PATH to PHP thru CMD: setx path %path%;"C:\php72\"
  5. Download PHP Coding Standards Fixer from https://cs.symfony.com file php-cs-fixer-v2.phar
  6. Place file php-cs-fixer-v2.phar in the php72 folder with php.exe
  7. Start atom, go to atom-beautify Settings->Executables and place in the PHP section C:\php72\php.exe and in the PHP-CS-Fixer section C:\php72\php-cs-fixer-v2.phar
  8. Close atom, restart PC.

Debug

Sorry, I'm newbie, doesn't connect atom with github yet. Can I'm attach file here? atom-beautify-debug.zip

Checklist

I have:

Frischid commented 3 years ago

I just read your issue and tried the php snippet you posted. After solving the syntax problem (missing the number e.g. 5) beautify did its job. When there was the syntax issue, beautify did nothing. See the fixed code here: <?php for ($i=0;$i<5;$i++){echo "string";echo "string";echo "string";echo "string";echo "string";echo "string";}?>

Since I'm not yet very good at php, don't know if this really was the only problem.

SilentGlasses commented 1 year ago

If you still need this and are looking for something to fill the spot that Atom left, I am using Pulsar the successor to Atom... This package is working except for one deprecated error listed in #2605

If you don't need this anymore, can you please close this out so it's not just sitting there? Thanks