Skip to content

Commit 15ba730

Browse files
Merge pull request #84 from packagist/push-uvtvmsltozko
Suborganization: fix show package URL to avoid redirect
2 parents e389d73 + 614e275 commit 15ba730

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/Api/Suborganizations/Packages.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function all($suborganizationName, array $filters = [])
2727

2828
public function show($suborganizationName, $packageIdOrName)
2929
{
30-
return $this->get(sprintf('/suborganizations/%s/packages/%s', $suborganizationName, $packageIdOrName));
30+
return $this->get(sprintf('/suborganizations/%s/packages/%s/', $suborganizationName, $packageIdOrName));
3131
}
3232

3333
public function createVcsPackage($suborganizationName, $url, $credentialId = null, $type = 'vcs', $defaultSuborganizationAccess = null)

src/Api/Subrepositories/Packages.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function all($subrepositoryName, array $filters = [])
3030

3131
public function show($subrepositoryName, $packageIdOrName)
3232
{
33-
return $this->get(sprintf('/subrepositories/%s/packages/%s', $subrepositoryName, $packageIdOrName));
33+
return $this->get(sprintf('/subrepositories/%s/packages/%s/', $subrepositoryName, $packageIdOrName));
3434
}
3535

3636
public function createVcsPackage($subrepositoryName, $url, $credentialId = null, $type = 'vcs', $defaultSubrepositoryAccess = null)

tests/Api/Projects/PackagesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function testShow()
8888
$api = $this->getApiMock();
8989
$api->expects($this->once())
9090
->method('get')
91-
->with($this->equalTo('/subrepositories/project/packages/acme-website/package'))
91+
->with($this->equalTo('/subrepositories/project/packages/acme-website/package/'))
9292
->willReturn($expected);
9393

9494
$this->assertSame($expected, $api->show($projectName, 'acme-website/package'));

tests/Api/Suborganizations/PackagesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function testShow()
8888
$api = $this->getApiMock();
8989
$api->expects($this->once())
9090
->method('get')
91-
->with($this->equalTo('/suborganizations/suborganization/packages/acme-website/package'))
91+
->with($this->equalTo('/suborganizations/suborganization/packages/acme-website/package/'))
9292
->willReturn($expected);
9393

9494
$this->assertSame($expected, $api->show($suborganizationName, 'acme-website/package'));

tests/Api/Subrepositories/PackagesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function testShow()
8888
$api = $this->getApiMock();
8989
$api->expects($this->once())
9090
->method('get')
91-
->with($this->equalTo('/subrepositories/subrepository/packages/acme-website/package'))
91+
->with($this->equalTo('/subrepositories/subrepository/packages/acme-website/package/'))
9292
->willReturn($expected);
9393

9494
$this->assertSame($expected, $api->show($subrepositoryName, 'acme-website/package'));

0 commit comments

Comments
 (0)