-
-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix nondeterminism in OptionalMethodCallProcessor
An optional method call (`__calls : [ setLocation (80%?): [40.689269, -74.044737] ]`) would be resolved using an external source of randomness, rather than the FakerGenerator instance used by all other value generators, resulting in nondeterministic behavior. We're making the generator an optional parameter to OptionalMethodCallProcessor and falling back to random_int for backwards-compatibility. This can be made non nullable in a next major release. (Also see OptionalValueResolver, this is handled in the same way there https://github.com/nelmio/alice/blob/a7e15b08a64d4f6fb64b4c3b58bd6a710f71050e/src/Generator/Resolver/Value/Chainable/OptionalValueResolver.php#L101-L103) Fixes gh-1230
- Loading branch information
Showing
3 changed files
with
45 additions
and
4 deletions.
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
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
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