Problem/Motivation
Seeing Deprecation notice on form edit page where we have RadioactivityReferenceWidget on PHP 8.2.
Deprecated function: Creation of dynamic property Drupal\radioactivity\Plugin\Field\FieldWidget\RadioactivityReferenceWidget::$elementInfo is deprecated in Drupal\radioactivity\Plugin\Field\FieldWidget\RadioactivityReferenceWidget->__construct() (line 39 of modules/contrib/radioactivity/src/Plugin/Field/FieldWidget/RadioactivityReferenceWidget.php).
Drupal\radioactivity\Plugin\Field\FieldWidget\RadioactivityReferenceWidget->__construct('radioactivity_reference', Array, Object, Array, Array, Object) (Line: 46)
Drupal\radioactivity\Plugin\Field\FieldWidget\RadioactivityReferenceWidget::create(Object, Array, 'radioactivity_reference', Array) (Line: 122)
Drupal\Core\Field\WidgetPluginManager->createInstance('radioactivity_reference', Array) (Line: 110)
Drupal\Core\Field\WidgetPluginManager->getInstance(Array) (Line: 157)
Drupal\Core\Entity\Entity\EntityFormDisplay->getRenderer('field_radioactivity_count') (Line: 183)
Drupal\Core\Entity\Entity\EntityFormDisplay->buildForm(Object, Array, Object) (Line: 121)
Drupal\Core\Entity\ContentEntityForm->form(Array, Object) (Line: 127)
Drupal\node\NodeForm->form(Array, Object) (Line: 107)
Drupal\Core\Entity\EntityForm->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 536)
Drupal\Core\Form\FormBuilder->retrieveForm('node_forum_edit_form', Object) (Line: 283)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Steps to reproduce
- Install Drupal 10.2.1 on PHP8.2
- Install radioactivity 4.0.x-dev
- Setup any kind of radioactivity reference field on articles
- Go to create content for articles
- Error message displays on top of page
Proposed resolution
1. Setup the protected property of $elementInfo in RadioactivityReferenceWidget.
Remaining tasks
None
User interface changes
None
API changes
None
Data model changes
None