5
5
namespace Doctrine \ORM \Id ;
6
6
7
7
use Doctrine \DBAL \Connections \PrimaryReadReplicaConnection ;
8
- use Doctrine \Deprecations \Deprecation ;
9
8
use Doctrine \ORM \EntityManagerInterface ;
10
- use Serializable ;
11
-
12
- use function serialize ;
13
- use function unserialize ;
14
9
15
10
/**
16
11
* Represents an ID generator that uses a database sequence.
17
12
*/
18
- class SequenceGenerator extends AbstractIdGenerator implements Serializable
13
+ class SequenceGenerator extends AbstractIdGenerator
19
14
{
20
15
private int $ nextValue = 0 ;
21
16
private int |null $ maxValue = null ;
@@ -66,20 +61,6 @@ public function getNextValue(): int
66
61
return $ this ->nextValue ;
67
62
}
68
63
69
- /** @deprecated without replacement. */
70
- final public function serialize (): string
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
-
80
- return serialize ($ this ->__serialize ());
81
- }
82
-
83
64
/** @return array<string, mixed> */
84
65
public function __serialize (): array
85
66
{
@@ -89,20 +70,6 @@ public function __serialize(): array
89
70
];
90
71
}
91
72
92
- /** @deprecated without replacement. */
93
- final public function unserialize (string $ serialized ): void
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
-
103
- $ this ->__unserialize (unserialize ($ serialized ));
104
- }
105
-
106
73
/** @param array<string, mixed> $data */
107
74
public function __unserialize (array $ data ): void
108
75
{
0 commit comments