Skip to content

Latest commit

 

History

History
91 lines (58 loc) · 2.94 KB

CONTRIBUTING.md

File metadata and controls

91 lines (58 loc) · 2.94 KB

How to contribute

We welcome contributions to Strata.

All contributors must agree to our Code of Conduct.

Strata is released under the MIT license and is copyright Studio 24 Ltd. All contributors must accept these license and copyright conditions.

Pull Requests

All contributions must be made on a branch and must pass unit tests and coding standards.

Please create a Pull Request to merge changes into master, these will be automatically tested by Travis CI.

All Pull Requests need at least one approval from the Studio 24 development team.

Release

We follow semantic versioning. This can be summarised as:

  • MAJOR version when you make incompatible API changes (e.g. 2.0.0)
  • MINOR version when you add functionality in a backwards compatible manner (e.g. 2.1.0)
  • PATCH version when you make backwards compatible bug fixes (e.g. 2.1.1)

During pre-1.0 release a MINOR version can include backwards incompatible API changes. Please ensure these are documented in UPGRADE-PRE-1.0.md.

Once version 1.0 is reached any upgrade notes should be added to UPGRADE.md.

Creating a release

To create a new release do the following:

  1. Update CHANGELOG.md with a summary of the changes.
  2. Update Version.php with the current version.
  3. Create a new release at GitHub. This will automatically create a new release at Packagist so code can be loaded via Composer.

Tests

Please add unit tests for all bug fixes and new code changes.

Run PHPUnit tests via:

vendor/bin/phpunit

Coding standards

Strata follows the PSR-12 coding standard. You can check this with:

vendor/bin/phpcs

Where possible you can auto-fix code via:

vendor/bin/phpcbf

Please ensure you declare strict types at the top of each PHP file:

declare(strict_types=1);

Documentation

See docs or via the GitHub pages site at: https://docs.strata.dev/

Docs are published to GitHub Pages via Jekyll which uses Kramdown to parse markdown to HTML and the Liquid templating language. Liquid uses a similar syntax to Twig, so if you need to include Twig tags in your docs files ensure you wrap your page content in raw Liquid tags to avoid errors. For example:

{% raw %}

Your Markdown here

{% if page.content.field is not empty %}
    Do something
{% endif %}

{% endraw %}