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
Copy file name to clipboardExpand all lines: developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_32.rst
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,24 @@ Removed APIs
33
33
Back-end changes
34
34
----------------
35
35
36
+
- OCP API split into consumable and implementable:
37
+
For a more informed background see `RFC: Split OCP into Consumable and Implementable <https://github.com/nextcloud/standards/issues/15>`_ for more information.
38
+
Short summary:
39
+
40
+
- **Consumable:** Interfaces, Enums and classes that have the ``OCP\AppFramework\Attribute\Consumable`` attribute, must only be consumed by apps and can not be implemented by apps themselves.
41
+
This means the server side can extend the interface with new methods or reduce returned types of existing methods without it being consider an API break.
42
+
However argument types of existing methods can **not** be reduced.
43
+
Same rules apply to ``OCP\EventsDispatcher\Event`` that have the ``OCP\AppFramework\Attribute\Listenable`` attribute and ``Exception`` with the ``OCP\AppFramework\Attribute\Catchable`` attribute.
44
+
- **Implementable:** Interfaces, Enums and classes that have the ``OCP\AppFramework\Attribute\Implementable`` attribute, can be implemented by apps.
45
+
This means the server side can **not** extend the interface with new methods or reduce returned types of existing methods without it being consider an API break.
46
+
However argument types of existing methods can be reduced.
47
+
Same rules apply to ``OCP\EventsDispatcher\Event`` that have the ``OCP\AppFramework\Attribute\Dispatchable`` attribute and ``Exception`` with the ``OCP\AppFramework\Attribute\Throwable`` attribute.
48
+
- **ExceptionalImplementable:** Despite not being implementable for all apps, some interfaces can have the ``OCP\AppFramework\Attribute\ExceptionalImplementable`` attribute indicating that they are implementable by a single app (or multiple).
49
+
In those cases the general ``OCP\AppFramework\Attribute\Consumable`` rules apply, but the app maintainers or repository of named exceptions have to be informed during the PR process leaving them enough time to align with the upcoming change.
50
+
51
+
- These new attributes will be applied on a "defacto standard" basis to the best of our knowledge.
52
+
In case an API was flagged unexpectingly, leave a comment on the respective PullRequest in the server repository asking for clarification.
0 commit comments