Skip to content
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

Add version extension and semantic versioning support #350

Merged

Conversation

chris-doehring
Copy link

@chris-doehring chris-doehring commented Jul 12, 2021

What is the reason for this PR?

For a long time I wanted some sort of version generator in Faker. #335 reminded me of that idea, so I tried to implement it, but only the semantic versioning syntax for now. (Others may follow later)

  • A new feature

Author's checklist

Summary of changes

  • Added a new version extension and registered it in the Generator
  • Added semver method to version extension and registered it in the Generator
  • Added a test case

Some examples from the random generation:

9.21.81+1343915
0.62.59+20031002130830
5.94.22+eb3fa72
2.74.43+20021105093641
2.55.51-beta
4.83.31+cc71761
3.81.0
9.13.97+6ad6819
2.63.18
0.49.31-rc.97+20170720134141

Review checklist

  • All checks have passed
  • Changes are approved by maintainer

src/Faker/Generator.php Outdated Show resolved Hide resolved
@pimjansen
Copy link

Good work @chris-doehring. Will review asap

Copy link

@pimjansen pimjansen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm!

@pimjansen pimjansen requested review from bram-pkg and localheinz July 13, 2021 06:48
@pimjansen pimjansen merged commit 22dfa01 into FakerPHP:main Jul 14, 2021
@pimjansen
Copy link

Thanks @chris-doehring

@chris-doehring chris-doehring deleted the feature/version-extension-semver branch July 14, 2021 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants