[docs] Error in version.php
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 74
- Forks
- 652
- Avg merge
- 2d 50m
- Merged PRs (30d)
- 12
Description
What is the URL of the page?
https://moodledev.io/docs/apis/commonfiles/version.php#supported-versions
What is the issue with this page?
The docs stated, that the property for $plugin->supported should be integer[] and
A set of branch numbers to specify the lowest and highest branches of Moodle that the plugin supports. These value are inclusive.
But it does not state that there has to be exactly two values. If you provide 3 or more values, only the first 2 values (or more correctly: only values with the keys 0 and 1) will taken into account. One could think that you can also provide a list of all supported versions:
$plugin->supported = [
// Support from the Moodle 3.11 series.
311,
401,
402,
// To the Moodle 4.3 series.
403,
];
If one provides only one value Moodle will fail with an error while installation of the plugin.
$plugin->supported = [
// Support only the Moodle 4.3 series.
403,
];
Are you able to provide a patch for this?
Yes - I will create one if requested.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open the supported-versions section at https://moodledev.io/docs/apis/commonfiles/version.php#supported-versions and locate its source in the devdocs repository. Update the explanation and examples to state that $plugin->supported must contain exactly two values, and clarify the behavior for one or more than two values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100