Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-17747

Code sniffer fails on master: static protected in datetime.php after 3.3.x merge

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 4.0.0-b1
    • 4.0.0-b1
    • Test Suite
    • None

      Since the 3.3.x merge 2a2dad29a4 (10/18/2026), which brought in PHPBB-15556 (translate AM/PM in time formats), the “Phing sniff” step of the “Tests / PHP 8.2 - none” job fails on master:

      FILE: phpBB/phpbb/datetime.php
      211 | ERROR | Access specifier (e.g. public) should not follow static scope
      | | attribute. Encountered “protected” after static
      

      The new method localise_meridiem() is declared static protected. 3.3.x code uses that order, but master’s sniffer requires the access modifier first. The Tests run on master for 2a2dad29a4 fails, the runs before it passed, and every pull request against master now fails this job.

      Fix: on master, declare it protected static function localise_meridiem(...). Only the modifier order changes. 3.3.x stays as it is.

      Investigated and written by Claude on behalf of William Jacoby (bonelifer).

            Marc Marc
            bonelifer bonelifer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: