- Issue created by @pdureau
- Merge request !313Issue #3495847 by pdureau, grimreaper: Better handling of HTML classes deprecation → (Merged) created by pdureau
Automatically closed - issue fixed for 2 weeks with no activity.
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
Also, add (Deprecated) in plugin label
Active
2.0
Code
Automatically closed - issue fixed for 2 weeks with no activity.