Readonly property cannot be initialized
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3542278. --> Reported by: [claudiu.cristea](https://www.drupal.org/user/56348) Related to !42 >>> <p>In our project we have the following failure uploading a file:</p> <blockquote><p> Error: Cannot initialize readonly property Drupal\babel\BabelLocaleTranslation::$babelStorage from scope Drupal\locale\LocaleTranslation in Drupal\locale\LocaleTranslation-&gt;__wakeup() (line 81 of core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php).</p> <p>unserialize() (Line: 21)<br> Drupal\Component\Serialization\PhpSerialize::decode()<br> array_map() (Line: 79)<br> Drupal\Core\KeyValueStore\DatabaseStorageExpirable-&gt;getMultiple() (Line: 35)<br> Drupal\Core\KeyValueStore\StorageBase-&gt;get() (Line: 150)<br> Drupal\Core\Form\FormCache-&gt;loadCachedFormState() (Line: 123)<br> Drupal\Core\Form\FormCache-&gt;getCache() (Line: 456)<br> Drupal\Core\Form\FormBuilder-&gt;getCache() (Line: 270)<br> ... </p></blockquote> <p>We need to relax the "readonly" directive until there will be a way to serialize such classes</p>
issue