Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

Fix belongsTo() method to be compatible with Laravel 4.1. #133

Merged
merged 2 commits into from
Dec 21, 2013
Merged

Fix belongsTo() method to be compatible with Laravel 4.1. #133

merged 2 commits into from
Dec 21, 2013

Conversation

dalabarge
Copy link
Contributor

This fixes the same issues that #123 pull request fixes but more extensively for models eager loaded with() relationships.

@ceesvanegmond
Copy link

+1

@nicogominet
Copy link

This fix works great for me. This should already be pulled, now that 4.1 is the current version.

@spaceemotion
Copy link

+1, Please merge this!

@raykwok
Copy link

raykwok commented Dec 14, 2013

+1

1 similar comment
@spajz
Copy link

spajz commented Dec 15, 2013

+1

@nicopenaredondo
Copy link

MERGEEEE!!!!!

@cecilozaur
Copy link

+1

@dalabarge
Copy link
Contributor Author

For those not familiar with how to use a fork you can add this to your composer.json file until it's merged:

"require": [
        "laravelbook/ardent": "dev-master"
],
"repositories": [
        {
                "type": "package",
                "package": {
                        "name": "laravelbook/ardent",
                        "version": "dev-master",
                        "source": {
                                "type": "git",
                                "url": "https://github.com/bexarcreativeinc/ardent.git",
                                "reference": "master"
                        },
                        "autoload": {
                                "psr-0": {
                                        "LaravelBook\\Ardent": "src/"
                                }
                        }
                }
        }
]

@lukedanielson
Copy link

Where we at with this Ardent? Looks like there are a number of people submitting PRs to the 4.1 compatibility issue.

#123
#133
#135
#136

@ragingdave
Copy link

I would vote for this pull request as I had to do the exact same thing...so +1

@andrew13
Copy link
Contributor

+1

@danieljames
Copy link

I think ardent's composer.json also needs to be updated to indicate that this change isn't compatible with Laravel 4.0.

@igorsantos07
Copy link
Member

Merging, sorry for the lateness. Quite busy life :((

PS: @bexarcreative-daniel, you could have amended your first commit (: Even if you had pushed it already, you can amend and push-force it - no one would be hurt if no one was already using it ;)

igorsantos07 added a commit that referenced this pull request Dec 21, 2013
Fix belongsTo() method to be compatible with Laravel 4.1.
@igorsantos07 igorsantos07 merged commit 8008885 into laravel-ardent:master Dec 21, 2013
@igorsantos07
Copy link
Member

@bexarcreative-daniel would you - or anyone else in this issue - mind writing some update in the README explaining the changes? Looks like belongsTo got new arguments that are not being mentioned in the file.

@igorsantos07
Copy link
Member

2.3.0 released, finally. Thanks for all the fish and I'm freaking sorry for taking so long with that :/

One more question: should the composer file be updated to require Laravel 4.1 now?

@dalabarge
Copy link
Contributor Author

@igorsantos07 I'll take care of the documentation. And yes, we should make a 4.1 minimal requirement. If someone is still using 4.0 then they will have to be locked at whatever version supports that.

@igorsantos07
Copy link
Member

Done, thanks for the tip (2.3.1 released with the updated composer) and
thanks in advance for the docs.
On Dec 21, 2013 1:53 PM, "Daniel LaBarge" [email protected] wrote:

@igorsantos07 https://github.com/igorsantos07 I'll take care of the
documentation. And yes, we should make a 4.1 minimal requirement. If
someone is still using 4.0 then they will have to be locked at whatever
version supports that.


Reply to this email directly or view it on GitHubhttps://github.com//pull/133#issuecomment-31065891
.

@dalabarge
Copy link
Contributor Author

@igorsantos07 documentation for this and some other new features are in #144.

@amibct
Copy link

amibct commented Jan 29, 2014

Using "bexarcreative-daniel" method, the validation problems are solved
igorsantos07 said that the modification is merged but the original files have problem while validation
What's wrong here?

@dalabarge
Copy link
Contributor Author

@amibct I'm not sure what the problem is that you're having. Could you clarify? I used my fork as provided above on a regular basis in projects. hasSessionStore() has been resolved and the hasManyThrough() feature has been added. This issue is closed so if you continue to have problems I'd suggest looking through other open issues and pull-requests first, then if you can't find a solution, to post a new issue.

@amibct
Copy link

amibct commented Jan 29, 2014

@bexarcreative-daniel
Using Model::validate() on Ardent was showing me errors
Using the solution that you provided ( modifying composer.json ) solved my problem
I don't know why the error is there while the owner says that the modification is merged to the main library?

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

Successfully merging this pull request may close these issues.