Skip to content

Commit f643474

Browse files
authored
Merge pull request #1313 from andrewnicols/clarifyPublicDeprecation
[docs] Clarify meaning of public for deprecation policies
2 parents 9f91fb7 + b6cc907 commit f643474

File tree

1 file changed

+12
-1
lines changed
  • general/development/policies/deprecation

1 file changed

+12
-1
lines changed

general/development/policies/deprecation/index.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,23 @@ In an open source project, the end use of the codebase varies. People may have c
1818

1919
## What is Moodle's deprecation policy?
2020

21-
- Deprecations should only be on main, not on stables (exceptions may be made for some external service integrations)
21+
- Deprecations should only be on the `main` branch, not on stables (exceptions may be made for some external service integrations)
2222
- Deprecations apply to all public APIs, classes, and files.
2323
- Removal of a function, class, or file may only be considered after a minimum of 4 major releases since the deprecation. Example: anything deprecated in 3.2 means that it will be removed in 3.6
2424
- All deprecations should emit debugging notices where possible
2525
- All deprecations should be noted with an [upgrade note](../../upgradenotes.md).
2626

27+
:::danger What does it mean for an API to be considered "Public"
28+
29+
When we talk about Public APIs in Moodle, we are not referring to the `public` keyword in the method definition.
30+
31+
Instead we are considering how that API feature is used. Is that API feature intended to be, or is there a reasonable expectation that it may be, consumed in some reasonable way including:
32+
33+
- being called or accessed externally; or
34+
- being overridden in a class OOP sense.
35+
36+
:::
37+
2738
## Moodle Core deprecation process
2839

2940
Once it is decided that a function should be deprecated, a two-step process should be followed.

0 commit comments

Comments
 (0)