Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Messenger] Fix invalid option sslmode in AmazonSqs bridge #37654

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

Merged
merged 1 commit into from
Jul 31, 2020

Conversation

jderusse
Copy link
Member

Q A
Branch? 5.1
Bug fix? yes
New feature? no
Deprecations? no
Tickets />
License MIT
Doc PR /

The sslmode option allows people to use AmazonSqs with non-offical endpoint like the asyncaws/testing-sqs docker image

By fixing precedence of DNS options in #37269 I introduced a bug that trigger an exception Unknown option found: [sslmode]. I apologize for this

This PR adds sslmode in list of allowed options

@jderusse jderusse requested a review from sroze as a code owner July 24, 2020 10:24
@jderusse jderusse force-pushed the fix-sslmode-option branch 3 times, most recently from cea413e to fa8672b Compare July 24, 2020 10:36
@@ -94,6 +95,19 @@ public static function fromDsn(string $dsn, array $options = [], HttpClientInter
if (isset($parsedUrl['query'])) {
parse_str($parsedUrl['query'], $query);
}

// check for extra keys in options
$optionsExtraKeys = array_diff(array_keys($options), array_keys(self::DEFAULT_OPTIONS));
Copy link
Member Author

@jderusse jderusse Jul 24, 2020

Choose a reason for hiding this comment

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

moved the checks before the merge of $options = $query + $options to distinguish errors in option and dsn.
maybe it doesn't worth it, and we should just keep the first check on options

@jderusse jderusse force-pushed the fix-sslmode-option branch from fa8672b to afbd51b Compare July 24, 2020 11:54
@xabbuh xabbuh added this to the 5.1 milestone Jul 27, 2020
@nicolas-grekas nicolas-grekas changed the title Fix invalid option sslmode [Messenger] Fix invalid option sslmode in AmazonSqs bridge Jul 29, 2020
@migo315
Copy link

migo315 commented Jul 29, 2020

Tested your changes locally (have same problem) and worked for me 👍

migo315 added a commit to bestit/amazon-sqs-messenger that referenced this pull request Jul 30, 2020
@fabpot
Copy link
Member

fabpot commented Jul 31, 2020

Thank you @jderusse.

@fabpot fabpot merged commit bfc0351 into symfony:5.1 Jul 31, 2020
@fabpot fabpot mentioned this pull request Aug 31, 2020
@jderusse jderusse deleted the fix-sslmode-option branch October 15, 2020 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants