Repository: pimcore/pimcore (language: php)

Issue:
Remove DataObject\Link - __unserialize
### Improvement description

- Also think about migration for serialized data not migrated yet to the new default values. please see https://github.com/pimcore/pimcore/pull/15949/files


Discussion / hints:

Fix patch:
diff --git a/doc/23_Installation_and_Upgrade/09_Upgrade_Notes/README.md b/doc/23_Installation_and_Upgrade/09_Upgrade_Notes/README.md
index 258caccb7e5..3ca89050fbc 100644
--- a/doc/23_Installation_and_Upgrade/09_Upgrade_Notes/README.md
+++ b/doc/23_Installation_and_Upgrade/09_Upgrade_Notes/README.md
@@ -4,7 +4,9 @@
 #### [Documents]
 - Date Editable: Removed deprecated outputFormat config. Use outputIsoFormat config instead.
 
+
 #### [DataObjects]
+- Removed deprecated `unserialize()` method from `Pimcore\Model\DataObject\Data\Link`. If not the data is not migrated to the new format, to the new default values, please execute a simple script to resave all links.
 - Parameter `$index` of method `setIndex` is not nullable anymore in `Pimcore\Model\DataObject\ClassDefinition\Data`
 
 ## Pimcore 11.6.0
diff --git a/models/DataObject/Data/Link.php b/models/DataObject/Data/Link.php
index 2527e734233..265e34921a4 100644
--- a/models/DataObject/Data/Link.php
+++ b/models/DataObject/Data/Link.php
@@ -453,20 +453,4 @@ public function __toString(): string
     {
         return $this->getHtml();
     }
-
-    /**
-     * @internal
-     *
-     * https://github.com/pimcore/pimcore/pull/15926
-     * used for non-nullable properties stored with null
-     *
-     * @TODO: Remove in Pimcore 12
-     *
-     */
-    public function __unserialize(array $data): void
-    {
-        foreach (get_object_vars($this) as $property => $value) {
-            $this->$property = $data["\0*\0".$property] ?? $value;
-        }
-    }
 }


Test patch: