Skip to content

Commit

Permalink
Remove PHP 8.4.* deprecations (#733)
Browse files Browse the repository at this point in the history
Co-authored-by: Maciej Koprek <[email protected]>
  • Loading branch information
mkoprek and Maciej Koprek authored Jan 8, 2025
1 parent fc816b7 commit 76ca2c9
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 17 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:

strategy:
matrix:
php-version: ['7.4', '8.2']
symfony-version: ['4.4', '5.3', '5.4', '6.4', '7.0']
php-version: ['7.4', '8.4']
symfony-version: ['5.4', '6.4', '7.4']
coverage: ['none']
exclude:
- php-version: '7.4'
Expand All @@ -28,16 +28,10 @@ jobs:
symfony-version: '5.4'
coverage: xdebug
- php-version: '8.1'
symfony-version: '6.2'
coverage: 'none'
- php-version: '8.1'
symfony-version: '6.1'
coverage: 'none'
- php-version: '8.1'
symfony-version: '6.3'
symfony-version: '6.4'
coverage: 'none'
- php-version: '8.2'
symfony-version: '6.3'
symfony-version: '6.4'
coverage: 'none'

steps:
Expand Down
2 changes: 1 addition & 1 deletion Command/BaseRabbitMqCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ abstract class BaseRabbitMqCommand extends Command
*/
protected $container;

public function setContainer(ContainerInterface $container = null): void
public function setContainer(?ContainerInterface $container = null): void
{
$this->container = $container;
}
Expand Down
2 changes: 1 addition & 1 deletion DataCollector/MessageDataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __construct($channels)
$this->data = [];
}

public function collect(Request $request, Response $response, \Throwable $exception = null)
public function collect(Request $request, Response $response, ?\Throwable $exception = null)
{
foreach ($this->channels as $channel) {
foreach ($channel->getBasicPublishLog() as $log) {
Expand Down
2 changes: 1 addition & 1 deletion RabbitMq/AMQPConnectionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class AMQPConnectionFactory
public function __construct(
$class,
array $parameters,
ConnectionParametersProviderInterface $parametersProvider = null
?ConnectionParametersProviderInterface $parametersProvider = null
) {
$this->class = $class;
$this->parameters = array_merge($this->parameters, $parameters);
Expand Down
2 changes: 1 addition & 1 deletion RabbitMq/BaseAmqp.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ abstract class BaseAmqp
* @param AMQPChannel|null $ch
* @param string|null $consumerTag
*/
public function __construct(AbstractConnection $conn, AMQPChannel $ch = null, $consumerTag = null)
public function __construct(AbstractConnection $conn, ?AMQPChannel $ch = null, $consumerTag = null)
{
$this->conn = $conn;
$this->ch = $ch;
Expand Down
2 changes: 1 addition & 1 deletion RabbitMq/BatchConsumer.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class BatchConsumer extends BaseAmqp implements DequeuerInterface
/**
* @param \DateTime|null $dateTime
*/
public function setGracefulMaxExecutionDateTime(\DateTime $dateTime = null)
public function setGracefulMaxExecutionDateTime(?\DateTime $dateTime = null)
{
$this->gracefulMaxExecutionDateTime = $dateTime;
}
Expand Down
2 changes: 1 addition & 1 deletion RabbitMq/Consumer.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ protected function isRamAlmostOverloaded()
/**
* @param \DateTime|null $dateTime
*/
public function setGracefulMaxExecutionDateTime(\DateTime $dateTime = null)
public function setGracefulMaxExecutionDateTime(?\DateTime $dateTime = null)
{
$this->gracefulMaxExecutionDateTime = $dateTime;
}
Expand Down
2 changes: 1 addition & 1 deletion RabbitMq/Producer.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected function getBasicProperties()
* @param array $additionalProperties
* @param array $headers
*/
public function publish($msgBody, $routingKey = null, $additionalProperties = [], array $headers = null)
public function publish($msgBody, $routingKey = null, $additionalProperties = [], ?array $headers = null)
{
if ($this->autoSetupFabric) {
$this->setupFabric();
Expand Down

0 comments on commit 76ca2c9

Please sign in to comment.