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: general/development/policies/deprecation/index.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ In an open source project, the end use of the codebase varies. People may have c
22
22
- Deprecations apply to all public APIs, classes, and files.
23
23
- 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
24
24
- All deprecations should emit debugging notices where possible
25
-
- All deprecations should be noted in the relevant upgrade.txt
25
+
- All deprecations should be noted with an [upgrade note](../../upgradenotes.md).
26
26
27
27
## Moodle Core deprecation process
28
28
@@ -86,7 +86,7 @@ If the current version is 3.1.2, the function will be marked as deprecated in 3.
86
86
:::
87
87
88
88
- Check the body of the function being deprecated and look for additional function calls which have no other non-deprecated uses and may also be considered for deprecation. If they belong to the same code area they can be deprecated in the same issue.
89
-
- Last but not least, every deprecation should be documented in the corresponding `upgrade.txt` files**at least** once but, **ideally**, both on this initial/immediate deprecation and also on the final deprecation/removal.
89
+
- Last but not least, every deprecation should be documented in an [upgrade note](../../upgradenotes.md)**at least** once but, **ideally**, both on this initial/immediate deprecation and also on the final deprecation/removal.
90
90
91
91
Apart from the previous points, there are a few more optional but highly recommended steps:
92
92
@@ -148,7 +148,7 @@ public function foobar(): void {
148
148
- Deprecated classes must be completely removed.
149
149
- The content of the PHPDoc should be removed, leaving only the `@deprecated` tag with the notice and, optionally, the replacement information. This includes all `@param`, `@return`, and other tags, as well as the description.
150
150
- External functions deprecation process is different from the standard deprecation and functions should be completely removed.
151
-
- Last but not least, every deprecation should be documented in the corresponding `upgrade.txt` files**at least** once but, **ideally**, both on the initial/immediate deprecation and also on this final deprecation/removal.
151
+
- Last but not least, every deprecation should be documented in an [upgrade note](../../upgradenotes.md)**at least** once but, **ideally**, both on the initial/immediate deprecation and also on this final deprecation/removal.
152
152
153
153
## Parameters deprecation
154
154
@@ -167,7 +167,7 @@ It is strongly advised to deprecate an entire method, rather than deprecating a
167
167
- Update all calls to the affected function and either:
168
168
- converting to use named parameters, removing the deprecated parameter; or
169
169
- removing if at the end of a list of optional parameters.
170
-
- Add a mention to the corresponding `upgrade.txt` file, documenting that the deprecated parameter should not be used any more
170
+
- Add an [upgrade note](../../upgradenotes.md), documenting that the deprecated parameter should not be used any more
171
171
- Add a mention to the [Developer Update notes](https://github.com/moodle/devdocs/blob/main/docs/devupdate.md), documenting that the deprecated parameter should not be used any more
172
172
-_Where possible_:
173
173
- If a type was previously specified it should be altered to be made nullable
0 commit comments