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
216216
217217 /**
218218 * @see https://github.com/PHP-DI/PHP-DI/issues/562
219+ * @deprecated
219220 * @test
220221 */
221222 public function should_invoke_callable_with_optional_parameter_before_required_parameter ()
222223 {
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+
223229 $ result = $ this ->invoker ->call (function ($ baz = 'abc ' , $ foo ) {
224230 return [$ baz , $ foo ];
225231 }, [
You can’t perform that action at this time.
0 commit comments