Skip to content

Loading class from file doesn't support promoted parameters #103

@SneedusSnake

Description

@SneedusSnake

When I'm trying to use
Nette\PhpGenerator\PhpFile::fromCode
it loses promoted property of constructor parameters for some reason (e.g __constructor(public ?string $name) {} becomes __constructor(?string $name) {}
I also cannot turn off autoresolving while using this method, so my types use full import:
Request $request becomes Illuminate\Http\Request $request

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