Skip to content

Should data collections throw if data files are invalid? #1736

@emmadesilva

Description

@emmadesilva

Exploring ways to improve the file-based data collections feature for 2.x. One of these changes is to throw exceptions if data is invalid.

For example: Currently, a JSON file with bad syntax is returned as null, while YAML collections will throw an error, which is inconsistent. The main goal with HydePHP is to have great developer experience (DX), so I'm thinking if introducing exceptions for all invalid data types is the right approach.

My main advantage is direct and clear feedback on what has gone wrong, however a drawback is being interrupted when developing a data file.

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