Skip to content

[docs] Clarify external funcions deprecation process - #1731

Merged
junpataleta merged 1 commit into
moodle:mainfrom
sarjona:externaldeprecation
Oct 21, 2026
Merged

junpataleta merged 1 commit into
moodle:mainfrom
sarjona:externaldeprecation

Conversation

@sarjona

@sarjona sarjona commented Oct 21, 2026

Copy link
Copy Markdown
Member

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.

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>
Copilot AI balanced review requested due to automatic review settings October 21, 2026 11:21
@netlify

netlify Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for moodledevdocs ready!

Name Link
🔨 Latest commit 6e6979f
🔍 Latest deploy log https://app.netlify.com/projects/moodledevdocs/deploys/6ad8a024359c44282fbbd0a2
😎 Deploy Preview https://deploy-preview-1731--moodledevdocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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 @deprecated PHPDoc.
  • 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 junpataleta left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks pretty straightforward. This is good to go!

@junpataleta
junpataleta added this pull request to the merge queue Oct 21, 2026
Merged via the queue into moodle:main with commit 9c0da43 Oct 21, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants