Skip to content

Commit d06e249

Browse files
authored
Merge pull request #230 from akeneo/API-1798-fatal-error-because-of-resource-cursor-return-type-compatibility-in-php-8-1
fix(API-1798): Suppress mixed return type deprecated notices
2 parents 05ac34c + 24722c9 commit d06e249

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/Api/ProductMediaFileApi.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ public function download(string $code): ResponseInterface
127127
*
128128
* @return mixed
129129
*/
130+
#[\ReturnTypeWillChange]
130131
protected function extractCodeFromCreationResponse(ResponseInterface $response)
131132
{
132133
if (!$response->hasHeader('location')) {

src/Pagination/ResourceCursor.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public function __construct(?int $pageSize, PageInterface $firstPage)
2929
* {@inheritdoc}
3030
* @return mixed
3131
*/
32+
#[\ReturnTypeWillChange]
3233
public function current()
3334
{
3435
return $this->currentPage->getItems()[$this->currentIndex];
@@ -53,6 +54,7 @@ public function next(): void
5354
/**
5455
* {@inheritdoc}
5556
*/
57+
#[\ReturnTypeWillChange]
5658
public function key()
5759
{
5860
return $this->totalIndex;

0 commit comments

Comments
 (0)