MDLSITE-2261 add more details to plugin common files#1541
Open
ferranrecio wants to merge 2 commits intomoodle:mainfrom
Open
MDLSITE-2261 add more details to plugin common files#1541ferranrecio wants to merge 2 commits intomoodle:mainfrom
ferranrecio wants to merge 2 commits intomoodle:mainfrom
Conversation
✅ Deploy Preview for moodledevdocs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds additional guidance to the “common plugin files” documentation, focusing on avoiding side-effects in frequently parsed plugin definition files.
Changes:
- Adds a new
db/section and caution about keepingdb/*files side-effect free (norequire_once/ file inclusions). - Adds a caution that
version.phpmust not include other files. - Adds guidance that
settings.phpmust not run DB queries at include time and should avoidrequire_once, plus a similar caution for language files.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| docs/apis/commonfiles/index.mdx | Adds db/ directory overview and a caution about avoiding file inclusions in db/* files. |
| docs/apis/_files/version-php.mdx | Adds a caution about keeping version.php as a side-effect-free data file. |
| docs/apis/_files/settings-php.mdx | Adds a caution about avoiding DB queries and require_once at include time in settings.php. |
| docs/apis/_files/lang.md | Adds a caution about keeping language files side-effect-free (no file inclusions). |
You can also share your feedback on Copilot code review. Take the survey.
82c6234 to
9b8cf3b
Compare
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.
[docs] add notes to common files