Skip to content

[docs] Further clarify final deprecation procedure #1373

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ziegenberg
Copy link
Contributor

If the method or function has a typed return, it needs to return accordingly, otherwise no return is required.

See this comment for reference.

@Copilot Copilot AI review requested due to automatic review settings June 12, 2025 11:55
Copy link

netlify bot commented Jun 12, 2025

Deploy Preview for moodledevdocs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 9d62f15
🔍 Latest deploy log https://app.netlify.com/projects/moodledevdocs/deploys/684ac03cba21ca0008e36616
😎 Deploy Preview https://deploy-preview-1373--moodledevdocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Clarify the final deprecation procedure by updating the documentation to specify how to direct developers to replacements and handle typed returns.

  • Add conditional guidance on including replacement references in error messages.
  • Specify return statement requirements for functions with typed returns.
Comments suppressed due to low confidence (2)

general/development/policies/deprecation/index.md:139

  • [nitpick] This sentence is a bit long and the conditional clause could be clearer; consider rephrasing to: "If the deprecated function has a replacement, update the error message to direct developers to the new function(s)."
When a function undergoes final deprecation, all content of the function should be removed. In the skeleton that remains, an error statement should be included that indicates that the function cannot be used anymore. You should also direct developers to the new function(s) in this message, if the deprecated function has been replaced with a new function.

general/development/policies/deprecation/index.md:178

  • [nitpick] The phrase "return accordingly" is vague; consider explicitly stating: "If the signature declares a return type, include a return statement compatible with that type; otherwise omit the return statement."
If the method or function has a typed return, it needs to return accordingly, otherwise no return is required.

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.

1 participant