Skip to content

Promotion property must not be redeclared #257

@frkinta

Description

@frkinta

The code below may looks normal

 <?php

 class Test {
 
    private array $postedData;

    /**
     * 
     * @param array $postedData
     */
    public function __construct(
        private array $postedData,
    )
    {
    }

}

but it produce an error: "Cannot redeclare Test::$postedData on line ... in file Test.php".
see

Will be great to let know one is redeclaring.

Thanks

Metadata

Metadata

Assignees

Labels

featureNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions