Skip to content

Mark constructors touched by Valinor as "used" #766

@Ocramius

Description

@Ocramius

Context

Given following code:

<?php

final readonly class MyDTO {
    public function __construct(public string $foo) {}
}

return (new MapperBuilder())
  ->build()
  ->map(MyDTO::class, $_POST);

In this example, MyDTO::__construct() is marked as unused by vimeo/psalm and similar static analysis tooling.

It would be nice if the Valinor Psalm plugin marked such code location as used.

/cc @CristinCebotari

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