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

PHP 8.2: Dynamic Properties are deprecated for files, mod BBB, chat, survey and feedback

XMLWordPrintable

    • MOODLE_402_STABLE
    • MOODLE_402_STABLE
    • MDL-77347-master
    • Hide
      Prerequisite:

      The scanning process will consume memory resources. I suggest increasing the memory limit in your PHP.ini to 256M, or more if needed.

      Run analysis
      1. Install PHPStan

        composer require --dev phpstan/phpstan
        

      2. Download these files: phpstan_mdl77347.neon and phpstan3rdparty.neon and put the files into Moodle's root folder.
      3. Put the files into Moodle's root folder.
      4. Run the analysis (note: if you hit errors, change 256 to something larger like 512, 1024, etc):

        php -dmemory_limit=256M vendor/bin/phpstan analyse --configuration phpstan_mdl77347.neon -vvv | tee result.txt 

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

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

      6. Verify that you have an empty result.
      Show
      Prerequisite: The scanning process will consume memory resources. I suggest increasing the memory limit in your PHP.ini to 256M, or more if needed. Run analysis Install PHPStan composer require --dev phpstan/phpstan Download these files: phpstan_mdl77347.neon and phpstan3rdparty.neon and put the files into Moodle's root folder. Put the files into Moodle's root folder. Run the analysis (note: if you hit errors, change 256 to something larger like 512, 1024, etc): php -dmemory_limit=256M vendor/bin/phpstan analyse --configuration phpstan_mdl77347.neon -vvv | tee result.txt Search for "Access to an undefined property". grep -i "Access to an undefined property" result.txt  Verify that you have an empty result.
    • 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 following folders:

      • files/
      • mod/bigbluebuttonbn/
      • mod/chat/
      • mod/feedback/
      • mod/survey/

      related to dynamic properties deprecation on PHP 8.2.

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

            meirza.arson@moodle.com Meirza
            meirza.arson@moodle.com Meirza
            Raquel Ortega Raquel Ortega
            Jake Dallimore Jake Dallimore
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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