edvinaskrucas / notification

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

Fixed breaking issue with non-file-based Session drivers #26

Closed mikedfunk closed 10 years ago

mikedfunk commented 10 years ago

In Laravel, Session has a SessionManager. This class has a __call() method to send all it's function calls through its driver: Store.

In the current code, $app['session.store'] is being used in the service provider. When we switched the session driver to memcached, $app['session.store'] wasn't loading all of the services it needed to use the session. We got an Exception.

When we switched this to $app['session'] and switched the type hint in Subscriber.php, everything worked fine. This is because $app['session'] uses the SessionManager instead of it's driver: Store.

We haven't tested this in Laravel 4.0 but it does resolve this issue in 4.1.

felipepodesta commented 10 years ago

+1