Skip to content

MDLSITE-2261 add more details to plugin common files#1541

Open
ferranrecio wants to merge 2 commits intomoodle:mainfrom
ferranrecio:MDLSITE-2261-main
Open

MDLSITE-2261 add more details to plugin common files#1541
ferranrecio wants to merge 2 commits intomoodle:mainfrom
ferranrecio:MDLSITE-2261-main

Conversation

@ferranrecio
Copy link
Collaborator

[docs] add notes to common files

Copilot AI review requested due to automatic review settings March 18, 2026 18:50
@netlify
Copy link

netlify bot commented Mar 18, 2026

Deploy Preview for moodledevdocs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 9b8cf3b
🔍 Latest deploy log https://app.netlify.com/projects/moodledevdocs/deploys/69c25962dbd7ed0008736796
😎 Deploy Preview https://deploy-preview-1541--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
Contributor

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

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 keeping db/* files side-effect free (no require_once / file inclusions).
  • Adds a caution that version.php must not include other files.
  • Adds guidance that settings.php must not run DB queries at include time and should avoid require_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.

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.

2 participants