-
Notifications
You must be signed in to change notification settings - Fork 16
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
Convert Og to a proper service that extends OgInterface #290
Comments
@pfrenssen sounds right to you? ^^ |
Started work on #291 |
I am VERY much in favour of this idea! For me the most important aspect of this is also to move away from the static methods, and relying fully on dependency injection so that our unit tests will be properly able to mock the methods. It will be a big task though. We might need to split this in smaller PRs.
For me this is a very good approach. It is easy to use from the procedural side. Another possibility is to keep
To call the code from the procedural side it would remain the same as it is now (and identical to how it is done in
The advantage of this is that we will be able to move the logic into separate services, which each are responsible for their own domain (i.e. their own entity type). We already have In my mind there is not really For some guidance on how to approach this conversion: we have converted other classes containing mainly static methods to services before. An example is #226. |
I like your suggestion better! - Keeping Og a static class wrapping other services, will also allow us to take it in smaller steps. So, I could start with a |
This one is mostly coming from my wish not to do so much mocking in the unit tests when calling for example
Og::IsMember()
If we could have a prophecy of
OgInterface
, it will be much simpler, and remove some ugly parts from the tests.To still provide a quick access to regular OG functions we could have
The text was updated successfully, but these errors were encountered: