You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have various interfaces where it is clear that apps are meant to implement them: - OCP\Notification\IApp
OCP\Notification\INotifier
We have various interfaces where it is clear that apps can consume them, but it is not intended to get implemented by an app itself:
OCP\Notification\IManager
OCP\Notification\INotification (should only be created with OCP\Notification\IManager::createNotification())
From my POV it would be good to distingiush them in a way, as they come with different implications.
OCP\Notification\IManager is only meant to be consumsed, so we can add new methods and it could be considered non breaking as the only implementation is meant to be the one in OC\Notification\Manager. We can add return types and nothing explodes
For OCP\Notification\IApp it's the opposite, basically extending it will break all existing implementations. Similar to OCP\Dashboard\IWidget back then, new functionality needs to be brought in with a second interface IAPIWidgetV2, etc.
Should make it clear that things like Guests app RestrictionManager which replaces OCP\INavigationManager and OCP\Settings\IManager are not a good idea because both should be "Consumable"-only
Optional Part2:
To help with the last "Why" we could also allow apps to mark themselves as an exception to such a restriction, which means we "allow it when we are aware" and API can be extended when either adjusting the exception or clarifying a way with the maintainer of the exception how it can be "non-breaking" in the update experience.
What?
OCP\Notification\IAppOCP\Notification\INotifierOCP\Notification\IManagerOCP\Notification\INotification(should only be created withOCP\Notification\IManager::createNotification())From my POV it would be good to distingiush them in a way, as they come with different implications.
OCP\Notification\IManageris only meant to be consumsed, so we can add new methods and it could be considered non breaking as the only implementation is meant to be the one inOC\Notification\Manager. We can add return types and nothing explodesOCP\Notification\IAppit's the opposite, basically extending it will break all existing implementations. Similar toOCP\Dashboard\IWidgetback then, new functionality needs to be brought in with a second interfaceIAPIWidgetV2, etc.Something along the lines:
OCP\AppFramework\Consumable(since: MajorMinorServer, ?removal: MajorMinorServer)OCP\AppFramework\Implementable(since: MajorMinorServer, ?removal: MajorMinorServer)Why?
Optional Part2:
To help with the last "Why" we could also allow apps to mark themselves as an exception to such a restriction, which means we "allow it when we are aware" and API can be extended when either adjusting the exception or clarifying a way with the maintainer of the exception how it can be "non-breaking" in the update experience.
Sample: