Skip to content

Quick mock fails when using the new "public readonly" notation for Constructor Property Promotion #90

@MollocH

Description

@MollocH

Describe the bug
In PHP8, constructor property promotion was introduced. On top of that we can now define visibility and immutability of a property.

Example:

public function __construct(
        private readonly EventLogInterface $eventLogService,
        private readonly FileUploadRepository $fileUploadRepository
) {
}

Quick mock will create these annotations:

/** @var private|ObjectProphecy */
private $eventLogService;
/** @var private|ObjectProphecy */
private $fileUploadRepository;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions