- 🇩🇪Germany Anybody Porta Westfalica
I think #4 is the better solution.
TranslationInterface has no
getStorage()
method, so IMHO the patch is wrong.
The constructor of the Permissions class currently requires the second parameter to be an instance of a TranslationManager class. However, in general, you should aim to program against an interface and not a concrete class (i.e not violating the dependency inversion principle). Because of this, possible other implementations of a TranslationManager (added by other modules) will cause this to fail.
In stead of type hinting the concrete class used, we should use an interface as type-hint (following the dependency inversion principle). In this case that would be the TranslationInterface.
- Review patch
None
See proposed resolution. This should not break existing implementations, as they all will comply to the TranslationInterface. However, this will allow other implementations of the TranslationInterface to be used as well.
See proposed resolution. This should not break existing implementations.
Needs work
2.0
Miscellaneous
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
I think #4 is the better solution.
TranslationInterface has no getStorage()
method, so IMHO the patch is wrong.