Skip to content

fix HybridRelations::belongsToMany not compatible with Model::belongsToMany #1282

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

Closed
wants to merge 3 commits into from

Conversation

akaroot
Copy link

@akaroot akaroot commented Aug 31, 2017

This should fix issue #1273 for Laravel 5.5.
This is incompatible with Laravel < 5.5 so it couldn't be used for v 3.2.*

fix HybridRelations::belongsToMany not compatible with Model::belongsToMany.
This is incompatible with 5.4
@jenssegers
Copy link
Contributor

Looks like there are more things broken according to travis.

@nshelms
Copy link

nshelms commented Sep 6, 2017

I went through the file and updated all of the functions while keeping the composer.json changes as well. Here's a patch file. Can someone tell me if it fixes this?

patch--170906.txt

@eboye eboye mentioned this pull request Sep 10, 2017
@godfreymakori
Copy link

Check out this gist 066e219

@moiz2050
Copy link

moiz2050 commented Sep 22, 2017

@jenssegers i am still having this issue while installing version 3.2.3 with L5.5

[ErrorException] Declaration of Jenssegers\Mongodb\Eloquent\HybridRelations::belongsToMany($related, $collection = NULL, $foreignKey = NULL, $otherKey = NULL, $relation = NULL) should be compatible with Illuminate\Database\Eloquent\Model::belongsToMany($related, $table = NULL, $foreignPivotKey = NULL, $relatedPivotKey = NULL, $parentKey = NULL, $relatedKey = NULL, $relation = NULL)

@@ -204,17 +204,20 @@ public function morphTo($name = null, $type = null, $id = null)
}
}

/**
**

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

miss the slash.

@divine
Copy link
Contributor

divine commented Jan 22, 2020

Should be closed, #1300 already merged

cc @Smolevich

@Smolevich Smolevich closed this Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.