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

PHP 8.2: Dynamic Properties are deprecated for repository

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Critical Critical
    • 4.2
    • 4.2
    • Repositories
    • MOODLE_402_STABLE
    • MOODLE_402_STABLE
    • MDL-77342-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 : phpstan_mdl77342.neon and phpstan3rdparty.neon and put the files into Moodle's root folder.
      3. Run the analysis:

        php -dmemory_limit=256M vendor/bin/phpstan analyse --configuration phpstan_mdl77342.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 have an empty result.
      Testing repository plugins
      1. Check that repository plugins still work as expected by running the following QA tests
      2. Log in as a user and open the user menu and click "Private files"
      3. Open the file picker and confirm that the "Recent files" functionality works.
      4. Confirm that the URL downloader functionality also works.
      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 : phpstan_mdl77342.neon and phpstan3rdparty.neon and put the files into Moodle's root folder. Run the analysis: php -dmemory_limit=256M vendor/bin/phpstan analyse --configuration phpstan_mdl77342.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. Testing repository plugins Check that repository plugins still work as expected by running the following QA tests Flickr - MDLQA-17553 Flickr public - MDLQA-17554 Amazon S3 - MDLQA-17702 WebDAV - MDLQA-17749 Wikimedia - MDLQA-17550 YouTube - MDLQA-17495 (Note that you may also pass these QA tests if they're working as expected) Log in as a user and open the user menu and click "Private files" Open the file picker and confirm that the " Recent files " functionality works. Confirm that the URL downloader functionality also works.
    • 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 repository/ folder related to dynamic properties deprecation on PHP 8.2.

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

        1. MDL-77342_analysis.png
          MDL-77342_analysis.png
          73 kB
        2. MDL-77342_downloader.png
          MDL-77342_downloader.png
          54 kB
        3. MDL-77342_recent files.png
          MDL-77342_recent files.png
          72 kB
        4. phpstan_mdl77342.neon
          2 kB
        5. phpstan3rdparty.neon
          3 kB

            meirza.arson@moodle.com Meirza
            meirza.arson@moodle.com Meirza
            Huong Nguyen Huong Nguyen
            Jun Pataleta Jun Pataleta
            Angelia Dela Cruz Angelia Dela Cruz
            Votes:
            0 Vote for this issue
            Watchers:
            4 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 - 1 day, 7 hours, 2 minutes
                1d 7h 2m

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