Skip to content

Commit 633d170

Browse files
Merge pull request #12329 from nextcloud/feat/48891/nct-namespace
NCU unstable namespace
2 parents 2a5c2f9 + 7f1ed36 commit 633d170

File tree

1 file changed

+21
-0
lines changed
  • developer_manual/digging_deeper

1 file changed

+21
-0
lines changed

developer_manual/digging_deeper/api.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,24 @@ PHP public API
77

88
The public API is contained in the OCP namespace. See the `OCP API reference
99
<https://nextcloud-server.netlify.app/>`_ for further details.
10+
11+
12+
PHP unstable API
13+
----------------
14+
15+
To avoid releasing incomplete public API, it is possible to release a
16+
first version of the future API in the `NCU` namespace, following these rules:
17+
18+
- Files are located in ``/lib/unstable/``
19+
- Code quality, comments, tests and psalm check are expected to be identical to the `OCP` namespace.
20+
- Classes must be tag as ``@experimental``, including the current version of Nextcloud.
21+
- Code from the `OCP` namespace must never mention anything coming from the `NCU` namespace. It can not require it as an argument, constant or return something from `NCU`.
22+
- An API can only live in this unstable namespace for one major release.
23+
- During this testing phase, the code and the API can be modified/restructured without limitation.
24+
- API within the testing namespace must have up-to-date documentation.
25+
- If accepted, the API will be copied to the `OCP` public namespace.
26+
- Once tested, the version from the `NCU` namespace will be marked as deprecated.
27+
- Deprecated API from the `NCU` namespace are kept for 2 major releases.
28+
29+
.. note::
30+
- API from `NCU` are included to the ``nextcloud-deps/OCP`` package for easier testing with psalm

0 commit comments

Comments
 (0)