Skip to content

Review files implementation #9

@rodber

Description

@rodber

Files are being hinted by Controller using ArrayTypeParameterInterface:

public static function acceptFiles(): ArrayTypeParameterInterface

This is limiting the design and not providing a clear type hint as it supports any ArrayType and it should work only with FileInterface parameters. The syntax should allow to define multiple files easily:

public static function acceptFiles()
{
    return files(
        photo: file(mime: 'image/jpeg'),
        signature: file(mime: 'application/pdf'),
    );
}

This requires a new array type for files, perhaps support for optional and required parameters. Similar to the other array shapes on Parameter.

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