I've php.format.rules.alignConstants enabled, but I found one case where this is not working.

<?php

declare(strict_types=1);

namespace ASDF;

const A2 = 1; // Not correctly formatted
const ABC2 = 2; // Not correctly formatted

class Test
{
    const A   = 1; // Correctly formatted
    const ABC = 2; // Correctly formatted
}

The two lines marked as not correctly formatted are not formatted because of the declared namespace.
Also if I nest the code in a namespace block it isn't formated.

It will only be formatted when removing the namespace.

    Hello,

    Thank you for reporting this. We will fix that ASAP.

      We've fixed this one. The next pre-release will contain the fix.

      Thank you again!

        Write a Reply...