Drupal version

11.0.6

Drupal Rector version

0.20.3

Problem / Motivation

In my annotation class, I had this:

  /**
   * The directions for the plugin's links.
   *
   * Array keys are machine names, array values are labels.
   *
   * @var array
   */
  public $directions = [];

The rector rule produces this in the attribute class:

    public readonly array $directions,

This should have the same default value as in the annotation, so it's an optional attribute property.

Comments

joachim created an issue.