From feb3eb50d1d216fa720090fc68c704d777c403f6 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Sat, 30 Nov 2019 12:33:16 -0800 Subject: [PATCH] Revert "Mark toString() method as deprecated, scheduled for removal in 4.0.0" This reverts commit 4c467ce4d5a72c3cf0832c813d4d84d222c3d4bb. For more information, please see the discussion at: https://github.com/ramsey/uuid/commit/4c467ce4d5a72c3cf0832c813d4d84d222c3d4bb#commitcomment-31174263 Also refer to the discussion at: https://github.com/ShittySoft/symfony-live-berlin-2018-doctrine-tutorial/pull/3#issuecomment-460441229 TL;DR: I am retaining `toString()` for improved static analysis and long-term stability. --- src/Uuid.php | 8 -------- src/UuidInterface.php | 4 ---- 2 files changed, 12 deletions(-) diff --git a/src/Uuid.php b/src/Uuid.php index 71bcaec..a0cdae1 100644 --- a/src/Uuid.php +++ b/src/Uuid.php @@ -590,14 +590,6 @@ class Uuid implements UuidInterface return null; } - /** - * {@inheritdoc} - * - * @deprecated In ramsey/uuid 4.0.0, this method will be replaced with the - * __toString() magic method, which is already available on this class. - * The new recommendation is to cast Uuid objects to string, rather than - * calling `toString()`. - */ public function toString() { return $this->codec->encode($this); diff --git a/src/UuidInterface.php b/src/UuidInterface.php index ceef90f..e1cea67 100644 --- a/src/UuidInterface.php +++ b/src/UuidInterface.php @@ -268,10 +268,6 @@ interface UuidInterface extends JsonSerializable, Serializable /** * Converts this UUID into a string representation. * - * @deprecated In ramsey/uuid 4.0.0, this method will be replaced with the - * __toString() magic method, which is currently available in the - * Uuid concrete class. The new recommendation is to cast Uuid objects - * to string, rather than calling `toString()`. * @return string */ public function toString();