@@ -148,52 +148,57 @@ public function testInvalidValues(string $option, $value): void
148
148
$ this ->processConfiguration ($ input );
149
149
}
150
150
151
- public function invalidValuesProvider (): \ Generator
151
+ public function invalidValuesProvider (): array
152
152
{
153
- yield ['attach_stacktrace ' , 'string ' ];
154
- yield ['before_breadcrumb ' , 'this is not a callable ' ];
155
- yield ['before_breadcrumb ' , [$ this , 'is not a callable ' ]];
156
- yield ['before_breadcrumb ' , false ];
157
- yield ['before_breadcrumb ' , -1 ];
158
- yield ['before_send ' , 'this is not a callable ' ];
159
- yield ['before_send ' , [$ this , 'is not a callable ' ]];
160
- yield ['before_send ' , false ];
161
- yield ['before_send ' , -1 ];
153
+ $ values = [
154
+ ['attach_stacktrace ' , 'string ' ],
155
+ ['before_breadcrumb ' , 'this is not a callable ' ],
156
+ ['before_breadcrumb ' , [$ this , 'is not a callable ' ]],
157
+ ['before_breadcrumb ' , false ],
158
+ ['before_breadcrumb ' , -1 ],
159
+ ['before_send ' , 'this is not a callable ' ],
160
+ ['before_send ' , [$ this , 'is not a callable ' ]],
161
+ ['before_send ' , false ],
162
+ ['before_send ' , -1 ],
163
+ ['context_lines ' , -1 ],
164
+ ['context_lines ' , 99999 ],
165
+ ['context_lines ' , 'string ' ],
166
+ ['default_integrations ' , 'true ' ],
167
+ ['default_integrations ' , 1 ],
168
+ ['enable_compression ' , 'string ' ],
169
+ ['environment ' , '' ],
170
+ ['error_types ' , []],
171
+ ['excluded_exceptions ' , 'some-string ' ],
172
+ ['http_proxy ' , []],
173
+ ['in_app_exclude ' , 'some/single/path ' ],
174
+ ['integrations ' , [1 ]],
175
+ ['integrations ' , 'a string ' ],
176
+ ['logger ' , []],
177
+ ['max_breadcrumbs ' , -1 ],
178
+ ['max_breadcrumbs ' , 'string ' ],
179
+ ['max_value_length ' , -1 ],
180
+ ['max_value_length ' , []],
181
+ ['prefixes ' , 'string ' ],
182
+ ['project_root ' , []],
183
+ ['release ' , []],
184
+ ['sample_rate ' , 1.1 ],
185
+ ['sample_rate ' , -1 ],
186
+ ['send_attempts ' , 1.5 ],
187
+ ['send_attempts ' , 0 ],
188
+ ['send_attempts ' , -1 ],
189
+ ['send_default_pii ' , 'false ' ],
190
+ ['server_name ' , []],
191
+ ['tags ' , 'invalid-unmapped-tag ' ],
192
+ ];
193
+
162
194
if ($ this ->classSerializersAreSupported ()) {
163
- yield ['class_serializers ' , 'this is not a callable ' ];
164
- yield ['class_serializers ' , [$ this , 'is not a callable ' ]];
165
- yield ['class_serializers ' , false ];
166
- yield ['class_serializers ' , -1 ];
195
+ $ values [] = ['class_serializers ' , 'this is not a callable ' ];
196
+ $ values [] = ['class_serializers ' , [$ this , 'is not a callable ' ]];
197
+ $ values [] = ['class_serializers ' , false ];
198
+ $ values [] = ['class_serializers ' , -1 ];
167
199
}
168
- yield ['context_lines ' , -1 ];
169
- yield ['context_lines ' , 99999 ];
170
- yield ['context_lines ' , 'string ' ];
171
- yield ['default_integrations ' , 'true ' ];
172
- yield ['default_integrations ' , 1 ];
173
- yield ['enable_compression ' , 'string ' ];
174
- yield ['environment ' , '' ];
175
- yield ['error_types ' , []];
176
- yield ['excluded_exceptions ' , 'some-string ' ];
177
- yield ['http_proxy ' , []];
178
- yield ['in_app_exclude ' , 'some/single/path ' ];
179
- yield ['integrations ' , [1 ]];
180
- yield ['integrations ' , 'a string ' ];
181
- yield ['logger ' , []];
182
- yield ['max_breadcrumbs ' , -1 ];
183
- yield ['max_breadcrumbs ' , 'string ' ];
184
- yield ['max_value_length ' , -1 ];
185
- yield ['max_value_length ' , []];
186
- yield ['prefixes ' , 'string ' ];
187
- yield ['project_root ' , []];
188
- yield ['release ' , []];
189
- yield ['sample_rate ' , 1.1 ];
190
- yield ['sample_rate ' , -1 ];
191
- yield ['send_attempts ' , 1.5 ];
192
- yield ['send_attempts ' , 0 ];
193
- yield ['send_attempts ' , -1 ];
194
- yield ['send_default_pii ' , 'false ' ];
195
- yield ['server_name ' , []];
196
- yield ['tags ' , 'invalid-unmapped-tag ' ];
200
+
201
+ return $ values ;
197
202
}
198
203
199
204
private function processConfiguration (array $ values ): array
0 commit comments