- Notifications
You must be signed in to change notification settings - Fork 50
Implement DataProviderDataRule #238
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
63 commits Select commit Hold shift + click to select a range
c4597bf Implement DataProviderDataRule
staabm ccff992 report correct line
staabm 0975030 Added DataProviderDataRuleTest
staabm 5c6445a implement CompositeRule
staabm ff6843e cleanup
staabm 1dd180c Implement reflection based dataprovider detection
staabm cff1f79 cs
staabm 0ab211d simplify
staabm 7f7b38b fix
staabm d74aeec Refactor
staabm 09b226b test annotations
staabm f9c8af7 support yield
staabm d3a2b9b support yield from
staabm f42bd8a fix
staabm 3318b73 Support `test` annotation and attribute
staabm f715fbf extract PHPUnitVersionDetector
staabm 67a40d6 fix php 7.4
staabm 6f4dcc9 cs
staabm 20d1408 bleeding edge only
staabm 5cb8c63 test too many/few arguments
staabm 72d5655 report too many/too few with when provider re-used
staabm 1453c20 cleanup
staabm 1506a06 Update extension.neon
staabm 9b69121 use types
staabm 459eb1d support named args
staabm 5fcf01d fix invalid call on null
staabm a978aa8 fix invalid call on null in yield
staabm a1dad84 fix type error
staabm 1d3db54 new TypeExpr(new ObjectType())
staabm 7417fbc test constant array return from delegated method
staabm 74b67cf use CompositeRule from phpstan-src
staabm 5cb7312 fix PHP 7.4
staabm 9ee26b1 Update data-provider-data.php
staabm 4cb9404 test more variadics
staabm 34a0a0e more variadic tests
staabm bb855f0 fix
staabm a56169b Update DataProviderDataRuleTest.php
staabm e31a234 Update DataProviderDataRule.php
staabm 1532c26 support iterables
staabm 68e65e9 test ArrayIterator
staabm 30e27db cleanup
staabm aafaf8f simplify
staabm b6f11fe Report wrongly typed generic arrays
staabm 72dc9e0 simplify
staabm ccb7b04 Fix SA error
ondrejmirtes 8491dd7 Fix CS
ondrejmirtes aea7e42 abstract test-class
staabm a1e5a19 factor out buildArrayTypesFromNode()
staabm 7f9dbf2 test more const array variants
staabm c689efe special case for providers only containing static data, so we get mor…
staabm d6c11be apply static data only special case also for "yield from"
staabm 21740cb moved cheapest check to the front
staabm 41acc04 Failing test - args trimming logic needs some work
ondrejmirtes 807a35f Not a failing test, just checking :)
ondrejmirtes 3fc4e0e separated php8 only tests
staabm 9a0d039 separate named args expectations
staabm daf978e separated more named args tests
staabm 534694d fix arg trimming
staabm 58461d7 more fixes
staabm b36a404 cs
staabm f083e63 Manual mutation testing ep. 1
ondrejmirtes 42ad04e Manual mutation testing ep. 2
ondrejmirtes 0731026 break
ondrejmirtes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
cleanup
- Loading branch information
commit 30e27db0624ad78d35dd5548dc2eb96ce5b1bc9d
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
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 think awkward things will happen when the count of
$exprType->getConstantArrays()or$valueType->getConstantArrays()are > 1. Those are unions of arrays.So you'll treat
array{1}|array{2}as two separate test case invocations, but they're not really? It's more like a single invocation with1|2.But I don't know what to do about arrays of different lengths.
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 just added a few more const array tests. I did not yet experience something awkward.
do you have something specific in mind?
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 think the case you mentioned is already handled here: https://github.com/phpstan/phpstan-phpunit/pull/238/files#diff-84bda20337542c39c298550da2d95bfb9a60ef25f1e3a9ddc0e6840ce463664aR126