Skip to content

Commit

Permalink
fix: Fixed language level deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
JimTools committed Jan 19, 2025
1 parent 0b4bf23 commit c64b4aa
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pkg/enqueue/Client/DriverFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private function findDriverInfo(Dsn $dsn, array $factories): ?array
private function createRabbitMqStompDriver(ConnectionFactory $factory, Dsn $dsn, Config $config, RouteCollection $collection): RabbitMqStompDriver
{
$defaultManagementHost = $dsn->getHost() ?: $config->getTransportOption('host', 'localhost');
$managementVast = ltrim($dsn->getPath(), '/') ?: $config->getTransportOption('vhost', '/');
$managementVast = ltrim($dsn->getPath() ?? '', '/') ?: $config->getTransportOption('vhost', '/');

$managementClient = StompManagementClient::create(
urldecode($managementVast),
Expand Down
2 changes: 1 addition & 1 deletion pkg/enqueue/Symfony/Client/ConsumeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
try {
$consumer = $this->getQueueConsumer($client);
} catch (NotFoundExceptionInterface $e) {
throw new \LogicException(sprintf('Client "%s" is not supported.', $client), null, $e);
throw new \LogicException(sprintf('Client "%s" is not supported.', $client), 0, $e);
}

$driver = $this->getDriver($client);
Expand Down
2 changes: 1 addition & 1 deletion pkg/enqueue/Symfony/Client/ProduceCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
try {
$producer = $this->getProducer($client);
} catch (NotFoundExceptionInterface $e) {
throw new \LogicException(sprintf('Client "%s" is not supported.', $client), null, $e);
throw new \LogicException(sprintf('Client "%s" is not supported.', $client), 0, $e);
}

if ($topic) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/enqueue/Symfony/Client/RoutesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
try {
$this->driver = $this->getDriver($input->getOption('client'));
} catch (NotFoundExceptionInterface $e) {
throw new \LogicException(sprintf('Client "%s" is not supported.', $input->getOption('client')), null, $e);
throw new \LogicException(sprintf('Client "%s" is not supported.', $input->getOption('client')), 0, $e);
}

$routes = $this->driver->getRouteCollection()->all();
Expand Down
2 changes: 1 addition & 1 deletion pkg/enqueue/Symfony/Client/SetupBrokerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
try {
$this->getDriver($client)->setupBroker(new ConsoleLogger($output));
} catch (NotFoundExceptionInterface $e) {
throw new \LogicException(sprintf('Client "%s" is not supported.', $client), null, $e);
throw new \LogicException(sprintf('Client "%s" is not supported.', $client), 0, $e);
}

$output->writeln('Broker set up');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
try {
$consumer = $this->getQueueConsumer($transport);
} catch (NotFoundExceptionInterface $e) {
throw new \LogicException(sprintf('Transport "%s" is not supported.', $transport), null, $e);
throw new \LogicException(sprintf('Transport "%s" is not supported.', $transport), 0, $e);
}

$this->setQueueConsumerOptions($consumer, $input);
Expand Down
2 changes: 1 addition & 1 deletion pkg/enqueue/Symfony/Consumption/ConsumeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
// QueueConsumer must be pre configured outside of the command!
$consumer = $this->getQueueConsumer($transport);
} catch (NotFoundExceptionInterface $e) {
throw new \LogicException(sprintf('Transport "%s" is not supported.', $transport), null, $e);
throw new \LogicException(sprintf('Transport "%s" is not supported.', $transport), 0, $e);
}

$this->setQueueConsumerOptions($consumer, $input);
Expand Down
2 changes: 1 addition & 1 deletion pkg/job-queue/Test/DbalPersistedConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ private function wrapTransactionNestingLevel($method)
$this->setTransactionNestingLevel($this->getPersistedTransactionNestingLevel());

try {
call_user_func(['parent', $method]);
call_user_func([parent::class, $method]);
} catch (\Exception $e) {
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/redis/PhpRedis.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ public function connect(): void
$this->config['port'],
$this->config['timeout'],
$this->config['persistent'] ? ($this->config['phpredis_persistent_id'] ?? null) : null,
$this->config['phpredis_retry_interval'] ?? null,
$this->config['read_write_timeout']
$this->config['phpredis_retry_interval'] ?? 0,
$this->config['read_write_timeout'] ?? 0
);

if (false == $result) {
Expand Down

0 comments on commit c64b4aa

Please sign in to comment.