Are there any plans to support PHP 8 attribute code formatting? right now it does some weird things.
I'm specifically talking about attributes that are not "simple" like the ones found in the documentation https://www.php.net/manual/en/language.attributes.overview.php
but more complex ones like swagger-php https://zircote.github.io/swagger-php/guide/attributes.html

right now the formatter does some weird things with those, for example if I have a schema attribute for a class like this:

#[OAT\Schema(
properties:
    [
        "id" => new OAT\Property
        (
            readOnly: true,
            property: "id",
            type: "integer",
            example: 123,
        ),
    ]
)]

the formatter loses all the identation, and on subsequent formats splits readOnly: true first to
readOnly
: true
and then just starts adding new lines between readOnly and : true

is there something I can do now? perhaps make the formatter ignore attributes?
using version v1.31.12740

    Hello Simo,

    Thank you very much for your question.

    This is something we have to do and not much you can do right now. We will look at it ASAP, so perhaps we can provide you with the solution in the pre-release.

    But as you've suggested maybe it would be a good idea to have some mechanism for formatter to ignore certain parts of the code in case something turns out.

    Thank you!

      Hello Simo,

      This will be supported in the upcoming pre-release.

      Thanks again for reporting this.

      Write a Reply...