Skip to content

Commit

Permalink
Fix 'Deprecated: Return type of Pronamic\WordPress\Pay\Gateways\Adyen…
Browse files Browse the repository at this point in the history
…\Amount::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice'.
  • Loading branch information
rvdsteege committed Jan 9, 2024
1 parent dbe1ff2 commit 3903415
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/AdditionalData.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ public function get_json() {
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
* @return object
*/
#[\ReturnTypeWillChange]
public function jsonSerialize() {
return $this->get_json();
}
Expand Down
1 change: 1 addition & 0 deletions src/Amount.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public function get_json() {
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
* @return object
*/
#[\ReturnTypeWillChange]
public function jsonSerialize() {
return $this->get_json();
}
Expand Down
1 change: 1 addition & 0 deletions src/ApplicationInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public function get_json() {
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
* @return object
*/
#[\ReturnTypeWillChange]
public function jsonSerialize() {
return $this->get_json();
}
Expand Down
1 change: 1 addition & 0 deletions src/LineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ public function get_json() {
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
* @return object
*/
#[\ReturnTypeWillChange]
public function jsonSerialize() {
return $this->get_json();
}
Expand Down
1 change: 1 addition & 0 deletions src/LineItems.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ function( LineItem $item ) {
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
* @return array<object>
*/
#[\ReturnTypeWillChange]
public function jsonSerialize() {
return $this->get_json();
}
Expand Down

0 comments on commit 3903415

Please sign in to comment.