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->__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->getMultiple() (Line: 35)<br>
Drupal\Core\KeyValueStore\StorageBase->get() (Line: 150)<br>
Drupal\Core\Form\FormCache->loadCachedFormState() (Line: 123)<br>
Drupal\Core\Form\FormCache->getCache() (Line: 456)<br>
Drupal\Core\Form\FormBuilder->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