Reverted Route::__toString() behavior and added deprecated message for proper use

This commit is contained in:
Matias Griese 2019-01-23 20:54:10 +02:00
parent 57de7cc03d
commit 18d53079dd
2 changed files with 4 additions and 2 deletions

View File

@ -25,7 +25,6 @@
* Fixed failed login if user attempts to log in with upper case non-english letters
* Removed extra authenticated/authorized fields when saving existing user from a form
* Fixed `Grav\Framework\Route::__toString()` returning relative URL, not relative route
* Fixed `MediaTrait::getMedia()` to return refreshed `Media` object after calling `MediaTrait::clearMediaCache()`
# v1.6.0-beta.7
## 12/14/2018

View File

@ -275,10 +275,13 @@ class Route
/**
* @return string
* @deprecated 1.6
*/
public function __toString()
{
return $this->toString();
user_error(__CLASS__ . '::' . __FUNCTION__ . '() will change in the future to return route, not relative url: use ->toString(true) or ->getUri() instead.', E_USER_DEPRECATED);
return $this->toString(true);
}
/**