IServerContainer interface should extend IContainer#32502
Conversation
…ssentially an extended icontainer
|
@PVince81 - don't feel comfortable with merging straight away - would love to have input from @butonic and @DeepDiver1975 I am sure there was a initial reasoning why we limited the scope initially |
Codecov Report
@@ Coverage Diff @@
## master #32502 +/- ##
=========================================
Coverage 64.11% 64.11%
Complexity 18641 18641
=========================================
Files 1176 1176
Lines 70185 70185
Branches 1270 1270
=========================================
Hits 45002 45002
Misses 24813 24813
Partials 370 370
Continue to review full report at Codecov.
|
|
Seems they were both added in #4459 but somehow not linked together. My impression is that if might have been forgotten... This was the time where the app framework was still living in a separate app and that PR is when the app framework code got merged into core. |
Description
While bumping phan to the 1.0.x branch - several issues have been caught.
Amongst is the fact, that our Applications have access to the ServerContainer via a
IAppContainercore/lib/public/AppFramework/IAppContainer.php
Line 54 in 2de709e
This method returns a
IServerContainer- which has specific services defined - but not generalquerymethod.Some applications, then proceed to use
queryon the object they have received - which during RunTime is https://github.com/owncloud/core/blob/bc84acd48053b314100f101c975100bc220adc9a/lib/private/Server.phpBut this is not correct - the interface doesn't provide the method and we are relying on the implementation here.
I propose to state, that
IServerContainerinfact extendsIContainerso we are conform with allowingquerymethods.Alternative - be strict about and rewrite the apps that rely on this implementation detail to use only allowed methods from the interface
Related Issue
Fixes the issues found by phan:
Motivation and Context
Solve technical debt, prevent future bugs
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
Open tasks: