diff --git a/UPGRADE.md b/UPGRADE.md index 4cff9282884..a9dab1d0708 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,5 +1,14 @@ # Upgrade to 4.0 +## Remove remaining `Serializable` implementation + +`SequenceGenerator` does not implement the `Serializable` interface anymore. + +The following methods have been removed: + +* `SequenceGenerator::serialize()` +* `SequenceGenerator::unserialize()` + ## Remove `orm:schema-tool:update` option `--complete` That option was a no-op. diff --git a/psalm-baseline.xml b/psalm-baseline.xml index ec624d93079..052aabe7056 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -206,11 +206,6 @@ - - - - - diff --git a/src/Id/SequenceGenerator.php b/src/Id/SequenceGenerator.php index 659bb58b9e4..29d34445025 100644 --- a/src/Id/SequenceGenerator.php +++ b/src/Id/SequenceGenerator.php @@ -5,17 +5,12 @@ namespace Doctrine\ORM\Id; use Doctrine\DBAL\Connections\PrimaryReadReplicaConnection; -use Doctrine\Deprecations\Deprecation; use Doctrine\ORM\EntityManagerInterface; -use Serializable; - -use function serialize; -use function unserialize; /** * Represents an ID generator that uses a database sequence. */ -class SequenceGenerator extends AbstractIdGenerator implements Serializable +class SequenceGenerator extends AbstractIdGenerator { private int $nextValue = 0; private int|null $maxValue = null; @@ -66,20 +61,6 @@ public function getNextValue(): int return $this->nextValue; } - /** @deprecated without replacement. */ - final public function serialize(): string - { - Deprecation::trigger( - 'doctrine/orm', - 'https://github.com/doctrine/orm/pull/11468', - '%s() is deprecated, use __serialize() instead. %s won\'t implement the Serializable interface anymore in ORM 4.', - __METHOD__, - self::class, - ); - - return serialize($this->__serialize()); - } - /** @return array */ public function __serialize(): array { @@ -89,20 +70,6 @@ public function __serialize(): array ]; } - /** @deprecated without replacement. */ - final public function unserialize(string $serialized): void - { - Deprecation::trigger( - 'doctrine/orm', - 'https://github.com/doctrine/orm/pull/11468', - '%s() is deprecated, use __unserialize() instead. %s won\'t implement the Serializable interface anymore in ORM 4.', - __METHOD__, - self::class, - ); - - $this->__unserialize(unserialize($serialized)); - } - /** @param array $data */ public function __unserialize(array $data): void {