Skip to content

Latest commit

 

History

History
83 lines (51 loc) · 2.9 KB

File metadata and controls

83 lines (51 loc) · 2.9 KB

How to contribute

We welcome contributions to this package.

All contributors must agree to our Code of Conduct. This package 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 the main branch, these will be automatically tested by GitHub Actions.

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)

Creating a release

This repo uses Release Please to automatically create releases, based on semantic versioning.

To create a new release use conventional commits in your commit message. This will automatically create a release PR, which is kept up to date with further commits and you can merge it to create the new release when you are ready.

Use the following keywords in your commits:

  • fix: this indicates a bug fix and creates a new patch version (e.g. 1.0.1).
  • feat: this indicates a new feature and creates a new minor version (e.g. 1.1.0).
  • To create a new major version (e.g. 2.0.0) either append an exclamation mark to fix!: or feat!: or add a foter of BREAKING CHANGE: with details of what breaking changes there are.

This will create a PR with the name chore(main): release [version], this allows you to check what is about to be included in the release and make any manual edits to the CHANGELOG.md

If the action fails to run you can view the action and select Re-run all jobs to re-run it.

Once a release PR is merged in this will automatically create a new release at Packagist so code can be loaded via Composer.

Unit tests

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

Run PHPUnit tests via:

composer test

PHPStan

You can use PHPStan to help test code quality, this can help catch simple errors:

composer phpstan

Coding standards

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

composer cs

Where possible, you can auto-fix code via:

composer format

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

declare(strict_types=1);