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

PHP 8.2: Dynamic Properties are deprecated for legacy LTI Provider library

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Minor Minor
    • 4.2.2
    • 4.3
    • Libraries
    • MOODLE_403_STABLE
    • MOODLE_402_STABLE
    • MDL-78144-402
    • MDL-78144-master
    • Hide

      Unfortunately, PHPStan still has an issue detecting classes with the #[AllowDynamicProperties] attribute. So we rely on PHPUnit.

      Testing scenario

      1. Make sure you're running PHP 8.2
      2. Run the following:

        vendor/bin/phpunit --testsuite=enrol_lti_testsuite > output.txt

      3.  Verify that the PHP deprecated warning with the prefix IMSGlobal\LTI* has gone, by running the following:

        grep -R IMSGlobal output.txt -c

        Verify the result is 0.

      Show
      Unfortunately, PHPStan still has an issue detecting classes with the # [AllowDynamicProperties] attribute. So we rely on PHPUnit. Testing scenario Make sure you're running PHP 8.2 Run the following: vendor/bin/phpunit --testsuite=enrol_lti_testsuite > output.txt   Verify that the PHP deprecated warning with the prefix IMSGlobal\LTI* has gone, by running the following: grep -R IMSGlobal output.txt -c Verify the result is 0.
    • 1
    • 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 lib/ltiprovider folder 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 - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 32 minutes
                4h 32m

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