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

Error with latest patch #3409

Closed
dereuromark opened this issue Jun 8, 2020 · 7 comments
Closed

Error with latest patch #3409

dereuromark opened this issue Jun 8, 2020 · 7 comments

Comments

@dereuromark
Copy link
Contributor

With latest patch the master branch has phpstan false positives on errors:

Method Cake\Http\ServerRequest::input() invoked with 0 parameters, at
least 1 required.

Code snippet that reproduces the problem

$data = $this->input();

and

public function input(?callable $callback = null, ...$args)
{
}

Expected output

No error

@dereuromark
Copy link
Contributor Author

@ondrejmirtes
Copy link
Member

Fixed: ondrejmirtes/BetterReflection@a155b31 + phpstan/phpstan-src@3af7eaf

@dereuromark
Copy link
Contributor Author

You might want to allow also issues @ https://github.com/ondrejmirtes/BetterReflection
Since none of us can use that original library anyway due to 7.4+, we all will have to open tickets sooner or later in your fork.

@ondrejmirtes
Copy link
Member

@dereuromark Hi, I don't plan to support the ondrejmirtes/BetterReflection fork as a separate project, I'm only interested in bugs that manifest in PHPStan.

And I plan to base the fork on the latest Roave/BetterReflection with a script that will transform 7.4 sources to 7.1, similarly to how I already do it in phpstan-src.

@holtkamp
Copy link

@ondrejmirtes, regarding to #3409 (comment), I just tried 0.12.28 and I still have this problem in case an interface is involved:

Parameter #2 $upperCaseFirst of method Translator::translate() is required but parameter #2 $upperCaseFirst of method TranslatorInterface::translate() is optional.

https://phpstan.org/r/b8c4683b-148d-4979-91e7-1e9dfce33310

This might be a different issue, not sure...

@ondrejmirtes
Copy link
Member

@holtkamp Please follow #3443.

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants