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

Remove curly brace syntax for accessing array elements and string offsets

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 3.8, 3.9
    • Fix Version/s: 3.8
    • Component/s: General
    • Labels:

      Description

      Reference: https://wiki.php.net/rfc/deprecate_curly_braces_array_access

      All accesses to array elements and string offsets now show a deprecation message:

      PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in ...

      This issue is about to remove all them, because they will stop working on php 8.0

      Note that there is a script aiming to find uses (and fix them). It can be used for verifications, but surely worth checking all changes, spreading them to 3rd party libs when possible:

      https://gist.github.com/theodorejb/763b83a43522b0fc1755a537663b1863

        Attachments

          Activity

            People

            Assignee:
            stronk7 Eloy Lafuente (stronk7)
            Reporter:
            stronk7 Eloy Lafuente (stronk7)
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              18/Nov/19

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 5 hours, 24 minutes
                2d 5h 24m