Skip to content

Commit

Permalink
Fix php 8 deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mbonneau committed Feb 18, 2022
1 parent b82fed2 commit bcb7821
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"bin/thruway"
],
"require": {
"php": ">=5.6",
"php": ">=7.1",
"voryx/thruway-common": "^1.0.5",
"thruway/client": "^0.5.0",
"react/event-loop": "^1.0 || ^0.5 || ^0.4.3",
Expand Down
4 changes: 2 additions & 2 deletions src/Authentication/AuthenticationDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,12 @@ public function setAuthExtra($authExtra)
* @return mixed data which can be serialized by <b>json_encode</b>,
* which is a value of any type other than a resource.
*/
public function jsonSerialize()
public function jsonSerialize() : array
{
return [
'authid' => $this->authId,
'auth_method' => $this->authMethod,
'auth_roles' => $this->authRoles,
];
}
}
}
4 changes: 2 additions & 2 deletions tests/WAMP/DisclosePublisherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function testSubscribe()
* Subscribe to event
*/
$session->subscribe('com.example.publish',
function ($args, $kwargs = null, $details, $publicationId = null) {
function ($args, $kwargs, $details, $publicationId = null) {

$this->_testArgs = $args;
$this->_testPublisherId = $details->publisher;
Expand Down Expand Up @@ -96,4 +96,4 @@ function () use ($session) {
$this->assertEquals("internalClient", $this->_testAuthMethod);
$this->assertEquals('com.example.publish', $this->_testTopic);
}
}
}

0 comments on commit bcb7821

Please sign in to comment.