Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-43365

Create a better method of renaming a class for autloading

    XMLWordPrintable

Details

    Description

      At present we have a bit of a conundrum when renaming a class so that it is autoloaded.
      We need to keep the original class but mark it deprecated and make it extend the new class.
      This is problematic in some cases as making it extend the new class removes the immediate benefit of autoloading the class.
      It also leads to us having more classes than we require loaded in PHP mem.

      Autoloading itself is great, it allows us to remove requires that may not always be needed and we can do away with class exists and custom class loading code we've got .

      It should be possible to come up with a simple register and class alias method of handling the renaming.

      Attachments

        Issue Links

          Activity

            People

              samhemelryk Sam Hemelryk
              samhemelryk Sam Hemelryk
              Ankit Agarwal Ankit Agarwal
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
              Votes:
              5 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                10/Nov/14