File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -216,10 +216,16 @@ public function should_invoke_callable_with_null_for_non_optional_nullable_param
216
216
217
217
/**
218
218
* @see https://github.com/PHP-DI/PHP-DI/issues/562
219
+ * @deprecated
219
220
* @test
220
221
*/
221
222
public function should_invoke_callable_with_optional_parameter_before_required_parameter ()
222
223
{
224
+ if (version_compare (PHP_VERSION , '8.1 ' ) >= 0 ) {
225
+ /** @see https://www.php.net/manual/en/migration81.incompatible.php#migration81.incompatible.core.optional-before-required */
226
+ $ this ->markTestSkipped ('An optional parameter specified before required parameters is now always treated as required. ' );
227
+ }
228
+
223
229
$ result = $ this ->invoker ->call (function ($ baz = 'abc ' , $ foo ) {
224
230
return [$ baz , $ foo ];
225
231
}, [
You can’t perform that action at this time.
0 commit comments