Skip to content

private static array converted to plain array with missing semicolon when ignored #2448

@simonLeary42

Description

@simonLeary42

@prettier/plugin-php v0.24.0
Playground link

Input:

<?php
class Foo
{
    private static array $foo = ["hello" =>  "world"];
    // prettier-ignore
    private static array $foo_ignored = ["hello" =>  "world"];
}

Output:

<?php
class Foo
{
    private static array $foo = ["hello" => "world"];
    // prettier-ignore
    array $foo_ignored = ["hello" =>  "world"]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions