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

[5.3] Revert Eloquent builder changes on firstOr* functions to fix bug #15018

Merged
merged 1 commit into from
Aug 24, 2016
Merged

[5.3] Revert Eloquent builder changes on firstOr* functions to fix bug #15018

merged 1 commit into from
Aug 24, 2016

Conversation

arcdigital
Copy link
Contributor

@arcdigital arcdigital commented Aug 24, 2016

This reverts the changes made in PR #14656 & Issue #14649, which broke the firstOr* functions in certain scenarios. They started returning either a new instance if the DB was empty or the first row if anything existed depending on what your mutators did. This is fine, but it's a breaking change that should be applied and documented appropriately.

@taylorotwell taylorotwell merged commit f1ba864 into laravel:5.3 Aug 24, 2016
@arcdigital arcdigital deleted the 5.3-fix-builder branch August 24, 2016 23:32
@GrahamCampbell GrahamCampbell changed the title Revert Eloquent builder changes on firstOr* functions to fix bug [5.3] Revert Eloquent builder changes on firstOr* functions to fix bug Aug 25, 2016
@GrahamCampbell
Copy link
Member

Probably needs backporting to 5.2, and a final 5.2 release happening.

@arcdigital
Copy link
Contributor Author

arcdigital commented Aug 25, 2016

@GrahamCampbell Yeah, I agree it should be backported to 5.2 as it was a breaking change introduced in 5.2 which wasn't documented. This overall implementation worked, but it broke existing use of the function depending on how the function was used.

@GrahamCampbell
Copy link
Member

Ok, I've backported this. :)

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

Successfully merging this pull request may close these issues.

3 participants