-
Notifications
You must be signed in to change notification settings - Fork 20
Conversation
From looking at the changes I see no problem, but I'm no expert in DI ;) |
I will have a look as soon as I have some time. |
@Henni is this pull request still work in progress or done from your point of view? |
We just have to find out why the error occurs. Everything else is done. Maybe someone who knows a bit about the internals of dependency injection can help. |
Hey, never checked out this app but saw this issue on IRC. I have solved this error in the commit I made, I hope this isn't a problem? Some general tips on DI and autoloading:
For reference the documentation of ownCloud: https://doc.owncloud.org/server/8.2/developer_manual/app/container.html and of Pimple (the DI injection container oC use): http://pimple.sensiolabs.org/ |
@LEDfan thanks for the help! Can you explain to me why the error message said something about the cachemanager while it was obviously a problem with the location manager? |
I guess this is because the changes I made here: 3497955#diff-a8d3ad1f02ffca9503fa85aff518fc1dR25 . The DI container knows now which class you need and will load it automatically. If you do this you don't need to register the CacheManager service actually. But you have to when you want to inject special things inside the CacheManager. Note that if you won't want to register the services all classes must be type casted. (line 3497955#diff-ae7c5d396a800dcab2fb6f2fc7455d37R19 ) @BernhardPosselt anything to add? (You wrote the code) |
@Henni is the fix working for you? |
@LEDfan Yes the fix is working for me. Again thanks for the help! |
IDb is deprecated, use IDBConnection ;) |
The pull request is now almost complete. I just want to remove the last occurence of the locationmanager. Therefore I still have to figure out how to return arrays of Entities as a JSON Response. |
@BernhardPosselt thanks for the hint. |
I'm back from my holiday and can hopefully review this in the next days |
@DJaeger do you think we can merge this. This would simplify future development. |
I will review this later day. |
LGTM 👍 |
I refactored the database mappers.
This PR replaces the current implementation with entities for devices and locations and their corresponding mappers.