File tree 3 files changed +36
-2
lines changed
3 files changed +36
-2
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,10 @@ private function establishConnection(): SnsClient
105
105
}
106
106
}
107
107
108
+ if (isset ($ this ->config ['http ' ])) {
109
+ $ config ['http ' ] = $ this ->config ['http ' ];
110
+ }
111
+
108
112
$ establishConnection = function () use ($ config ) {
109
113
return (new Sdk (['Sns ' => $ config ]))->createMultiRegionSns ();
110
114
};
@@ -134,6 +138,7 @@ private function parseDsn(string $dsn): array
134
138
'lazy ' => $ dsn ->getBool ('lazy ' ),
135
139
'endpoint ' => $ dsn ->getString ('endpoint ' ),
136
140
'topic_arns ' => $ dsn ->getArray ('topic_arns ' , [])->toArray (),
141
+ 'http ' => $ dsn ->getArray ('http ' , [])->toArray (),
137
142
]), function ($ value ) { return null !== $ value ; });
138
143
}
139
144
@@ -148,6 +153,7 @@ private function defaultConfig(): array
148
153
'lazy ' => true ,
149
154
'endpoint ' => null ,
150
155
'topic_arns ' => [],
156
+ 'http ' => [],
151
157
];
152
158
}
153
159
}
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ public static function provideConfigs()
65
65
'lazy ' => true ,
66
66
'endpoint ' => null ,
67
67
'topic_arns ' => [],
68
+ 'http ' => [],
68
69
],
69
70
];
70
71
@@ -79,6 +80,7 @@ public static function provideConfigs()
79
80
'lazy ' => true ,
80
81
'endpoint ' => null ,
81
82
'topic_arns ' => [],
83
+ 'http ' => [],
82
84
],
83
85
];
84
86
@@ -93,6 +95,7 @@ public static function provideConfigs()
93
95
'lazy ' => true ,
94
96
'endpoint ' => null ,
95
97
'topic_arns ' => [],
98
+ 'http ' => [],
96
99
],
97
100
];
98
101
@@ -107,6 +110,7 @@ public static function provideConfigs()
107
110
'lazy ' => false ,
108
111
'endpoint ' => null ,
109
112
'topic_arns ' => [],
113
+ 'http ' => [],
110
114
],
111
115
];
112
116
@@ -121,6 +125,7 @@ public static function provideConfigs()
121
125
'lazy ' => false ,
122
126
'endpoint ' => null ,
123
127
'topic_arns ' => [],
128
+ 'http ' => [],
124
129
],
125
130
];
126
131
@@ -135,6 +140,7 @@ public static function provideConfigs()
135
140
'lazy ' => false ,
136
141
'endpoint ' => null ,
137
142
'topic_arns ' => [],
143
+ 'http ' => [],
138
144
],
139
145
];
140
146
@@ -155,6 +161,7 @@ public static function provideConfigs()
155
161
'lazy ' => false ,
156
162
'endpoint ' => 'http://localstack:1111 ' ,
157
163
'topic_arns ' => [],
164
+ 'http ' => [],
158
165
],
159
166
];
160
167
@@ -172,6 +179,25 @@ public static function provideConfigs()
172
179
'topic1 ' => 'arn:aws:sns:us-east-1:123456789012:topic1 ' ,
173
180
'topic2 ' => 'arn:aws:sns:us-west-2:123456789012:topic2 ' ,
174
181
],
182
+ 'http ' => [],
183
+ ],
184
+ ];
185
+
186
+ yield [
187
+ ['dsn ' => 'sns:?http[timeout]=5&http[connect_timeout]=2 ' ],
188
+ [
189
+ 'key ' => null ,
190
+ 'secret ' => null ,
191
+ 'token ' => null ,
192
+ 'region ' => null ,
193
+ 'version ' => '2010-03-31 ' ,
194
+ 'lazy ' => true ,
195
+ 'endpoint ' => null ,
196
+ 'topic_arns ' => [],
197
+ 'http ' => [
198
+ 'timeout ' => '5 ' ,
199
+ 'connect_timeout ' => '2 ' ,
200
+ ],
175
201
],
176
202
];
177
203
}
Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ public function testCouldBeConstructedWithEmptyConfiguration()
33
33
'region ' => null ,
34
34
'version ' => '2010-03-31 ' ,
35
35
'endpoint ' => null ,
36
- 'topic_arns ' => [],
36
+ 'topic_arns ' => [],
37
+ 'http ' => [],
37
38
], 'config ' , $ factory );
38
39
}
39
40
@@ -49,7 +50,8 @@ public function testCouldBeConstructedWithCustomConfiguration()
49
50
'region ' => null ,
50
51
'version ' => '2010-03-31 ' ,
51
52
'endpoint ' => null ,
52
- 'topic_arns ' => [],
53
+ 'topic_arns ' => [],
54
+ 'http ' => [],
53
55
], 'config ' , $ factory );
54
56
}
55
57
You can’t perform that action at this time.
0 commit comments