Closed kasperhartwich closed 1 year ago
Hi.
When using the optional() function in Faker\Provider\Base, it returns DefaultGenerator, which is deprecated. Shouldn't this be changed to use ChanceGenerator instead?
https://github.com/FakerPHP/Faker/blob/1d21cbcbf7b2f7f5b1aa4b415a7b80f31f35a57d/src/Faker/Provider/Base.php#L653
Where is stated that its deprecated?
Here: https://github.com/FakerPHP/Faker/blob/main/src/Faker/DefaultGenerator.php#L13 and this makes my tests fail: https://github.com/FakerPHP/Faker/blob/main/src/Faker/DefaultGenerator.php#L19C55-L19C55
Do you also have a code snippet on how to use it and reproduce it as mentioned in the bug template
@kasperhartwich
It is deprecated and may be removed in 2.0.0.
2.0.0
Hi.
When using the optional() function in Faker\Provider\Base, it returns DefaultGenerator, which is deprecated. Shouldn't this be changed to use ChanceGenerator instead?
https://github.com/FakerPHP/Faker/blob/1d21cbcbf7b2f7f5b1aa4b415a7b80f31f35a57d/src/Faker/Provider/Base.php#L653