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

Overriding methods must declare compatible return type in PHP8.1

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 4.1
    • 3.11.4
    • Other

          Most non-final internal methods now require overriding methods to declare a
          compatible return type, otherwise a deprecated notice is emitted during
          inheritance validation.
          In case the return type cannot be declared for an overriding method due to
          PHP cross-version compatibility concerns, a `#[ReturnTypeWillChange]`
          attribute can be added to silence the deprecation notice.
      

      RFC: https://wiki.php.net/rfc/internal_method_return_types

      Violations in Moodle - all classes implementing ArrayIterator, Countable, etc

            marina Marina Glancy
            marina Marina Glancy
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Jake Dallimore Jake Dallimore
            CiBoT CiBoT
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 55 minutes
                4h 55m

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