Skip to content

Feature request; Primary constructors #18287

Open
@Tchilly

Description

@Tchilly

Description

class User (Repo $repo, string $text) {
    public method() {
        // ...
    }
}

Love the syntax from C# over the __contruct we have today, It’s cleaner and more declarative. RFC time?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions