laravel / framework

The Laravel Framework.
https://laravel.com
MIT License
32.44k stars 11k forks source link

Updated to 4.1.22, Illuminate\Database\Eloquent\Builder#get() starts to return array of stdClass?! #3741

Closed voydz closed 10 years ago

voydz commented 10 years ago

Hi,

i just upgraded my laravel project to 4.1.22 using the standard composer update command. After refreshing the page i ran into errors like "Call to a member function count() on a non-object". As i inspected these errors i noticed that calls like this:

$order = Cart::with('article')
    ->where('user_id', '=', $this->getUser()->id)
    ->get();

are returning arrays containing stdClasses. They used to return collections filled with model objects (in this case Cart).

I already scanned the changelog for some information but i did found nothing. Am i missing something? Im searching for hours now, it feels like i can't see the wood for the trees... :weary:

taylorotwell commented 10 years ago

Are you sure you're on the minimum-stability: stable? Or are you on dev?

taylorotwell commented 10 years ago

Fixed btw on dev stability. Composer update in a few minutes after things update.

voydz commented 10 years ago

i was on dev stability, but thank you very much!