Skip to content

Commit 88a0cb7

Browse files
Merge branch '11.9' into 11.10
2 parents 3548b4a + 148ed10 commit 88a0cb7

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
* Add support for `access_level` in `Projects::createProjectAccessToken`
1313
* Add support for `expires_at` in `Projects::addMember` and `Projects::saveMember`
1414

15+
## [11.9.1] - 2023-04-30
16+
17+
* Corrected upload avatar endpoint
18+
1519
## [11.9.0] - 2023-03-06
1620

1721
* Add PHP 8.2 support

src/Api/Projects.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1230,7 +1230,7 @@ public function uploadFile($project_id, string $file)
12301230
*/
12311231
public function uploadAvatar($project_id, string $file)
12321232
{
1233-
return $this->put($this->getProjectPath($project_id, ''), [], [], ['avatar' => $file]);
1233+
return $this->put('projects/'.self::encodePath($project_id), [], [], ['avatar' => $file]);
12341234
}
12351235

12361236
/**

tests/Api/ProjectsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2842,7 +2842,7 @@ public function shouldUploadAvatar(): void
28422842
$api = $this->getApiMock();
28432843
$api->expects($this->once())
28442844
->method('put')
2845-
->with('projects/1/', [], [], ['avatar' => $fileName])
2845+
->with('projects/1', [], [], ['avatar' => $fileName])
28462846
->will($this->returnValue($expectedArray));
28472847
$this->assertEquals($expectedArray, $api->uploadAvatar(1, $fileName));
28482848
\unlink($fileName);

0 commit comments

Comments
 (0)