Repository navigation
[docs] Clarify external funcions deprecation process - #1731
Merged
Merged
Conversation
The deprecation policy and the writing a service page gave confusing guidance for external functions, which led to some web services being deprecated wrongly with \core\attribute\deprecated. - Document in writing-a-service that both FUNCTIONNAME_is_deprecated() and the @deprecated PHPDoc tag (class level when possible, otherwise on each method) are required, and that the deprecation attribute and emit_deprecation() must not be used. - Replace the duplicated guidance in the deprecation policy with a link to writing-a-service. - Apply the same change to the 4.5, 5.0, 5.1 and 5.2 versioned docs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for moodledevdocs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The documentation changes are consistent with the intended clarification, include the targeted backports, and have no unresolved findings.
No open issues 🎉
What changed in this PR
Clarifies Moodle’s external-function deprecation process and centralizes its guidance.
Changes:
- Requires both
FUNCTIONNAME_is_deprecated()and@deprecatedPHPDoc. - Explicitly prohibits deprecation attributes and emission calls for external functions.
- Links the general policy to this guidance and updates all four targeted versioned copies.
| File | Description |
|---|---|
| versioned_docs/version-5.2/apis/subsystems/external/writing-a-service.md | Applies clarification for Moodle 5.2. |
| versioned_docs/version-5.1/apis/subsystems/external/writing-a-service.md | Applies clarification for Moodle 5.1. |
| versioned_docs/version-5.0/apis/subsystems/external/writing-a-service.md | Applies clarification for Moodle 5.0. |
| versioned_docs/version-4.5/apis/subsystems/external/writing-a-service.md | Applies clarification for Moodle 4.5. |
| general/development/policies/deprecation/index.md | Replaces duplicated guidance with a link. |
| docs/apis/subsystems/external/writing-a-service.md | Defines the clarified process and example. |
Review effort: Balanced
junpataleta
approved these changes
Oct 21, 2026
junpataleta
left a comment
Collaborator
There was a problem hiding this comment.
Looks pretty straightforward. This is good to go!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The deprecation policy and the writing a service page gave confusing guidance for external functions, which led to some web services being deprecated wrongly with \core\attribute\deprecated.