Skip to content

Latest commit

 

History

History
86 lines (61 loc) · 3.41 KB

CONTRIBUTING.md

File metadata and controls

86 lines (61 loc) · 3.41 KB

Contributing

Contributions are encouraged and welcome; we are always happy to get feedback or pull requests on GitHub.

When contributing there are a few guidelines we'd like you to keep in mind:

Pull Requests

  • PSR-12 Coding Standard Please use the following command after you have completed your work:

    composer format

    This will check/correct all the code for the PSR-12 Coding Standard using the wonderful php-cs-fixer.

  • Add unit tests! - Your Pull Request won't be accepted if it does not have tests:

    1. Ensure your new Holiday Provider contains all the necessary unit tests.
    2. Next to the file {REGIONNAME}BaseTestCase.php, a file called {REGIONNAME}Test.php needs to be present. This file needs to include region/country level tests and requires assertion of all expected holidays.
    3. All the unit tests and the implementation Holiday Provider require to have the correct locale, time zone and region/country name.
    4. As almost all tests use automatic iterations, make sure the year for which the test is executed is a valid year. Some holidays are only established from a certain year and having the test year number smaller than the minimum establishment year (amongst all holidays) can result in false errors.
  • Holiday type classification - Holiday::TYPE_OFFICIAL is for days formally designated as public holidays by national or regional legislation - days employees are legally entitled to as non-working days. Use Holiday::TYPE_OBSERVANCE for days that are culturally or religiously significant and widely observed, but are not independently designated by law. See AGENTS.md for the full rationale.

  • One pull request per feature - If you want to contribute more than one thing, send multiple pull requests.

  • Send coherent history - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting.

  • Use Conventional Commits - Commit messages must follow the Conventional Commits specification (e.g. feat(Netherlands): add holiday X, fix(Germany): correct date for Y).

  • Sign your commits (DCO) - Each commit must include a Signed-off-by trailer to certify you agree to the Developer Certificate of Origin:

    git commit -s -m "feat: your change"
  • Branch and PR target - Always branch off develop and open your pull request against develop.

Release Policy

Yasumi follows a scheduled bi-annual release cycle, issuing minor releases twice a year, targeted for March and September. These are best-effort targets rather than fixed dates and may shift. See RELEASE.md for the full policy.

Running Tests

composer test

Or, alternatively run with:

vendor/bin/phpunit

Run a specific suite by name:

vendor/bin/phpunit --testsuite Netherlands

Before Submitting

Always run all three checks before opening a pull request:

composer cs        # Check coding standard
composer phpstan   # Static analysis (level 9)
composer test      # Full test suite