File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,16 @@ using the `\Doctrine\ORM\Mapping\UniqueConstraint` and `\Doctrine\ORM\Mapping\In
33
33
34
34
# Upgrade to 3.2
35
35
36
+ ## Deprecate remaining ` Serializable ` implementation
37
+
38
+ Relying on ` SequenceGenerator ` implementing the ` Serializable ` is deprecated
39
+ because that interface won't be implemented in ORM 4 anymore.
40
+
41
+ The following methods are deprecated:
42
+
43
+ * ` SequenceGenerator::serialize() `
44
+ * ` SequenceGenerator::unserialize() `
45
+
36
46
## ` orm:schema-tool:update ` option ` --complete ` is deprecated
37
47
38
48
That option behaves as a no-op, and is deprecated. It will be removed in 4.0.
Original file line number Diff line number Diff line change 5
5
namespace Doctrine \ORM \Id ;
6
6
7
7
use Doctrine \DBAL \Connections \PrimaryReadReplicaConnection ;
8
+ use Doctrine \Deprecations \Deprecation ;
8
9
use Doctrine \ORM \EntityManagerInterface ;
9
10
use Serializable ;
10
11
@@ -65,8 +66,17 @@ public function getNextValue(): int
65
66
return $ this ->nextValue ;
66
67
}
67
68
69
+ /** @deprecated without replacement. */
68
70
final public function serialize (): string
69
71
{
72
+ Deprecation::trigger (
73
+ 'doctrine/orm ' ,
74
+ 'https://github.com/doctrine/orm/pull/11468 ' ,
75
+ '%s() is deprecated, use __serialize() instead. %s won \'t implement the Serializable interface anymore in ORM 4. ' ,
76
+ __METHOD__ ,
77
+ self ::class,
78
+ );
79
+
70
80
return serialize ($ this ->__serialize ());
71
81
}
72
82
@@ -79,8 +89,17 @@ public function __serialize(): array
79
89
];
80
90
}
81
91
92
+ /** @deprecated without replacement. */
82
93
final public function unserialize (string $ serialized ): void
83
94
{
95
+ Deprecation::trigger (
96
+ 'doctrine/orm ' ,
97
+ 'https://github.com/doctrine/orm/pull/11468 ' ,
98
+ '%s() is deprecated, use __unserialize() instead. %s won \'t implement the Serializable interface anymore in ORM 4. ' ,
99
+ __METHOD__ ,
100
+ self ::class,
101
+ );
102
+
84
103
$ this ->__unserialize (unserialize ($ serialized ));
85
104
}
86
105
You can’t perform that action at this time.
0 commit comments