edvinaskrucas / notification

Notification package for Laravel
MIT License
526 stars 98 forks source link

Laravel update breaking Collection #33

Closed ghost closed 10 years ago

paulofreitas commented 10 years ago

This 2.1.0 update have broken my (up-to-date) 4.2.7 installation with the following exception:

Symfony\Component\Debug\Exception\FatalErrorException thrown with message "Call to undefined method Krucas\Notification\Collection::contains()"
Stacktrace:
#1 Symfony\Component\Debug\Exception\FatalErrorException in /var/www/lms/vendor/edvinaskrucas/notification/src/Krucas/Notification/Collection.php:39
#0 Illuminate\Exception\Handler:handleShutdown in <#unknown>:0

At my composer.json I'm using ~2.0 version constraint for your package and ~4.2.0 for laravel/framework, which is already updated to 4.2.7.

ghost commented 10 years ago

Can you check your Illuminate\Support\Collection class has the contains method please?

This is included in Laravel 4.2.7 as you can see here, https://github.com/laravel/framework/blob/v4.2.7/src/Illuminate/Support/Collection.php#LC73

Maybe composer hasn't updated the illuminate/support package?

Ran another test with a fresh install and this is still working for me.

I did have a few problems when it was running in workbench packages because by default they require illuminate/support, I resolved that problem by removing the requirement from composer.json within the workbench packages.

Hope that helps

paulofreitas commented 10 years ago

Ahh - yes, you're right! :)

Indeed was a workbench package dependency issue, which prevented my illuminate/support related stuff from updating within laravel/framework update.

I'm realizing now that I always forgot to also run composer update at workbench/ packages. :astonished:

Just ran composer update on my workbench packages and the issue was fixed! :+1:

Thank you for your help! :)

ghost commented 10 years ago

No problem