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

Remove curly brace syntax for accessing array elements and string offsets

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Done
    • 3.8, 3.9
    • 3.8
    • General

    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

            stronk7 Eloy Lafuente (stronk7)
            stronk7 Eloy Lafuente (stronk7)
            Adrian Greeve, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              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