Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: PHPUnit 10.3 support #62

Closed

Conversation

michalbundyra
Copy link
Member

No description provided.

Copy link
Contributor

@marcoscoelho marcoscoelho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

however, if the var cannot be changed by ref. it will not make sense to call the implementation.

@@ -38,7 +38,7 @@ public function matches(Invocation $invocation) : bool
$iClass ? Invocation::class : Invocation\StaticInvocation::class
);
} else {
MockFunctionGenerator::removeDefaultArguments($invocation->parameters);
MockFunctionGenerator::removeDefaultArguments($invocation->parameters());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix only vars can be passed as reference.

Suggested change
MockFunctionGenerator::removeDefaultArguments($invocation->parameters());
$paramaters = $invocation->parameters();
MockFunctionGenerator::removeDefaultArguments($paramaters);

@@ -73,7 +73,7 @@ public function toString() : string
private function removeDefaultArguments(Invocation $invocation, string $class)
{
$remover = function () {
MockFunctionGenerator::removeDefaultArguments($this->parameters);
MockFunctionGenerator::removeDefaultArguments($this->parameters());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix only vars can be passed as reference.

Suggested change
MockFunctionGenerator::removeDefaultArguments($this->parameters());
$paramaters = $this->parameters();
MockFunctionGenerator::removeDefaultArguments($paramaters);

@michalbundyra
Copy link
Member Author

Closing in favour of #63

@michalbundyra michalbundyra deleted the feat/phpunit-10.3 branch October 27, 2023 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants