Skip to content

Bug on Attributes! #2437

@siMobin

Description

@siMobin

@prettier/plugin-php v0.23.0
Playground link

Input:

<?php
new
#[Lazy]
#[Computed] 
#[Title('Staff')]
class extends Component {
    public $editing = [];
    public $branches;
};

Output:

<?php
new #[Lazy] #[Computed] #[Title("Staff")] class extends Component {
    public $editing = [];
    public $branches;
};

I tried to figure out how to fix this broken attribute formatting, but I couldn't find any information about it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions