-
Notifications
You must be signed in to change notification settings - Fork 59
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
Verify method, function, property, constant and interface changes and report BC breaks #38
Merged
Merged
Changes from 24 commits
Commits
Show all changes
111 commits
Select commit
Hold shift + click to select a range
42def53
Adding an utility to check if covariance is being respected in a type…
Ocramius 709b22a
Simplified nested conditional that could have been a boolean expression
Ocramius a2741a9
Simplified more nested conditionals that could have been boolean expr…
Ocramius 7c73cd1
Completed covariance and contravariance type comparators
Ocramius ee3bfce
Adding IDE hints for the reflection issues around the `Reflector` int…
Ocramius f5d93f0
Adding IDE hints for the reflection issues around the `Reflector` int…
Ocramius b522b08
Considering type nullability in variance and covariance checks
Ocramius cd198fa
Using an internal `ReflectionType` to preload target `ReflectionClass…
Ocramius ed255c8
Revert "Using an internal `ReflectionType` to preload target `Reflect…
Ocramius e38ca3a
Leveraging improved `ReflectionType` API from https://github.com/Roav…
Ocramius 1de6f6f
Type BC break detector that can detect variance issues with return ty…
Ocramius 7916b00
Coverage declarations
Ocramius 94b8dd8
Multi function-based checker
Ocramius ebf80fe
Verifying covariance also on `ReflectionMethod`, not just on `Reflect…
Ocramius e53bbf2
Parameter type contravariance checks
Ocramius 4684c13
Improved `Change` wording for return type covariance checks
Ocramius dc8e3f2
Naive `RequiredParameterAmountIncreased` BC checker
Ocramius 51c1d28
Massively simplified `RequiredParameterAmountIncreased` checker by le…
Ocramius d6c8dff
BC comparator detecting default value changes
Ocramius 61a83cd
Cleaning up comparator so it detects class and function changes via i…
Ocramius 32b58d5
Passing a dummy `FunctionBased` comparator to the `Comparator` constr…
Ocramius 6816ead
BC compliance check that verifies is a class became `final`
Ocramius f9c41dc
#41 detect by-ref to by-val return value changes as BC breaks
Ocramius c2173ba
#41 detect by-ref to/from by-val parameter changes as BC breaks
Ocramius 46294b9
Removing duplicate testing of open class to final class => moved to d…
Ocramius 299bc52
Verifying that migrating between accessible static-methods and instan…
Ocramius 63e6147
Detecting property default value changes
Ocramius 44c01f4
Detecting property scope changes
Ocramius dd5cabd
Comparator looking for reduced property visibility
Ocramius cc79887
Removing duplicate over-complicated `PropertyVisibilityReduced` checker
Ocramius b05cf6b
BC compliance detector that looks for API documentation type changes …
Ocramius 9e365b8
Adding `MultiPropertyBased` checker that spans over multiple `Propert…
Ocramius 83f51b7
Start to build method-based BC comparators
Ocramius 94eaef4
Wrapper class that checks methods against function checks when a meth…
Ocramius 2d158b6
Adding `ClassConstant`-based checks
Ocramius 74bac0e
Moved constant value checks into their own `ConstantBased` checks nam…
Ocramius 5a4af0d
Removed plural from singular type variable
Ocramius 0d33cd0
Adding checker for constant visibility reduction - prevents decreasin…
Ocramius e689e57
Making it clear that current `ConstantBased` checks are actually `Cla…
Ocramius 15c380c
Moving `MethodScopeChanged` into the `MethodBased` namespace, working…
Ocramius 5c4ce73
Moved method visibility reduction checks to their own `MethodBased` n…
Ocramius b70359d
BC comparator to check for added interface methods
Ocramius cc3db45
Delegating almost all `Comparator` operations into the specific `Roav…
Ocramius b583e96
Wiring up the comparator! All aboard! \o/
Ocramius 5d38212
Corrected inline hint syntax as per phpstan reports
Ocramius 2a97ece
Bumping BetterReflection version to a development version (required t…
Ocramius f433805
Un-shallow clone so that we don't get errors when trying to perform d…
Ocramius eb3109c
Verifying that `PropertyDocumentedTypeChanged` does not consider `pri…
Ocramius 6425f24
Removing unused interface implementations from `Roave\ApiCompare\Chan…
Ocramius 9430e96
Revert "Removing unused interface implementations from `Roave\ApiComp…
Ocramius 10e2870
Verifying that sub-comparators are not used when symbols disappear fr…
Ocramius 97d2186
Changing a method from concrete to `abstract` is a BC break - added a…
Ocramius c382a88
BC check for classes becoming abstract
Ocramius b3ad51f
BC check for classes becoming interfaces
Ocramius dcb4d2c
Adding a way to check multiple interface changes at once
Ocramius 185d85d
Adding a BC check to see if an interface became a class
Ocramius 8bd8141
BC check to verify if a method became `final`
Ocramius 9c5cdfd
Requiring `roave/better-reflection` as `dev-master`, since https://gi…
Ocramius 06d1633
Re-introduced comment about why visibility checks work on strings too
Ocramius 32a7a58
Abstraction to retrieve the name of a function or a method
Ocramius d22809b
Abstraction to retrieve the name of a property
Ocramius a59a2d2
Re-using function/property name abstractions across the codebase to d…
Ocramius d4ab86a
Re-introduced comment about why visibility checks work on strings too
Ocramius 3f6b5b2
Comparator that only checks accessible properties
Ocramius 2019497
Deferring "visibility" checks to `AccessiblePropertyChanged` - `priva…
Ocramius bcd0dba
Change checker to verify only accessible methods
Ocramius de5d5ed
Segregated checking accessible methods in the `AccessibleMethodChange…
Ocramius e781373
Introduced a `PropertyChanged` comparator that verifies all shared pr…
Ocramius bc5bf95
Using the `PropertyChanged` comparator instead of having dedicated co…
Ocramius b7f3bbc
Introduced a `MethodChanged` comparator that verifies all shared meth…
Ocramius 3478549
Using the `MethodChanged` comparator instead of having dedicated code…
Ocramius 04c635e
Introduced a `ConstantChanged` comparator that verifies all shared co…
Ocramius a8b3520
Verifying that `array` -> `iterable` is not covariant, while `iterabl…
Ocramius 28b1596
Using the `ConstantChanged` comparator instead of having dedicated co…
Ocramius 8115c6e
Verifying `Changes#mergeWith()` API
Ocramius e1a015e
Utilities to verify open/closed class changes
Ocramius 9ac53f8
Checker that verifies if a function parameter changed type (at all)
Ocramius 23e3de7
Checker that verifies if a function return type changed (at all)
Ocramius ce49948
Checking if a non-final class has invariant changes, while final clas…
Ocramius d17f1bb
Correcting phpstan detected static analysis issues
Ocramius ade49b3
Corrected phpcs detected issues
Ocramius 161dc76
XSD reference for phpcs and phpunit
Ocramius 894efb4
Applying `doctrine/coding-standard` changes
Ocramius 2e9a69f
Applying `doctrine/coding-standard` changes, excluding problematic paths
Ocramius b005906
Renamed `Multi*Based` classes to `MultipleChecksOnA*` for clarity
Ocramius 33be9dc
Added filters to check only public/protected methods
Ocramius bf54571
Checks to verify only public/protected properties
Ocramius 71a0546
Filters to check only public or protected class constants
Ocramius 3302bf5
Naming consistency: `Change` (imperative) vs `Changed` (past/query-form)
Ocramius 674e46d
Moved reflection-based checks out of the `Reflector#reflect()` call t…
Ocramius 74de350
Corrected reference to non-existing interface (which was renamed)
Ocramius 2d52ed3
Applied CS changes according to configured coding standards
Ocramius 263a9a9
Separating `public` and `protected` checks for class BC detection - f…
Ocramius b9216bc
Introduced basic trait-based checks
Ocramius fe838c2
BC compliance checks to verify if a class/trait/interface became one …
Ocramius cde7708
Removed unused imports
Ocramius e77df74
Adapters to use class-based checks on interfaces/traits
Ocramius c94b665
Verifying `Changes#count()` behavior
Ocramius edb5259
Verifying that `iterable` and non-`array` scalars are not covariant i…
Ocramius 8f30e48
Removed redundant `Comparator` check, as detected by mutation tests
Ocramius dc4914c
Verifying that a single change in the result is sufficient to trigger…
Ocramius 40d50e6
Getting rid of possible issues with `in_array()`, which doesn't guara…
Ocramius 6f87995
Using non-strict `in_array()` checks to avoid copying data around wit…
Ocramius 2ac4760
Documented `ArrayHelpers` as `@internal`
Ocramius 783e8b2
Removed redundant `getOption() !== null` check - the option is either…
Ocramius f598aa8
Adding `infection/infection` to the build matrix
Ocramius 424aefc
Treating class, interface and trait as completely distinct symbols wi…
Ocramius 92c07a7
Automated CS fixes as per our phpcs rules
Ocramius 943dd95
#38 removed same-class assertions as per @asgrim's review
Ocramius 8c62056
#38 imported constants are before imported functions
Ocramius 361754c
#38 s/interface became a class/trait became a class/ as per @asgrim's…
Ocramius 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
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
vendor | ||
infection-log.txt |
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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.
Adding
infection/infection
could've been a separate PR :/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.
Same as #38 (comment) - indeed creeped in too much