Any contributions to EditorConfigCLI are very welcome! No matter if you report issues or contribute code.
If you want to provide some code, here are some hints for you.
To ensure proper code styles, etc. you can perform the Composer script all before submitting your merge request.
$ ddev composer run all
First, it fixes all issues, which can get fixed automatically. Then, it performs an additional check, which includes phpstan (level 8) and performs unit- and functional tests (without coverage).
As last step, it will compile the phar binary, locally.
$ ddev composer run check
$ ddev composer run fix
$ ddev composer run test
$ ddev composer run test
$ ddev composer run test-with-coverage
$ ddev composer run test-php-unit
$ ddev composer run test-php-functional
Note: Xdebug must be available (ddev xdebug on
) when testing with code coverage enabled.
The results will be located here:
- Text Report for Unit Tests
- Text Report for Functional Tests
- HTML Coverage Report for Unit Tests
- HTML Coverage Report for Functional Tests
$ ddev composer run compile
Note: In php.ini the option phar.readonly
must be set to 0
.
When you provide a merge request, Github actions will check your code, using the "check" and "test-with-coverage" Composer script.
Also, each build will run on the following combinations of PHP version and Composer dependencies flag:
- PHP 8.2, Lowest
- PHP 8.2, Highest
- PHP 8.3, Lowest
- PHP 8.3, Highest
Note: "Highest" is the default behaviour of Composer.
"Lowest" is when you run Composer update with --prefer-lowest
A build may fail when:
- EditorConfigCli found issues
- PhpStyleFixer found issues
- PhpStan found issues
- A unit test failed
- A functional test failed
The Github action will provide artifacts for each build, containing the tests results in various formats.
When a new tag is pushed, Github actions will automatically create a release for it.
This includes compiling the PHAR binary and attaching it, to the release. Also, the commit messages since last release, will be added.