Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temporarily fix deprecation #35

Merged
merged 3 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Endpoints/AbstractRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public function send()

abstract public function toArray(): array;

#[\ReturnTypeWillChange]
public function jsonSerialize(): array
{
return $this->toArray();
Expand Down
1 change: 1 addition & 0 deletions src/Models/AbstractHolder.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public function toArray(): array
/**
* @return TEntry[]
*/
#[\ReturnTypeWillChange]
public function jsonSerialize(): array
{
return $this->toArray();
Expand Down
1 change: 1 addition & 0 deletions src/Models/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@ public function toArray(): array
];
}

#[\ReturnTypeWillChange]
public function jsonSerialize(): array
{
return $this->removeEmptyValues($this->toArray());
Expand Down
1 change: 1 addition & 0 deletions src/Models/ContactListStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public function toArray(): array
];
}

#[\ReturnTypeWillChange]
public function jsonSerialize(): array
{
return $this->removeEmptyValues($this->toArray());
Expand Down
1 change: 1 addition & 0 deletions src/Models/Contactlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ public function toArray(): array
];
}

#[\ReturnTypeWillChange]
public function jsonSerialize(): array
{
return $this->removeEmptyValues($this->toArray());
Expand Down
1 change: 1 addition & 0 deletions src/Models/CustomFieldDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ public function toArray(): array
];
}

#[\ReturnTypeWillChange]
public function jsonSerialize(): array
{
return $this->removeEmptyValues($this->toArray());
Expand Down
1 change: 1 addition & 0 deletions src/Models/CustomFieldOption.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ public function toArray(): array
];
}

#[\ReturnTypeWillChange]
public function jsonSerialize(): array
{
return $this->removeEmptyValues($this->toArray());
Expand Down
1 change: 1 addition & 0 deletions src/Models/CustomFieldValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ public function toArray(): array
];
}

#[\ReturnTypeWillChange]
public function jsonSerialize(): array
{
return $this->removeEmptyValues($this->toArray());
Expand Down
1 change: 1 addition & 0 deletions src/Models/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public static function fromJSON(\stdClass $json): object
*/
abstract public function toArray(): array;

#[\ReturnTypeWillChange]
public function jsonSerialize(): array
{
return $this->toArray();
Expand Down
1 change: 1 addition & 0 deletions src/Models/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ public function toArray(): array
];
}

#[\ReturnTypeWillChange]
public function jsonSerialize(): array
{
return $this->removeEmptyValues($this->toArray());
Expand Down
1 change: 1 addition & 0 deletions tests/Endpoints/Contactlists/Search/RequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public function testDefaultEndpoint(): void

// The query parameters to send
$query = $value['query'];
$this->assertTrue(is_array($query), 'Query must be an array');
$this->assertArrayHasKey('limit', $query);
$this->assertArrayHasKey('offset', $query);
$this->assertEquals(0, $query['offset'], 'The first page should have 0 offset');
Expand Down
2 changes: 2 additions & 0 deletions tests/Endpoints/Contacts/Search/RequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public function testDefaultEndpoint(): void

// The query parameters to send
$query = $value['query'];
$this->assertTrue(is_array($query), 'Query must be an array');
$this->assertArrayHasKey('limit', $query);
$this->assertArrayHasKey('offset', $query);
$this->assertEquals(0, $query['offset'], 'The first page should have 0 offset');
Expand All @@ -57,6 +58,7 @@ public function testFilteredEndpoint(): void

// The query parameters to send
$query = $value['query'];
$this->assertTrue(is_array($query), 'Query must be an array');
$this->assertArrayHasKey('limit', $query);
$this->assertArrayHasKey('offset', $query);
$this->assertEquals(50, $query['offset'], 'The second page should the limit value');
Expand Down
2 changes: 2 additions & 0 deletions tests/Endpoints/CustomFields/Search/RequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public function testDefaultEndpoint(): void

// The query parameters to send
$query = $value['query'];
$this->assertTrue(is_array($query), 'Query must be an array');
$this->assertArrayHasKey('limit', $query);
$this->assertArrayHasKey('offset', $query);
$this->assertEquals(0, $query['offset'], 'The first page should have 0 offset');
Expand All @@ -58,6 +59,7 @@ public function testFilteredEndpoint(): void

// The query parameters to send
$query = $value['query'];
$this->assertTrue(is_array($query), 'Query must be an array');
$this->assertArrayHasKey('limit', $query);
$this->assertArrayHasKey('offset', $query);
$this->assertEquals(50, $query['offset'], 'The second page should the limit value');
Expand Down
1 change: 1 addition & 0 deletions tests/Mock/ModelMock.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public function toArray(): array
];
}

#[\ReturnTypeWillChange]
public function jsonSerialize(): array
{
return $this->removeEmptyValues($this->toArray());
Expand Down