Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: [7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3]
php-version: [7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4]
protocol: [ 'json', 'msgpack' ]
ignorePlatformReq: [ '' ]

Expand Down
4 changes: 2 additions & 2 deletions src/Models/BaseMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function fromJSON( $json, $keepOriginal = false ) {
* @param stdClass $obj Message-like object
* @param CipherParams|null $cipherParams
*/
public static function fromEncoded( $obj, CipherParams $cipherParams = null ) {
public static function fromEncoded( $obj, ?CipherParams $cipherParams = null ) {
$class = get_called_class();

$msg = new $class();
Expand All @@ -138,7 +138,7 @@ public static function fromEncoded( $obj, CipherParams $cipherParams = null ) {
* @param array $objs Array of Message-Like objects
* @param CipherParams|null $cipherParams
*/
public static function fromEncodedArray( $objs, CipherParams $cipherParams = null ) {
public static function fromEncodedArray( $objs, ?CipherParams $cipherParams = null ) {
return array_map(
function( $obj ) use ($cipherParams) { return static::fromEncoded($obj, $cipherParams); },
$objs
Expand Down
4 changes: 3 additions & 1 deletion tests/ChannelMessagesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,9 @@ public function testEncodingInteroperabilityAblyToRaw() {
$msg = $history[$i];

$this->assertEquals($testMsgData->data, $msg->data);
$this->assertEquals($testMsgData->encoding, $msg->encoding);
if (property_exists($msg, 'encoding')) {
$this->assertEquals($testMsgData->encoding, $msg->encoding);
}
}

}
Expand Down