-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feature: add PhpUnitDataProviderStaticFixer #6702
feature: add PhpUnitDataProviderStaticFixer #6702
Conversation
Pull Request Test Coverage Report for Build 3833873772
💛 - Coveralls |
$tokensAnalyzer = new TokensAnalyzer($tokens); | ||
|
||
$inserts = []; | ||
foreach ($dataProviderAnalyzer->getDataProviders($tokens, $startIndex, $endIndex) as $dataProviderAnalysis) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder about functional programming here... yeah - totally out of scope of this PR. but hey... DS\Vector?
looks like:
$allAnalysis
->filter(check for $this usage)
->map(convert to `function` index)
->filter(check if already static)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like fun, for refactoring, especially the part with figuring out how to handle keys in this case.
Co-authored-by: Dariusz Rumiński <dariusz.ruminski@gmail.com>
Non-static data providers will be deprecated in PHPUnit 10 and removed in PHPUnit 11.
(fixer that actually made: #6696)