Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-76411 PHP 8.2: Dynamic Properties are deprecated
  3. MDL-77341

PHP 8.2: Dynamic Properties are deprecated for mnet

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Minor Minor
    • 4.2.1
    • 4.2, 4.3
    • MNet
    • MOODLE_402_STABLE, MOODLE_403_STABLE
    • MOODLE_402_STABLE
    • MDL-77341-master
    • Hide
      Run analysis
      1. Install PHPStan

        composer require --dev phpstan/phpstan
        

      2. Download : phpstan_mdl77341.neon and put the file into Moodle's root folder.
      3. Run the analysis:

        php -dmemory_limit=1G vendor/bin/phpstan analyse --configuration phpstan_mdl77341.neon -vvv | tee result.txt 

      4. Search for "Access to an undefined property".

        grep -i "Access to an undefined property" result.txt  

      5. Verify that you will get the below result:

        328    Access to an undefined property mnet_peer::$public_key_ref.                           
        329    Access to an undefined property mnet_peer::$public_key_ref.

        Ignore those warnings because the $public_key_ref is in the deprecated function.

      Show
      Run analysis Install PHPStan composer require --dev phpstan/phpstan Download : phpstan_mdl77341.neon and put the file into Moodle's root folder. Run the analysis: php -dmemory_limit=1G vendor/bin/phpstan analyse --configuration phpstan_mdl77341.neon -vvv | tee result.txt Search for "Access to an undefined property". grep -i "Access to an undefined property" result.txt Verify that you will get the below result: 328    Access to an undefined property mnet_peer::$public_key_ref.                           329    Access to an undefined property mnet_peer::$public_key_ref. Ignore those warnings because the $public_key_ref is in the deprecated function.
    • 2
    • Team Hedgehog Sprint 1 review, Team Hedgehog Sprint 2.1, Team Hedgehog Sprint 2.2, Team Hedgehog 2023 Sprint 1.3, Team Hedgehog 2023 Sprint 1.4, Team Hedgehog 2023 Sprint 2.0, Team Hedgehog 2023 Sprint 2.1, Team Hedgehog 2023 Sprint 2.2

      This issue was created to fix all the PHP files inside the mnet/ folder related to dynamic properties deprecation on PHP 8.2.

      https://php.watch/versions/8.2/dynamic-properties-deprecated

        1. phpstan_mdl77341.neon
          2 kB
        2. mnet_host.png
          mnet_host.png
          25 kB
        3. 2023-05-15_17-03.png
          2023-05-15_17-03.png
          207 kB
        4. 77341.txt
          9 kB

            meirza.arson@moodle.com Meirza
            meirza.arson@moodle.com Meirza
            Safat Shahin Safat Shahin
            Andrew Lyons Andrew Lyons
            Andrew Lyons Andrew Lyons
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 1 hour Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 1 hour
                2d 1h

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