From @Grimreaper
So, about "'HTML classes' source is deprecated in favor of 'Attributes'.". The problem is https://git.drupalcode.org/project/ui_patterns/-/blob/2.0.x/src/Plugin/U...
/**
* {@inheritdoc}
*/
public function getPropValue(): mixed {
// @phpstan-ignore-next-line
\Drupal::messenger()->addWarning("'HTML classes' source is deprecated in favor of 'Attributes'.");
return parent::getPropValue();
}Messenger is called in getPropValue so when a component is displayed it is triggered. That's why it was displayed when just going on a layout builder page (not form).
I think it would be better to override the constructor and use Drupal API to mark a deprecation.
So it will be logged and detected by tools like rector and/or phpstan
And for settingsForm , instead of the messenger, just use the renderable array:
$form['warning_markup'] = [
'#theme' => 'status_messages',
'#message_list' => [
'warning' => [
$this->t('It is highly recommended to disable pager if you merge rows.'),
],
],
];From @pdureau
Also, add (Deprecated) in plugin label
Issue fork ui_patterns-3495847
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
Comment #2
pdureau commentedComment #3
grimreaperComment #6
pdureau commented