amitaibu / og

A fork to work on OG8
https://github.com/Gizra/og
29 stars 16 forks source link

Convert OgAccess into a service #226

Closed pfrenssen closed 8 years ago

pfrenssen commented 8 years ago

Currently OgAccess consists of a collection of static methods. When we initially started the D8 port it made sense to use static methods so we could iterate rapidly, but currently this is starting to impede progress.

This PR converts OgAccess into a proper service that uses the dependency injection container for its dependencies, so it can be properly mocked in unit tests.

pfrenssen commented 8 years ago

Hopefully this is a bit clearer. The cacheability stuff is one of the hardest parts in Drupal 8 for me.

amitaibu commented 8 years ago

Thanks.