Problem/Motivation

PHP 8.2 fixes needed, (easy to fix)

Missing $cron property, add it.public $cron;

  1x: Creation of dynamic property Drupal\Tests\linkchecker\Kernel\LinkcheckerRedirectTest::$cron is deprecated
    1x in LinkcheckerRedirectTest::testLinkcheckerRedirect from Drupal\Tests\linkchecker\Kernel

Solution: Add a public property called $cron to LinkcheckerRedirectTest or it's parent class if that's easier

Missing $adminUser property, add it. public $adminUser;

  1x: Creation of dynamic property Drupal\Tests\linkchecker\Functional\LinkCheckerEditFormTest::$adminUser is deprecated
    1x in LinkCheckerEditFormTest::testEditUrlWorks from Drupal\Tests\linkchecker\Functional

again in:

  2x: Creation of dynamic property Drupal\Tests\linkchecker\Functional\LinkCheckerInterfaceTest::$admin_user is deprecated
    1x in LinkCheckerInterfaceTest::testLinkCheckerCreateNodeWithBrokenLinks from Drupal\Tests\linkchecker\Functional
    1x in LinkCheckerInterfaceTest::testLinkCheckerCreateBlockWithBrokenLinks from Drupal\Tests\linkchecker\Functional

again in

  1x: Creation of dynamic property Drupal\Tests\linkchecker\Functional\LinkCheckerLinkExtractionStatusTest::$adminUser is deprecated
    1x in LinkCheckerLinkExtractionStatusTest::testLinkCheckerStatusCorrect from Drupal\Tests\linkchecker\Functional

again in

  1x: Creation of dynamic property Drupal\Tests\linkchecker\Functional\LinkCheckerLinkExtractionTest::$adminUser is deprecated
    1x in LinkCheckerLinkExtractionTest::testLinkCheckerCreateNodeWithLinks from Drupal\Tests\linkchecker\Functional

again in

  2x: Creation of dynamic property Drupal\Tests\linkchecker\Functional\LinkCheckerOverviewTest::$adminUser is deprecated
    1x in LinkCheckerOverviewTest::testOverviewWorks from Drupal\Tests\linkchecker\Functional
    1x in LinkCheckerOverviewTest::testOverViewWorksWithResultFilter from Drupal\Tests\linkchecker\Functional

again in

  1x: Creation of dynamic property Drupal\Tests\linkchecker\FunctionalJavascript\LinkCheckerOverviewTest::$adminUser is deprecated
    1x in LinkCheckerOverviewTest::testOverviewWorks from Drupal\Tests\linkchecker\FunctionalJavascript

Steps to reproduce

Run PHP 8.2 automated tests

Proposed resolution

Write a patch that adds the missing public $property_name; as noted above.

Remaining tasks

Write a patch and test it against PHP 8.2 with D10.0.1 or PHP 8.2 with D10.1.x

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

joseph.olstad created an issue. See original summary.

keshavv made their first commit to this issue’s fork.

keshavv’s picture

Title: PHP 8.2 compatibility fix » Dynamic properties are deprecated in PHP 8.2

I have created the MR. Please review.

keshavv’s picture

Status: Needs work » Needs review
joseph.olstad’s picture

Status: Needs review » Reviewed & tested by the community

Nice work, this needs to go in.

eiriksm’s picture

Assigned: Unassigned » eiriksm

  • eiriksm committed cd885dc0 on 2.0.x authored by keshavv
    Issue #3335586 by keshavv, joseph.olstad, eiriksm: Dynamic properties...
eiriksm’s picture

Status: Reviewed & tested by the community » Fixed

For some reason when I click the PHP 8.2 tests it starts a PHP 8.3 test 🤔

Anyway. Changes look very good

Thanks for the amazing initial report and an accurate fix 🚀

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.