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

PHP 8.3: Deprecate functions with overloaded signatures

XMLWordPrintable

    • MOODLE_402_STABLE, MOODLE_403_STABLE, MOODLE_404_STABLE
    • MOODLE_402_STABLE, MOODLE_403_STABLE
    • MDL-79890-403
    • MDL-79890-master
    • Hide
      1. Navigate to a course -> More -> Question bank
      2. Create a new question... -> Drag and drop into text:
        1. Name: test
        2. Question text: To [[1]] or not to [[1]]
        3. Choice [[1]]: be
        4. Choice [[2]]: moodle
      3. Leave everything else as-is and Save changes
        1. Verify expected form validation message "Choice [[1]] has been used more than once without being set to "Unlimited". Please recheck this question."
      Show
      Navigate to a course -> More -> Question bank Create a new question... -> Drag and drop into text: Name: test Question text: To [ [1] ] or not to [ [1] ] Choice [ [1] ]: be Choice [ [2] ]: moodle Leave everything else as-is and Save changes Verify expected form validation message "Choice [ [1] ] has been used more than once without being set to "Unlimited". Please recheck this question."

      This is probably the biggest barrier for PHP 8.3 support. I believe only one other issue actually requires any changes.

      https://php.watch/rfcs/deprecate_functions_with_overloaded_signatures
      https://wiki.php.net/rfc/deprecate_functions_with_overloaded_signatures

      Methods to look for:

      1. dba_fetch
        • not in use in core
      2. FFI::cast(), FFI::new(), FFI::type()
        • not in use in core
      3. get_class() and get_parent_class() without arguments
        • Used in a handful of places in user tours
        • Google\Http\Rest (lib/google/src/Google/Http/REST.php
      4. Phar::setStub
        • not in use in core
      5. ReflectionProperty::setValue() when called statically and not passing null as the first arg
        • Used in core, widely, but hard to detect as other methods are also called setValue (e.g. in quickforms). Approximately 460 calls to setValue() in core, but many are false positives, or not related. Need to check

      This issue requires going through each of the deprecations in the RFC to confirm that all are addressed.
      Please use one commit per RFC change where relevant
      Please comment to confirm my findings where they are not used.

            dobedobedoh Andrew Lyons
            dobedobedoh Andrew Lyons
            Stevani Andolo Stevani Andolo
            Ilya Tregubov Ilya Tregubov
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            19 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 2 hours, 16 minutes
                1d 2h 16m

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