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

Perform a complete PHPCompatibility 8.0 execution against codebase

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major Major
    • 3.11.6
    • 3.11.5, 4.0
    • General
    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MOODLE_311_STABLE
    • Hide

      Unit tests are enough (for wiki and phpunit bootstrap changes.

      The mustache change is a copy from upstream... so expected to work. If all tests pass ok with php73 and php80 (@ CI), it should mean it's ok too.

      Hence, automated testing, 100%.

      Show
      Unit tests are enough (for wiki and phpunit bootstrap changes. The mustache change is a copy from upstream... so expected to work. If all tests pass ok with php73 and php80 (@ CI), it should mean it's ok too. Hence, automated testing, 100%.

      This task is one of the final ones to perform when everything else in the epic has been already applied.

      It's about to run the PHPCompatibility standard (that we usually also run as part of our local_codechecker) against the whole codebase.

      Prerequisites:

      1. The epic must be almost finished (to avoid detecting problems that correspond to other issues).
      2. PHPCompatibility must support the php versions being checked.
      3. Determine the range of PHP versions supported for the branch (7.3-8.0)

      To perform the run against master, just:

      1. Clone https://github.com/PHPCompatibility/PHPCompatibility locally.
      2. Ensure you're in the "develop" branch (the "master" branch contains the latest release, quite old now 2019).
      3. run composer install
      4. Run:

        export DIRROOT=/path/to/your/moodle ; vendor/bin/phpcs \
            --standard=PHPCompatibility \
            --runtime-set testVersion 7.3-8.0 \
            --extensions=php \
            --ignore=$DIRROOT/vendor/,$DIRROOT/local/ \
            --cache=/tmp/cache -p $DIRROOT
        

      5. Look for detected stuff, discard false positives (it can be useful to look to the results of previous PHP XY Epic - ) to copy any decision there.

        1. phpcompatibility_final.rtf
          82 kB
          Eloy Lafuente (stronk7)
        2. phpcompatibility_preliminary.rtf
          75 kB
          Eloy Lafuente (stronk7)

            stronk7 Eloy Lafuente (stronk7)
            stronk7 Eloy Lafuente (stronk7)
            Carlos Escobedo Carlos Escobedo
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours, 20 minutes
                5h 20m

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