Skip to content

Commit

Permalink
Revert "Mark toString() method as deprecated, scheduled for removal i…
Browse files Browse the repository at this point in the history
…n 4.0.0"

This reverts commit 4c467ce.

For more information, please see the discussion at:
4c467ce#commitcomment-31174263

Also refer to the discussion at:
ShittySoft/symfony-live-berlin-2018-doctrine-tutorial#3 (comment)

TL;DR: I am retaining `toString()` for improved static analysis and
long-term stability.
  • Loading branch information
ramsey committed Nov 30, 2019
1 parent 3f43661 commit feb3eb5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
8 changes: 0 additions & 8 deletions src/Uuid.php
Original file line number Diff line number Diff line change
Expand Up @@ -590,14 +590,6 @@ public function getVersion()
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);
Expand Down
4 changes: 0 additions & 4 deletions src/UuidInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,6 @@ public function getVersion();
/**
* 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();
Expand Down

2 comments on commit feb3eb5

@Ocramius
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a 👍 on this, thanks @ramsey!

@simPod
Copy link
Contributor

@simPod simPod commented on feb3eb5 Dec 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes!!!

Please sign in to comment.