-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
In 8.1 and above, class methods based on an implemented class must have a return type. Without these, PHP will throw a return type mismatch warning or error.
The following code is from Models\BandwidthMessage class, how it is today:
class BandwidthMessage implements \JsonSerializable
{
public function jsonSerialize()
{
$json = array();
//some other code here
return array_filter($json);
}
}
vs. how it must be for PHP 8.1 and above:
class BandwidthMessage implements \JsonSerializable
{
public function jsonSerialize(): array
{
$json = array();
//some other code here
return array_filter($json);
}
}
There are multiple classes in the Bandwidth SDK that "implements" JsonSerializable. There may be other things that make the SDK not fully 8.1 and above compatible but this one stood out as I tested the Messaging SDK under PHP 8.2.5.
See https://www.php.net/manual/en/migration81.incompatible.php
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working