Skip to content

Morph To broken by Laravel change #413

@lindyhopchris

Description

@lindyhopchris

This PR:
laravel/framework#29767

Has broken the morph-to tests. Need to investigate whether Laravel have introduced a bug, or if the bug is on our side.

It's specifically in tests that are changing the morphed type from a video to a post.

The problem is something to do with these lines:
https://github.com/laravel/framework/blob/5.8/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php#L236-L238

Because the $class variable will be the video, not the post. So when you associate the post, it has uuid as the owner key - which is now used as a result of the PR above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions