Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add support for using a pre-configured client with the SQS driver #444

Merged
merged 9 commits into from
Jul 10, 2018
Merged

WIP: Add support for using a pre-configured client with the SQS driver #444

merged 9 commits into from
Jul 10, 2018

Conversation

elazar
Copy link
Contributor

@elazar elazar commented May 14, 2018

This is a work-in-progress and relates to #443.

Many thanks to @rpkamp and @dbrumann for their assistance!

@@ -38,7 +39,9 @@ class SqsConnectionFactory implements PsrConnectionFactory
*/
public function __construct($config = 'sqs:')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the constructor should accept an instance of Client, no need to pass it as an array parameter. We would not be able to apply other options in the array in any case.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The symfony transport should have it as a client option though

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@elazar
Copy link
Contributor Author

elazar commented May 14, 2018

@makasim Any suggestions on what I might be doing wrong with the bundle configuration change?

@makasim
Copy link
Member

makasim commented May 14, 2018

@elazar I've not spotted anything suspicion, gonna take a closer look later.

@elazar
Copy link
Contributor Author

elazar commented May 25, 2018

I've not spotted anything suspicion, gonna take a closer look later.

@makasim Bump. 😉

@@ -34,6 +34,7 @@ public function addConfiguration(ArrayNodeDefinition $builder)
{
$builder
->children()
->scalarNode('client')->defaultNull()->end()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect there to be something like the following in createConnectionFactory() below:

if (false == empty($config['client'])) {
    $config['client'] = new Reference($config['client']);
}

@makasim makasim merged commit 5ab85df into php-enqueue:master Jul 10, 2018
ASKozienko pushed a commit that referenced this pull request Nov 2, 2018
…ient

WIP: Add support for using a pre-configured client with the SQS driver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants