Contributing Guidelines

Contribute Code

Coding Conventions

Please be consistent with what already exists. New code should not produce any new errors/warnings when the commands below are run. New code that produces new errors/warnings may be rejected.

Run the following command to check your changes against our linters and unit tests:

composer test

PHP

The project uses the PHP_CodeSniffer linter tool to enforce coding standards in the PHP source, unit tests and examples. The project uses PHP_CodeSniffer PSR-12 ruleset defined in the PHP_CodeSniffer configuration file. Run this command to test all code changes:

composer lint

Alternatively, run this command to use phpcbf to fix rule violations:

composer lint:fix

Unit Tests

The project uses PHPUnit framework to run unit tests. The tests are all located in the tests folder. All tests should continue to pass and all new features should ideally include unit tests. Run this command to execute all unit tests:

composer phpunit

Online Documentation

The project’s online documentation is available at imagettftextgradient.agjgd.org. Please ensure the documentation is updated along with any code changes. All of the files used to generate the documentation are in the documentation folder. The website is powered by GitHub Pages which uses Jekyll. Run this command to test the online documentation website locally if you have Jekyll installed:

jekyll serve

Submitting Changes

Please send a GitHub pull request with a clear list of what you’ve done (read more about pull requests). Please follow our coding conventions (above) and make sure all of your commits are atomic (one feature per commit). Please use our pull request template when submitting pull requests.

Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this:

$ git commit -m "A brief summary of the commit
>
> A paragraph describing what changed and its impact."

Contribute Financially

You can contribute financially by becoming a patron at patreon.com/agjopensource to support imagettftextgradient and other agjgd.org projects.

Patreon - Become a Patron

Code of Conduct

In order to participate your behaviour must conform to our code of conduct.