Contributing

How to contribute?

Contribution are always welcome and much appreciated!

The development of auditor-bundle is hosted on GitHub.

Requirements

Before starting to contribute, you first need to install dev dependencies:

composer install --dev

You also have to install external dev tools:

composer install --working-dir=tools/php-cs-fixer
composer install --working-dir=tools/phpstan

Also, in an effort to maintain an homogeneous code base, we strongly encourage contributors to run PHP-CS-Fixer and PHPStan before submitting a Pull Request.

Coding standards

Coding standards are enforced using PHP-CS-Fixer

composer csfixer

Static code analysis

Static code analysis can be achieved using PHPStan

composer phpstan

Building assets

As the audit viewer relies on Tailwind CSS, you need to rebuild the assets as soon as you reference new classes in templates before release.

Building assets for release (production mode -- assets are minified).

yarn encore production

Building assets for development (development mode -- assets are NOT minified).

yarn encore dev

Running Tests

The test suite is configured to use an SQLite in-memory database and generates a code coverage report in tests/coverage folder.

Default configuration (SQLite)

This configuration uses an in memory SQLite database and generates code coverage report in tests/coverage folder (requires PCOV extension).

composer test