WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
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