XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. run the following command (requires ag, although advanced grep versions should be able to run it, after all, it's just a regular expression:
        N.b. If you have ack, you should be able to replace ag with ack in the command below. (sudo apt-get install ack)

        $ ag '(\$[0-9a-zA-Z_]+|\))(\[['\''"\w$]+\])?{[^\n=}]+}'  repository/s3 --php
        

      2. Verify that you get ZERO matches, that means that there aren't remaining cases.
      3. Using moodle-docker (or any >= PHP7.4 RC4 installation) install phpunit (init.php).
      4. Verify that there isn't any PHP notice/warning related with repository/s3 stuff. (Be warned that there may be lots of notices/warnings/errors, here we are only interested in the repository/s3 ones).
      5. Run phpunit (with that PHP7.4 version).
      6. Verify that there isn't any PHP notice/warning related with repository/s3. (Be warned that there are lots of notices/warning/errors and failures, here we are only interested in the repository/s3 ones
      7. Verify that travis is passing for php71 and php73 (specifically repository ones).
      Show
      run the following command (requires ag , although advanced grep versions should be able to run it, after all, it's just a regular expression: N.b. If you have ack, you should be able to replace ag with ack in the command below. (sudo apt-get install ack) $ ag '(\$[0-9a-zA-Z_]+|\))(\[['\''"\w$]+\])?{[^\n=}]+}' repository/s3 --php Verify that you get ZERO matches, that means that there aren't remaining cases. Using moodle-docker (or any >= PHP7.4 RC4 installation) install phpunit (init.php). Verify that there isn't any PHP notice/warning related with repository/s3 stuff. (Be warned that there may be lots of notices/warnings/errors, here we are only interested in the repository/s3 ones). Run phpunit (with that PHP7.4 version). Verify that there isn't any PHP notice/warning related with repository/s3. (Be warned that there are lots of notices/warning/errors and failures, here we are only interested in the repository/s3 ones Verify that travis is passing for php71 and php73 (specifically repository ones).
    • Affected Branches:
      MOODLE_38_STABLE, MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_38_STABLE
    • Pull Master Branch:

      Description

      We are currently using the S3 php class v0.5.1 from 2015. It doesn't seem to be really maintained at all:

      Also, for the purposes of php74 compliance, there is an incorrect use of curly braces in it:

      ag '(\$[0-9a-zA-Z_]+|\))(\[['\''"\w$]+\])?{[^\n=}]+}' repository/s3 --php
       
      repository/s3/S3.php:2357:	$this->response->headers['hash'] = $value{0} == '"' ? substr($value, 1, -1) : $value;
      

      So this issue is about:
      1) fix the use above to be php74 compliant, documenting it in readme.
      2) create a new issue because it's really, really, old stuff and we should look for replacement.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stronk7 Eloy Lafuente (stronk7)
                Reporter:
                stronk7 Eloy Lafuente (stronk7)
                Peer reviewer:
                Mathew May
                Integrator:
                Jake Dallimore
                Tester:
                Gladys Basiana
                Participants:
                Component watchers:
                Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/Jan/20

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 25 minutes
                  1h 25m