Skip to content

Commit 41dfcc8

Browse files
committed
Remove UriInterface::getUser which was never released
1 parent 852e2c6 commit 41dfcc8

File tree

4 files changed

+5
-18
lines changed

4 files changed

+5
-18
lines changed

interfaces/Contracts/UriInterface.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
/**
2323
* @phpstan-import-type ComponentMap from UriString
2424
*
25-
* @method string|null getUsername() returns the user component of the URI (deprecated).
26-
* @method string|null getUser() returns the user component of the URI.
25+
* @method string|null getUsername() returns the user component of the URI.
2726
* @method self withUser(?string $user) returns a new URI instance with user component updated, if the user is set to null the password also will be set to null.
2827
* @method string|null getPassword() returns the scheme-specific information about how to gain authorization to access the resource.
2928
* @method self withPassword(?string $password) returns a new URI instance with password component updated, if the user is set to null the password also will be set to null.

uri/CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ All Notable changes to `League\Uri` will be documented in this file
1313
- `Uri::when` conditional method to ease component building logic.
1414
- `Uri` implements the new `League\Uri\Contract\UriInspector` interface
1515
- `Uri` implements the new `League\Uri\Contract\UriRenderer` interface
16-
- `Uri::getUser` returns the encoded user component of the URI an alias for `Uri::getUsername`
1716
- `Uri::fromMarkdownAnchor`
1817
- `Uri::fromHtmlAnchor`
1918
- `UriTemplate` implements the `Stringable` interface
@@ -28,7 +27,7 @@ All Notable changes to `League\Uri` will be documented in this file
2827

2928
### Deprecated
3029

31-
- `BasUri` use the `Uri` class or the component `Modifier` class depending on the needed requirement.
30+
- `BasUri` use the `Uri` class or the uri-component `Modifier` class depending on the needed requirement.
3231

3332
### Removed
3433

uri/Uri.php

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,20 +1403,9 @@ public function getAuthority(): ?string
14031403
*
14041404
* @see https://wiki.php.net/rfc/url_parsing_api
14051405
*/
1406-
public function getUser(): ?string
1407-
{
1408-
return $this->user;
1409-
}
1410-
1411-
/**
1412-
* Returns the user component encoded value.
1413-
*
1414-
* @codeCoverageIgnore
1415-
* @see Uri::getUser()
1416-
*/
14171406
public function getUsername(): ?string
14181407
{
1419-
return $this->getUser();
1408+
return $this->user;
14201409
}
14211410

14221411
public function getPassword(): ?string

uri/UriTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,8 +1089,8 @@ public function it_will_fail_to_generate_an_anchor_tag_html_for_the_instance():
10891089
#[Test]
10901090
public function it_can_update_the_user_component(): void
10911091
{
1092-
self::assertSame('user', Uri::new('example://host/path?query')->withUser('user')->getUser());
1093-
self::assertNull(Uri::new('example://user@host/path?query')->withUser(null)->getUser());
1092+
self::assertSame('user', Uri::new('example://host/path?query')->withUser('user')->getUsername());
1093+
self::assertNull(Uri::new('example://user@host/path?query')->withUser(null)->getUsername());
10941094
}
10951095

10961096
#[Test]

0 commit comments

Comments
 (0)