Contributing

Thanks for considering contributing to this extension! Since it is an open source product, its successful further development depends largely on improving and optimizing it together.

The development of this extension follows the official TYPO3 coding standards. To ensure the stability and cleanliness of the code, various code quality tools are used and most components are covered with test cases. In addition, we use DDEV for local development. Make sure to set it up as described below. For continuous integration, we use GitHub Actions.

Create an issue first

Before you start working on the extension, please create an issue on GitHub: https://github.com/eliashaeussler/typo3-form-consent/issues

Also, please check if there is already an issue on the topic you want to address.

Contribution workflow

Preparation

Clone the repository first:

git clone https://github.com/eliashaeussler/typo3-form-consent.git
cd typo3-form-consent
Copied!

Now start DDEV:

ddev start
Copied!

You can access the DDEV site at https://typo3-ext-form-consent.ddev.site/.

Check code quality

# All linters
ddev cgl lint

# Specific linters
ddev cgl lint:composer
ddev cgl lint:editorconfig
ddev cgl lint:php
ddev cgl lint:typoscript

# Fix all CGL issues
ddev cgl fix

# Fix specific CGL issues
ddev cgl fix:composer
ddev cgl fix:editorconfig
ddev cgl fix:php
ddev cgl fix:typoscript

# All static code analyzers
ddev cgl sca

# Specific static code analyzers
ddev cgl sca:php
Copied!

Run tests

# All tests
ddev test

# Specific tests
ddev test acceptance
ddev test functional
ddev test unit

# Enable Xdebug to collect code coverage
ddev xdebug on

# All tests with code coverage
ddev test coverage

# Specific tests with code coverage
ddev test coverage:acceptance
ddev test coverage:functional
ddev test coverage:unit

# Merge code coverage of all test suites
ddev test coverage:merge
Copied!

Code coverage reports are written to .Build/coverage. You can open the last merged HTML report like follows:

open .Build/coverage/html/_merged/index.html
Copied!

Reports of acceptance tests are written to .Build/log/acceptance-reports. You can open the last HTML report like follows:

open .Build/log/acceptance-reports/records.html
Copied!

Build documentation

# Rebuild and open documentation
composer docs

# Build documentation (from cache)
composer docs:build

# Open rendered documentation
composer docs:open
Copied!

The built docs will be stored in .Build/docs.

Pull Request

Once you have finished your work, please submit a pull request and describe what you've done: https://github.com/eliashaeussler/typo3-form-consent/pulls

Ideally, your PR references an issue describing the problem you're trying to solve. All described code quality tools are automatically executed on each pull request for all currently supported PHP versions and TYPO3 versions.