Skip to content

Commit

Permalink
Update AMQPConnectionFactory.php
Browse files Browse the repository at this point in the history
Fix for creating a stream context from a custom user parameters
  • Loading branch information
GeorgII-web authored Aug 24, 2023
1 parent 8ebaf0d commit 662e726
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions RabbitMq/AMQPConnectionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,15 @@ public function __construct(
$this->parameters['hosts'][$key] = $this->parseUrl($hostParameters);
}

if ($parametersProvider) {
$this->parameters = array_merge($this->parameters, $parametersProvider->getConnectionParameters());
}

if (is_array($this->parameters['ssl_context'])) {
$this->parameters['context'] = ! empty($this->parameters['ssl_context'])
? stream_context_create(['ssl' => $this->parameters['ssl_context']])
: null;
}
if ($parametersProvider) {
$this->parameters = array_merge($this->parameters, $parametersProvider->getConnectionParameters());
}
}

/**
Expand Down

0 comments on commit 662e726

Please sign in to comment.