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

Atom beautify does nothing for PHP #2551

Open mlucian974 opened 3 years ago

mlucian974 commented 3 years ago

Description

The results of beautification are not what I expect.

Input Before Beautification

This is what the code looked like before:

<nav id="entete">
        < div class="element_entete">
        <h3>------------SITE--------------------</h3>
    </div>
</nav>

Expected Output

The beautified code should have looked like this:

<nav id="entete">
    <div class="element_entete">
        <h3>------------SITE--------------------</h3>
    </div>
</nav>

Actual Output

The beautified code actually looked like this:

<nav id="entete">
        < div class="element_entete">
        <h3>------------SITE--------------------</h3>
    </div>
</nav>

Steps to Reproduce

  1. Add code to Atom editor
  2. Run command Atom Beautify: Beautify Editor
  3. This beautified code does not look right!

Debug

Here is a link to the debug.md Gist: https://gist.github.com/mlucian974/aae911c532c10cccbe85db715c3f146e

Checklist

I have:

johnnya23 commented 3 years ago

Same issue (I think). It doesn't show any error and the beautification "working wheel" comes up, but it simply doesn't do anything in php.

tshazar commented 3 years ago

I had a very similar situation but I solved it by installing v2 of php-cs-fixer (brew now installs v3.0) brew install php-cs-fixer@2 and putting the absolute path in the settings >> executables >> php-cs-fixer /usr/local/opt/php-cs-fixer@2/bin/php-cs-fixer

Looks like php-cs-fixer v.3.0.0 (PHP CS Fixer 3.0.0 Constitution) is not compatible with Atom Beautify yet. Or, I could not find a way to make it work; only a downgrade of php-cs-fixer worked for me.

adleviton commented 3 years ago

Same solution here. Downgraded to php-cs-fixer@2:

brew install php-cs-fixer@2
brew link php-cs-fixer@2
php-cs-fixer -v

(confirm it's version 2.19.0)

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