Uploaded image for project: 'Moodle Community Sites'
  1. Moodle Community Sites
  2. MDLSITE-5967

Stop requiring MOODLE_INTERNAL for files without side-effects

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Done
    • Component/s: Coding style
    • Labels:

      Description

      Policy: MOODLE_INTERNAL requirement

      Since 13th March 2020, these rules apply:

      1. Remove the warning about missing MOODLE_INTERNAL check in 1-artifact files (that are the future). Single class/interface/trait ones.
      2. Keep the warning from old multi-artifact files and the error to files with side effects.

      We should stop requiring MOODLE_INTERNAL for files which have no side-effects

      Side effects include:

      • requiring other files
      • defining functions outside of classes
      • etc.

      Side effects do not include:

      • defining classes, interfaces, or traits
      • using the use stanza to alias a classname

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sarjona Sara Arjona (@sarjona)
              Reporter:
              dobedobedoh Andrew Nicols
              Participants:
              Component watchers:
              Marina Glancy, Eloy Lafuente (stronk7)
              Votes:
              2 Vote for this issue
              Watchers:
              13 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: