Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tests/InvokerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,16 @@ public function should_invoke_callable_with_null_for_non_optional_nullable_param

/**
* @see https://github.com/PHP-DI/PHP-DI/issues/562
* @deprecated
* @test
*/
public function should_invoke_callable_with_optional_parameter_before_required_parameter()
{
if (version_compare(PHP_VERSION, '8.1') >= 0) {
/** @see https://www.php.net/manual/en/migration81.incompatible.php#migration81.incompatible.core.optional-before-required */
$this->markTestSkipped('An optional parameter specified before required parameters is now always treated as required.');
}

$result = $this->invoker->call(function ($baz = 'abc', $foo) {
return [$baz, $foo];
}, [
Expand Down