Skip to content

Release 4.14 contains a breaking change for casts that accessed DataProperty->attributes #980

Open
@LauJosefsen

Description

@LauJosefsen

Hi.

Release 4.14 changed the type of DataProperty::attributes from \Illuminate\Support\Collection to \Spatie\LaravelData\Support\DataAttributesCollection. The API of these two classes are not compatible.

Since the attributes property is public, I would expect no such breaking changes in a minor release. We used this property to implement certain casts, and this implementation broke from this minor bump.

I assume it was either unclear this was a breaking change, or the attributes property was not supposed to be part of the public api. If it is not part of the public API, it would be nice it was not public or otherwise documented as non public.

Laravel Data: ^4.14

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