Problem/Motivation

We are creating dynamic properties in the EntityFieldQuery class:

exception: [Deprecated] Line 1335 of modules/simpletest/tests/entity_query.test:
Creation of dynamic property EntityFieldQuery::$alterMyExecuteCallbackPlease is deprecated

Steps to reproduce

Run simpletest on PHP 8.2.

Proposed resolution

We cannot declare the property in EntityFieldQuery class as it is used for testing purposes only. We need to change the testing approach here (for example use the variable instead).

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#2 3322011-2.patch1.49 KBpoker10

Comments

poker10 created an issue. See original summary.

poker10’s picture

Status: Active » Needs review
StatusFileSize
new1.49 KB

Probably the most straightforward way is to replace it with a variable_get / variable_set approach, as this is already used on multiple places in tests.

  • mcdruid committed 143ea01 on 7.x
    Issue #3322011 by poker10: [D7 PHP 8.2] Deprecated function: Creation of...
mcdruid’s picture

Status: Needs review » Fixed

Yup, looks like a good solution.

Thanks!

Status: Fixed » Closed (fixed)

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