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

Deprecation policy does not detail what to do with deprecated classes for final deprecation

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Medium
    • Resolution: Done
    • Coding style
    • None

    Description

       

      Policy summary

      For the initial deprecation of a class:

      • Add @deprecated tag on class level PHPDoc block
      • Add @deprecated tag on the PHPDoc block of all public methods
      • Add debugging on all of the public methods

      And for the final deprecation of a class, it must be completely removed.

       

      The Deprecation policy (https://docs.moodle.org/dev/Deprecation#Step_1._Immediate_action) is very outdated and it does not state what to do with a class which has been finally deprecated.

      The options are really:

      1. remove them
      2. make them throw an exception but keep them around
      3. something else I haven't thought of

      I'd prefer the first option of removing them, but we should probably stay in keeping with the global function section of the Deprecation policy which states that a function should throw an Exception.

      Attachments

        Issue Links

          Activity

            People

              sarjona Sara Arjona (@sarjona)
              dobedobedoh Andrew Lyons
              Marina Glancy, Eloy Lafuente (stronk7)
              Votes:
              1 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: