mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-16 16:17:43 +03:00
Mark toString() method as deprecated, scheduled for removal in 4.0.0
This commit is contained in:
@@ -590,6 +590,14 @@ 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);
|
||||
|
||||
Reference in New Issue
Block a user