Skip to content

Commit

Permalink
Merge pull request #157 from clue-labs/nullable-v3
Browse files Browse the repository at this point in the history
Improve PHP 8.4+ support by avoiding implicitly nullable types
  • Loading branch information
clue authored Aug 8, 2024
2 parents 2cec53c + a4d4773 commit b24e0ec
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
],
"require": {
"php": ">=7.1",
"clue/redis-protocol": "0.3.*",
"clue/redis-protocol": "^0.3.2",
"evenement/evenement": "^3.0 || ^2.0 || ^1.0",
"react/event-loop": "^1.2",
"react/promise": "^3",
"react/socket": "^1.15"
"react/promise": "^3.2",
"react/socket": "^1.16"
},
"require-dev": {
"phpstan/phpstan": "1.10.15 || 1.4.10",
"phpunit/phpunit": "^9.6 || ^7.5",
"react/async": "^4.2 || ^3.2"
"react/async": "^4.3 || ^3.2"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion src/Io/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Factory
* @param ?ConnectorInterface $connector
* @param ?ProtocolFactory $protocol
*/
public function __construct(ConnectorInterface $connector = null, ProtocolFactory $protocol = null)
public function __construct(?ConnectorInterface $connector = null, ?ProtocolFactory $protocol = null)
{
$this->connector = $connector ?: new Connector();
$this->protocol = $protocol ?: new ProtocolFactory();
Expand Down
2 changes: 1 addition & 1 deletion src/RedisClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class RedisClient extends EventEmitter
/** @var array<string,bool> */
private $psubscribed = [];

public function __construct(string $url, ConnectorInterface $connector = null)
public function __construct(string $url, ?ConnectorInterface $connector = null)
{
$args = [];
\parse_str((string) \parse_url($url, \PHP_URL_QUERY), $args);
Expand Down

0 comments on commit b24e0ec

Please sign in to comment.