Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yngc0der opened this issue Jun 14, 2021 · 0 comments
Open

Comments

@yngc0der
Copy link

[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}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant