Skip to content

[TypeError] In Enm\JsonApi\Model\Resource\ResourceCollection::merge #27

@yngc0der

Description

@yngc0der
[TypeError] 
Argument 1 passed to Enm\JsonApi\Model\Resource\Link\LinkCollection::merge() must implement interface Enm\JsonApi\Model\Resource\Link\LinkInterface, array given, called in ...

when i try to work with relationships in

foreach ($resource->links() as $link) {

/** @var LinkInterface $link */
foreach ($resource->links() as $link) {
    $existing->links()->merge($link, $replaceExistingValues);
}

$link is array(1) {LinkInterface $link}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions