Dynamic properties are deprecated in PHP 8.2

Created on 23 January 2023, almost 2 years ago
Updated 28 January 2024, 10 months ago

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

Feature request
Status

Fixed

Version

2.0

Component

Code

Created by

🇨🇦Canada joseph.olstad

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024