Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Serializer psalm/phpstan types support #51673

Closed
@KorDum

Description

@KorDum

Description

Serializer (denormalization specifically) does not support non-empty-list<>.
I have to change to list<> and I'm forced to add in code that uses this data structure non-empty-list<>.

Can you add support please?

Example

Now:

// In Data Structure
/**
 * @var list<Payment> $payments
 */
public array $payments;

// I have to write phpDoc in code
/** @var non-empty-list<Payment> $payments */
$payments = $data->payments;

After adding support:

// In Data Structure
/**
 * @var non-empty-list<Payment> $payments
 */
public array $payments;

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