Skip to content

Commit 6c59ddb

Browse files
committed
Url: silently deprecated getBasePath(), getBaseUrl(), getRelativeUrl(), canonicalize()
1 parent 27a849a commit 6c59ddb

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/Http/Url.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
* Mutable representation of a URL.
1717
*
1818
* <pre>
19-
* scheme user password host port basePath relativeUrl
20-
* | | | | | | |
21-
* /--\ /--\ /------\ /-------\ /--\/--\/----------------------------\
19+
* scheme user password host port path query fragment
20+
* | | | | | | | |
21+
* /--\ /--\ /------\ /-------\ /--\/------------\ /--------\ /------\
2222
* http://john:[email protected]:8042/en/manual.php?name=param#fragment <-- absoluteUrl
23-
* \__________________________/\____________/^\________/^\______/
24-
* | | | |
25-
* authority path query fragment
23+
* \______\__________________________/
24+
* | |
25+
* hostUrl authority
2626
* </pre>
2727
*
2828
* @property string $scheme
@@ -312,19 +312,22 @@ public function getHostUrl(): string
312312
}
313313

314314

315+
/** @deprecated */
315316
public function getBasePath(): string
316317
{
317318
$pos = strrpos($this->path, '/');
318319
return $pos === false ? '' : substr($this->path, 0, $pos + 1);
319320
}
320321

321322

323+
/** @deprecated */
322324
public function getBaseUrl(): string
323325
{
324326
return $this->getHostUrl() . $this->getBasePath();
325327
}
326328

327329

330+
/** @deprecated */
328331
public function getRelativeUrl(): string
329332
{
330333
return substr($this->getAbsoluteUrl(), strlen($this->getBaseUrl()));
@@ -356,6 +359,7 @@ public function isEqual($url): bool
356359
/**
357360
* Transforms URL to canonical form.
358361
* @return static
362+
* @deprecated
359363
*/
360364
public function canonicalize()
361365
{

0 commit comments

Comments
 (0)