Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NCT testing namespace #12329

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions developer_manual/digging_deeper/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,23 @@ PHP public API

The public API is contained in the OCP namespace. See the `OCP API reference
<https://nextcloud-server.netlify.app/>`_ for further details.


PHP testing API
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds like this is about API for testing not API that is in testing state.
Maybe "Unstable PHP API"? As "unstable" is a more common term for this kind of API in general?

(At least for me "testing" is more like we provide our \Test namespace)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was wondering similarly, also for the lib/testing/ folder in Server. Other options could be Experimental or Preview (colliding with previews/thumbnails)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally agree on those points, but from previous vocal discussions:

  • testing is above unstable (at least from debian's point of view)
  • 'Experimental' would means NCE to be the name of the namespace, which is an already used acronym,
  • 'Preview' would also conflict,
  • 'devel' can be confusing too, as it can be interpreted as API for development ...

unstable might the only valid term that does not conflict that much and also reflect the 'unstable'/'prone to changes'

---------------

To avoid releasing incomplete public API, it is possible to release a
testing version of the future API in the `NCT` namespace, following these rules:

- Code quality, comments, tests and psalm check are expected to be identical to the `OCP` namespace.
- Classes must be tag as `@experimental`, including the current version of Nextcloud.
- Code from the `OCP` namespace must never mention anything coming from the `NCT` namespace. It can not require it as an argument, constant or return something from `NCT`.
- An API can only live in this testing namespace for one major release.
- During this testing phase, the code and the API can be modified/restructured without limitation.
- API within the testing namespace must have up-to-date documentation.
- If accepted, the API will be copied to the `OCP` public namespace.
- Once tested, the version from the `NCT` namespace will be marked as deprecated.
- Deprecated API from the `NCT` namespace are kept for 2 major releases.

.. note::
- API from `NCT` are included to the `nextcloud-deps/OCP` package for easier testing with psalm