Skip to content

Commit 8732643

Browse files
committed
Fix PHP8 nullable argument deprecation
We have deprecations of work project due to Api.php constructor ``` eprecated: SensioLabs\Insight\Sdk\Api::__construct(): Implicitly marking parameter $httpClient as nullable is deprecated, the explicit nullable type must be used instead in phar:///usr/bin/insight/Sdk/Api.php on line 42 Deprecated: SensioLabs\Insight\Sdk\Api::__construct(): Implicitly marking parameter $parser as nullable is deprecated, the explicit nullable type must be used instead in phar:///usr/bin/insight/Sdk/Api.php on line 42 Deprecated: SensioLabs\Insight\Sdk\Api::__construct(): Implicitly marking parameter $logger as nullable is deprecated, the explicit nullable type must be used instead in phar:///usr/bin/insight/Sdk/Api.php on line 42 ```
1 parent eea3887 commit 8732643

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sdk/Api.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Api
3939
private $parser;
4040
private $logger;
4141

42-
public function __construct(array $options = [], HttpClientInterface $httpClient = null, Parser $parser = null, LoggerInterface $logger = null)
42+
public function __construct(array $options = [], ?HttpClientInterface $httpClient = null, ?Parser $parser = null, ?LoggerInterface $logger = null)
4343
{
4444
$this->httpClient = $httpClient ?: HttpClient::create();
4545
$this->parser = $parser ?: new Parser();

0 commit comments

Comments
 (0)