Skip to content
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

[docs] Error in version.php #787

Open
Art4 opened this issue Oct 27, 2023 · 0 comments
Open

[docs] Error in version.php #787

Art4 opened this issue Oct 27, 2023 · 0 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation help wanted Extra attention is needed needs-triage

Comments

@Art4
Copy link

Art4 commented Oct 27, 2023

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.

grafik

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.

@Art4 Art4 added bug Something isn't working documentation Improvements or additions to documentation help wanted Extra attention is needed labels Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation help wanted Extra attention is needed needs-triage
Projects
None yet
Development

No branches or pull requests

1 participant