@@ -108,50 +108,50 @@ public static function validDataProvider(): iterable
108108
109109 yield 'parameter found and string with regexp filter that matches ' => [
110110 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/ ' ])]),
112112 ['John ' ],
113113 ];
114114
115115 yield 'parameter found and string with regexp filter that falls back to null on failure ' => [
116116 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/ ' ])]),
118118 [null ],
119119 ];
120120
121121 yield 'parameter found and string variadic with regexp filter that matches ' => [
122122 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/ ' ])]),
124124 ['John ' , 'John ' ],
125125 ];
126126
127127 yield 'parameter found and string variadic with regexp filter that falls back to null on failure ' => [
128128 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/ ' ])]),
130130 ['John ' ],
131131 ];
132132
133133 yield 'parameter found and integer ' => [
134- Request::create ('/ ' , 'GET ' , ['age ' => 123 ]),
134+ Request::create ('/ ' , 'GET ' , ['age ' => ' 123 ' ]),
135135 new ArgumentMetadata ('age ' , 'int ' , false , false , false , attributes: [new MapQueryParameter ()]),
136136 [123 ],
137137 ];
138138
139139 yield 'parameter found and integer variadic ' => [
140- Request::create ('/ ' , 'GET ' , ['age ' => [123 , 222 ]]),
140+ Request::create ('/ ' , 'GET ' , ['age ' => [' 123 ' , ' 222 ' ]]),
141141 new ArgumentMetadata ('age ' , 'int ' , true , false , false , attributes: [new MapQueryParameter ()]),
142142 [123 , 222 ],
143143 ];
144144
145145 yield 'parameter found and float ' => [
146- Request::create ('/ ' , 'GET ' , ['price ' => 10.99 ]),
146+ Request::create ('/ ' , 'GET ' , ['price ' => ' 10.99 ' ]),
147147 new ArgumentMetadata ('price ' , 'float ' , false , false , false , attributes: [new MapQueryParameter ()]),
148148 [10.99 ],
149149 ];
150150
151151 yield 'parameter found and float variadic ' => [
152- Request::create ('/ ' , 'GET ' , ['price ' => [10.99 , 5.99 ]]),
152+ Request::create ('/ ' , 'GET ' , ['price ' => [' 10.99e2 ' , ' 5.99 ' ]]),
153153 new ArgumentMetadata ('price ' , 'float ' , true , false , false , attributes: [new MapQueryParameter ()]),
154- [10.99 , 5.99 ],
154+ [1099.0 , 5.99 ],
155155 ];
156156
157157 yield 'parameter found and boolean yes ' => [
@@ -209,7 +209,7 @@ public static function validDataProvider(): iterable
209209 ];
210210
211211 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 ' ]]),
213213 new ArgumentMetadata ('suits ' , Suit::class, false , false , false , attributes: [new MapQueryParameter (flags: \FILTER_NULL_ON_FAILURE )]),
214214 [null ],
215215 ];
@@ -265,7 +265,7 @@ public static function invalidArgumentTypeProvider(): iterable
265265 public static function invalidOrMissingArgumentProvider (): iterable
266266 {
267267 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 ' ]]),
269269 new ArgumentMetadata ('ids ' , 'array ' , true , false , false , attributes: [new MapQueryParameter ()]),
270270 new NotFoundHttpException ('Invalid query parameter "ids". ' ),
271271 ];
0 commit comments