1
0
mirror of https://github.com/cydrobolt/polr.git synced 2024-11-10 04:02:28 +01:00
polr/vendor/fzaninotto/faker/CONTRIBUTING.md
2015-11-02 23:17:51 -05:00

2.3 KiB

Contributing

If you've written a new formatter, adapted Faker to a new locale, or fixed a bug, your contribution is welcome!

Before proposing a pull request, check the following:

  • Your code should follow the PSR-2 coding standard (and use php-cs-fixer to fix inconsistencies).
  • Unit tests should still pass after your patch
  • As much as possible, add unit tests for your code
  • If you add new providers (or new locales) and that they embed a lot of data for random generation (e.g. first names in a new language), please add a link to the reference you used for this list (example in the ru_RU locale). This will ease future updates of the list and debates about the most relevant data for this provider.
  • If you add long list of random data, please split the list into several lines. This makes diffs easier to read, and facilitates core review.
  • If you add new formatters, please include documentation for it in the README. Don't forget to add a line about new formatters in the @property or @method phpDoc entries in Generator.php to help IDEs auto-complete your formatters.
  • If your new formatters are specific to a certain locale, document them in the Language-specific formatters list instead.
  • Avoid changing existing sets of data. Some developers use Faker with seeding for unit tests ; changing the data makes their tests fail.
  • Speed is important in all Faker usages. Make sure your code is optimized to generate thousands of fake items in no time, without consuming too much memory or CPU.
  • If you commit a new feature, be prepared to help maintaining it. Watch the project on GitHub, and please comment on issues or PRs regarding the feature you contributed.

Once your code is merged, it is available for free to everybody under the MIT License. Publishing your Pull Request on the Faker GitHub repository means that you agree with this license for your contribution.

Thank you for your contribution! Faker wouldn't be so great without you.