@@ -108,50 +108,50 @@ public static function validDataProvider(): iterable
108
108
109
109
yield 'parameter found and string with regexp filter that matches ' => [
110
110
Request::create ('/ ' , 'GET ' , ['firstName ' => 'John ' ]),
111
- new ArgumentMetadata ('firstName ' , 'string ' , false , false , false , attributes: [new MapQueryParameter (filter: \ FILTER_VALIDATE_REGEXP , flags: \ FILTER_NULL_ON_FAILURE , options: ['regexp ' => '/John/ ' ])]),
111
+ new ArgumentMetadata ('firstName ' , 'string ' , false , false , false , attributes: [new MapQueryParameter (options: ['regexp ' => '/John/ ' ])]),
112
112
['John ' ],
113
113
];
114
114
115
115
yield 'parameter found and string with regexp filter that falls back to null on failure ' => [
116
116
Request::create ('/ ' , 'GET ' , ['firstName ' => 'Fabien ' ]),
117
- new ArgumentMetadata ('firstName ' , 'string ' , false , false , false , attributes: [new MapQueryParameter (filter: \ FILTER_VALIDATE_REGEXP , flags: \FILTER_NULL_ON_FAILURE , options: ['regexp ' => '/John/ ' ])]),
117
+ new ArgumentMetadata ('firstName ' , 'string ' , false , false , false , attributes: [new MapQueryParameter (flags: \FILTER_NULL_ON_FAILURE , options: ['regexp ' => '/John/ ' ])]),
118
118
[null ],
119
119
];
120
120
121
121
yield 'parameter found and string variadic with regexp filter that matches ' => [
122
122
Request::create ('/ ' , 'GET ' , ['firstName ' => ['John ' , 'John ' ]]),
123
- new ArgumentMetadata ('firstName ' , 'string ' , true , false , false , attributes: [new MapQueryParameter (filter: \ FILTER_VALIDATE_REGEXP , flags: \ FILTER_NULL_ON_FAILURE , options: ['regexp ' => '/John/ ' ])]),
123
+ new ArgumentMetadata ('firstName ' , 'string ' , true , false , false , attributes: [new MapQueryParameter (options: ['regexp ' => '/John/ ' ])]),
124
124
['John ' , 'John ' ],
125
125
];
126
126
127
127
yield 'parameter found and string variadic with regexp filter that falls back to null on failure ' => [
128
128
Request::create ('/ ' , 'GET ' , ['firstName ' => ['John ' , 'Fabien ' ]]),
129
- new ArgumentMetadata ('firstName ' , 'string ' , true , false , false , attributes: [new MapQueryParameter (filter: \ FILTER_VALIDATE_REGEXP , flags: \FILTER_NULL_ON_FAILURE , options: ['regexp ' => '/John/ ' ])]),
129
+ new ArgumentMetadata ('firstName ' , 'string ' , true , false , false , attributes: [new MapQueryParameter (flags: \FILTER_NULL_ON_FAILURE , options: ['regexp ' => '/John/ ' ])]),
130
130
['John ' ],
131
131
];
132
132
133
133
yield 'parameter found and integer ' => [
134
- Request::create ('/ ' , 'GET ' , ['age ' => 123 ]),
134
+ Request::create ('/ ' , 'GET ' , ['age ' => ' 123 ' ]),
135
135
new ArgumentMetadata ('age ' , 'int ' , false , false , false , attributes: [new MapQueryParameter ()]),
136
136
[123 ],
137
137
];
138
138
139
139
yield 'parameter found and integer variadic ' => [
140
- Request::create ('/ ' , 'GET ' , ['age ' => [123 , 222 ]]),
140
+ Request::create ('/ ' , 'GET ' , ['age ' => [' 123 ' , ' 222 ' ]]),
141
141
new ArgumentMetadata ('age ' , 'int ' , true , false , false , attributes: [new MapQueryParameter ()]),
142
142
[123 , 222 ],
143
143
];
144
144
145
145
yield 'parameter found and float ' => [
146
- Request::create ('/ ' , 'GET ' , ['price ' => 10.99 ]),
146
+ Request::create ('/ ' , 'GET ' , ['price ' => ' 10.99 ' ]),
147
147
new ArgumentMetadata ('price ' , 'float ' , false , false , false , attributes: [new MapQueryParameter ()]),
148
148
[10.99 ],
149
149
];
150
150
151
151
yield 'parameter found and float variadic ' => [
152
- Request::create ('/ ' , 'GET ' , ['price ' => [10.99 , 5.99 ]]),
152
+ Request::create ('/ ' , 'GET ' , ['price ' => [' 10.99e2 ' , ' 5.99 ' ]]),
153
153
new ArgumentMetadata ('price ' , 'float ' , true , false , false , attributes: [new MapQueryParameter ()]),
154
- [10.99 , 5.99 ],
154
+ [1099.0 , 5.99 ],
155
155
];
156
156
157
157
yield 'parameter found and boolean yes ' => [
@@ -209,7 +209,7 @@ public static function validDataProvider(): iterable
209
209
];
210
210
211
211
yield 'parameter found and backing type variadic and at least one backing value not int nor string that fallbacks to null on failure ' => [
212
- Request::create ('/ ' , 'GET ' , ['suits ' => [1 , 'D ' ]]),
212
+ Request::create ('/ ' , 'GET ' , ['suits ' => [' 1 ' , 'D ' ]]),
213
213
new ArgumentMetadata ('suits ' , Suit::class, false , false , false , attributes: [new MapQueryParameter (flags: \FILTER_NULL_ON_FAILURE )]),
214
214
[null ],
215
215
];
@@ -265,7 +265,7 @@ public static function invalidArgumentTypeProvider(): iterable
265
265
public static function invalidOrMissingArgumentProvider (): iterable
266
266
{
267
267
yield 'parameter found and array variadic with parameter not array failure ' => [
268
- Request::create ('/ ' , 'GET ' , ['ids ' => [['1 ' , '2 ' ], 1 ]]),
268
+ Request::create ('/ ' , 'GET ' , ['ids ' => [['1 ' , '2 ' ], ' 1 ' ]]),
269
269
new ArgumentMetadata ('ids ' , 'array ' , true , false , false , attributes: [new MapQueryParameter ()]),
270
270
new NotFoundHttpException ('Invalid query parameter "ids". ' ),
271
271
];
0 commit comments