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

Does the `component` property of `\core\plugininfo\base` really have to be read-only?

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 4.4.9, 4.5.5, 5.0.1
    • 4.3, 4.4, 4.5
    • PHPDoc

      This is a very minor issue and I apologize in advance for taking up precious dev time, but I cannot figure out, why this was declared this way.

      In the \core\plugininfo\base there is a PHPDoc annotating @property-read string component and I don't understand the reason for this. Especially since further down the property is declared again normally as public $component = ''; and literally every plugin is required to set this property in the version.php.

      The reason this even came up as an issue for me is that PHPStorm rightfully complains in every single version.php file whenever it sees $plugin->component = "something"; that it is read-only. If there is a reason for this declaration in the base class, I would appreciate an explanation. If not, could we just remove this annotation? I could of course provide a tiny merge request for this.

            daniil-berg Daniil Fajnberg
            daniil-berg Daniil Fajnberg
            Andrew Lyons Andrew Lyons
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 8 minutes
                8m

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