Skip to content

Commit

Permalink
Add PHP 8.4 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Fridlund authored and sergeyklay committed Dec 21, 2024
1 parent 39e35bc commit dd15fbe
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/Jaeger/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ public function getLogger()
*/
public function __construct(
array $config,
string $serviceName = null,
LoggerInterface $logger = null,
CacheItemPoolInterface $cache = null
?string $serviceName = null,
?LoggerInterface $logger = null,
?CacheItemPoolInterface $cache = null
) {
$this->config = $config;

Expand Down
2 changes: 1 addition & 1 deletion src/Jaeger/Reporter/LoggingReporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class LoggingReporter implements ReporterInterface
*
* @param LoggerInterface|null $logger
*/
public function __construct(LoggerInterface $logger = null)
public function __construct(?LoggerInterface $logger = null)
{
$this->logger = $logger ?? new NullLogger();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Jaeger/ScopeManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function getActive(): ?OTScope
* Sets the scope as active.
* @param OTScope|null $scope
*/
public function setActive(OTScope $scope = null)
public function setActive(?OTScope $scope = null)
{
$this->active = $scope;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Jaeger/Sender/JaegerSender.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ class JaegerSender implements SenderInterface
*/
public function __construct(
AgentIf $agentClient,
LoggerInterface $logger = null,
SpanToJaegerMapper $mapper = null
?LoggerInterface $logger = null,
?SpanToJaegerMapper $mapper = null
) {
$this->agentClient = $agentClient;
$this->logger = $logger ?? new NullLogger();
Expand Down
2 changes: 1 addition & 1 deletion src/Jaeger/Sender/UdpSender.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class UdpSender
public function __construct(
AgentClient $client,
int $maxBufferLength,
LoggerInterface $logger = null
?LoggerInterface $logger = null
) {
$this->client = $client;
$this->maxBufferLength = $maxBufferLength;
Expand Down
2 changes: 1 addition & 1 deletion src/Jaeger/ThriftUdpTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ThriftUdpTransport extends TTransport
* @param int $port
* @param LoggerInterface $logger
*/
public function __construct(string $host, int $port, LoggerInterface $logger = null, Config $config = null)
public function __construct(string $host, int $port, ?LoggerInterface $logger = null, ?Config $config = null)
{
$this->setLogger($logger);

Expand Down
4 changes: 2 additions & 2 deletions src/Jaeger/Tracer.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ public function __construct(
ReporterInterface $reporter,
SamplerInterface $sampler,
$oneSpanPerRpc = true,
LoggerInterface $logger = null,
ScopeManager $scopeManager = null,
?LoggerInterface $logger = null,
?ScopeManager $scopeManager = null,
$traceIdHeader = TRACE_ID_HEADER,
$baggageHeaderPrefix = BAGGAGE_HEADER_PREFIX,
$debugIdHeader = DEBUG_ID_HEADER_KEY,
Expand Down

0 comments on commit dd15fbe

Please sign in to comment.