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

Replace all deprecated @codingStandardsIgnoreXXX for current counterparts

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.11.6
    • 3.11.5, 4.0
    • General
    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MOODLE_311_STABLE
    • Hide
      1. Sanity check, just verifying that there is any case of codingStandardsIgnore in code.
        1. To do so, just run, in the base/root directory of Moodle:

          $ grep -lri codingStandardsIgnore .
          

        2. Verify that there is only ONE result, and it belongs to the ./lib/maxmind/MaxMind/Db/Reader/Decoder.php file. That's ok, because it's a third part library and we don't touch them.
      2. Verify that CiBoT is happy and no coding-style issues are reported with this patch.
      Show
      Sanity check, just verifying that there is any case of codingStandardsIgnore in code. To do so, just run, in the base/root directory of Moodle: $ grep -lri codingStandardsIgnore . Verify that there is only ONE result, and it belongs to the ./lib/maxmind/MaxMind/Db/Reader/Decoder.php file. That's ok, because it's a third part library and we don't touch them. Verify that CiBoT is happy and no coding-style issues are reported with this patch.

      The @codingStandardsIgnoreFile, @codingStandardsIgnoreLine, @codingStandardsIgnoreStart and codingStandardsIgnoreEnd annotations have been deprecated by PHP_CodeSniffer 3.x and removed in 4.x. A new, more powerful, alternative is now available using inline comments (// phpcs:xxxx).

      Link: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-files-and-folders

      Right now there are a few uses in core of the old/deprecated variants. This issue is about:

      1. Review all them, one by one.
      2. Decide which ones can be simply removed.
      3. Decide which ones must be changed to the new syntax alternatives.

      Ciao

            stronk7 Eloy Lafuente (stronk7)
            stronk7 Eloy Lafuente (stronk7)
            Andrew Lyons Andrew Lyons
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 1 minute
                2h 1m

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