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

mod/assign base_test. Please do not make base classes final

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a bug
    • Icon: Minor Minor
    • None
    • 5.0
    • Assignment
    • None
    • MOODLE_500_STABLE

      Moodle is designed to work with other open source plugins. Many of these plugins will extend moodle core classes.

      This has broken php unit tests in the Snap theme because it utilises a class which extends mod_assign\base_test

      1) A class that is named "base_" implies that it is something that *should be extended.

      2) There's no benefit to making classes final in open-source projects. It will just prevent third-party developers from being able to fully exploit the benefits of core code. To fix the issue with the Snap theme (I'm not a maintainer, BTW) I would have to create a copy of all that core code to get the PHP unit tests to pass.

      Please, let's keep core code as reusable as possible unless there are some definite reasons for needing to use the final class. Personally I can't think of any in an open source project.

            Unassigned Unassigned
            brudinie guy thomas
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.