Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[docs] Error in version.php

Aperta
#787 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
50/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
php
Ambito
documentation

Direzione di ricerca

Apri la sezione «supported-versions» all’indirizzo https://moodledev.io/docs/apis/commonfiles/version.php#supported-versions e individua la relativa origine nel repository devdocs. Aggiorna la spiegazione e gli esempi per indicare che $plugin->supported deve contenere esattamente due valori e chiarisci il comportamento quando ne contiene uno o più di due.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug documentation help wanted needs-triage
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.

Lingua principale
TypeScript
Stelle
74
Fork
652
Merge medio
2g 50m
PR unite (30g)
12

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di moodle/devdocs

Tutte le issue di moodle/devdocs

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.