Problem/Motivation

Dynamic Properties are deprecated in PHP 8.2 .

Deprecated function: Creation of dynamic property Drupal\ds\Plugin\views\row\EntityRow::$entityLanguageRenderer is deprecated in Drupal\ds\Plugin\views\row\EntityRow->getEntityTranslationRenderer() (line 259 of modules/contrib/ds/src/Plugin/views/row/EntityRow.php).

Steps to reproduce

Install module on a Drupal installation that uses PHP >= 8.2

Issue fork ds-3373675

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

omar_emailat created an issue. See original summary.

omar_emailat’s picture

StatusFileSize
new435 bytes
tonytheferg’s picture

Thanks, the patch removes the deprecation notice.

hamzadwaya’s picture

thanks, tafili for this batch

keshavv’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: deprecated_function-3373675-2.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

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

elber’s picture

Hi I did some tests to see if the errors is because the change in the patch, tests keep failling before the patch I also reverted the last commit

but it changes nothing.

elber’s picture

Tests are passing in drupal 10.0.5 and drupal 10.0.3

rajab natshah’s picture

Title: Deprecated function: Creation of dynamic property Drupal\ds\Plugin\views\row\EntityRow::$entityLanguageRenderer » Fix PHP 8.2 Deprecated function: Creation of dynamic property Drupal\ds\Plugin\views\row\EntityRow::$entityLanguageRenderer
Issue tags: +PHP 8.2
rajab natshah’s picture

StatusFileSize
new481 bytes

Uploaded a patch over the 8.x-3.x branch

rajab natshah’s picture

Version: 5.0.x-dev » 8.x-3.x-dev
Status: Needs work » Needs review
rajab natshah’s picture

Status: Needs review » Reviewed & tested by the community

Tested and reviewed the patch by Omar
Only re-roled it to work with the 8.x-3.x branch
His fix is the one to commit and credit.

subir_ghosh’s picture

Changed PHP version to 8.2 (so that I could upgrade to D 10.2.0.

Got this error message.

UPDATE: I applied patch #2. So far ok on D 10.2.0 + PHP 8.2

  • swentel committed c589e98e on 8.x-3.x
    Issue #3373675 by Rajab Natshah, omar_emailat: Fix PHP 8.2 Deprecated...
swentel’s picture

Status: Reviewed & tested by the community » Fixed

committed and pushed, thanks!

swentel’s picture

Status: Fixed » Closed (fixed)