-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Test suite * Doc and badges * False positive error ignored
- Loading branch information
Showing
37 changed files
with
1,389 additions
and
251 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Contributing | ||
|
||
First of all, **thank you** for contributing. | ||
|
||
Bugs or feature requests can be posted online on the GitHub issues section of the project. | ||
|
||
Few rules to ease code reviews and merges: | ||
|
||
- You MUST follow the [PSR-12](http://www.php-fig.org/psr/psr-12/) coding standard. | ||
- You MUST run the test suite. | ||
- You MUST write (or update) unit tests when bugs are fixed or features are added. | ||
- You SHOULD write documentation. | ||
|
||
To contribute use [Pull Requests](https://help.github.com/articles/using-pull-requests), please, write commit messages that make sense, and rebase your branch before submitting your PR. | ||
|
||
May be asked to squash your commits too. This is used to "clean" your Pull Request before merging it, avoiding commits such as fix tests, fix 2, fix 3, etc. | ||
|
||
Run test suite | ||
------------ | ||
|
||
* install composer: `curl -s http://getcomposer.org/installer | php` | ||
* install dependencies: `php composer.phar install` | ||
* run tests: `vendor/bin/phpunit` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
github: Spomky | ||
patreon: FlorentMorselli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
name: 🐛 Bug Report | ||
about: ⚠️ See below for security reports | ||
labels: Bug | ||
|
||
--- | ||
|
||
**Version(s) affected**: x.y.z | ||
|
||
**Description** | ||
<!-- A clear and concise description of the problem. --> | ||
|
||
**How to reproduce** | ||
<!-- Code and/or config needed to reproduce the problem. If it's a complex bug, | ||
create a "bug reproducer" as explained in: --> | ||
|
||
**Possible Solution** | ||
<!--- Optional: only if you have suggestions on a fix/reason for the bug --> | ||
|
||
**Additional context** | ||
<!-- Optional: any other context about the problem: log messages, screenshots, etc. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
name: 🚀 Feature Request | ||
about: Ideas for new features and improvements | ||
|
||
--- | ||
|
||
**Description** | ||
<!-- A clear and concise description of the new feature. --> | ||
|
||
**Example** | ||
<!-- A simple example of the new feature in action (include PHP code, YAML config, etc.) | ||
If the new feature changes an existing feature, include a simple before/after comparison. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
name: ⛔ Support Question | ||
about: We usually do not provide support. Please ask your question on https://stackoverflow.com/ | ||
|
||
--- | ||
|
||
We use GitHub issues only to discuss bugs and new features. | ||
For this kind of questions about using the library or the bundle, please use | ||
https://stackoverflow.com/ using the tags `[aes]` and `[php]` | ||
|
||
Thanks! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
name: 📖 Documentation Issue | ||
about: To report typo or obsolete section in the documentation | ||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
| Q | A | ||
| ------------- | --- | ||
| Branch? | <!-- see below --> | ||
| Bug fix? | yes/no | ||
| New feature? | yes/no <!-- please update src/**/CHANGELOG.md files --> | ||
| Deprecations? | yes/no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | ||
| Tickets | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | ||
| License | MIT | ||
<!-- | ||
Replace this notice by a short README for your feature/bugfix. This will help people | ||
understand your PR and can be used as a start for the documentation. | ||
Additionally: | ||
- Always add tests and ensure they pass. | ||
- Never break backward compatibility (unless you are working on the next major release branch). | ||
- Bug fixes must be submitted against the lowest maintained branch where they apply | ||
(lowest branches are regularly merged to upper ones so they get the fixes too.) | ||
- Features and deprecations must be submitted against the last major branch (e.g. 1.x). | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
daysUntilStale: 60 | ||
daysUntilClose: 7 | ||
staleLabel: wontfix | ||
markComment: > | ||
This issue has been automatically marked as stale because it has not had | ||
recent activity. It will be closed if no further activity occurs. Thank you | ||
for your contributions. | ||
closeComment: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Coding Standards | ||
|
||
on: [push] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ${{ matrix.operating-system }} | ||
strategy: | ||
matrix: | ||
operating-system: [ubuntu-latest] | ||
php-versions: ['8.0'] | ||
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Setup PHP, with composer and extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: json, mbstring, openssl, sqlite3 | ||
coverage: xdebug | ||
|
||
- name: Install Composer dependencies | ||
run: | | ||
composer update --no-progress --no-suggest --prefer-dist --optimize-autoloader | ||
- name: CONDING STANDARDS | ||
run: make ci-cs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Mutation Testing | ||
|
||
on: [push] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ${{ matrix.operating-system }} | ||
strategy: | ||
matrix: | ||
operating-system: [ubuntu-latest] | ||
php-versions: ['8.0'] | ||
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Setup PHP, with composer and extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: json, mbstring, openssl, sqlite3 | ||
coverage: xdebug | ||
|
||
- name: Install Composer dependencies | ||
run: | | ||
composer update --no-progress --no-suggest --prefer-dist --optimize-autoloader | ||
- name: Fetch Git base reference | ||
run: git fetch --depth=1 origin $GITHUB_BASE_REF | ||
|
||
- name: Infection | ||
run: make ci-mu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Rector Checkstyle | ||
|
||
on: [push] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ${{ matrix.operating-system }} | ||
strategy: | ||
matrix: | ||
operating-system: [ ubuntu-latest ] | ||
php-versions: [ '8.0' ] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Setup PHP, with composer and extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: json, mbstring, openssl, sqlite3 | ||
coverage: none | ||
|
||
- name: Install Composer dependencies | ||
run: composer update --no-progress --no-suggest --prefer-dist --optimize-autoloader | ||
|
||
- name: Rector | ||
run: make rector |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Static Analyze | ||
|
||
on: [push] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ${{ matrix.operating-system }} | ||
strategy: | ||
matrix: | ||
operating-system: [ubuntu-latest] | ||
php-versions: ['8.0'] | ||
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Setup PHP, with composer and extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: json, mbstring, openssl, sqlite3 | ||
coverage: xdebug | ||
|
||
- name: Install Composer dependencies | ||
run: | | ||
composer update --no-progress --no-suggest --prefer-dist --optimize-autoloader | ||
- name: PHPStan | ||
run: make st |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Unit and Functional Tests | ||
|
||
on: [push] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ${{ matrix.operating-system }} | ||
strategy: | ||
matrix: | ||
operating-system: [ ubuntu-latest ] | ||
php-versions: [ '8.0', '8.1' ] | ||
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Setup PHP, with composer and extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: json, mbstring, openssl, sqlite3 | ||
coverage: xdebug | ||
|
||
- name: Install Composer dependencies | ||
run: | | ||
composer update --no-progress --no-suggest --prefer-dist --optimize-autoloader | ||
- name: Run tests | ||
run: make ci-cc |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
mu: vendor ## Mutation tests | ||
vendor/bin/infection -s --threads=$(nproc) --min-msi=75 --min-covered-msi=75 | ||
|
||
tests: vendor ## Run all tests | ||
vendor/bin/phpunit --color | ||
|
||
cc: vendor ## Show test coverage rates (HTML) | ||
vendor/bin/phpunit --coverage-html ./build | ||
|
||
cs: vendor ## Fix all files using defined ECS rules | ||
vendor/bin/ecs check --fix | ||
|
||
tu: vendor ## Run only unit tests | ||
vendor/bin/phpunit --color --group Unit | ||
|
||
ti: vendor ## Run only integration tests | ||
vendor/bin/phpunit --color --group Integration | ||
|
||
tf: vendor ## Run only functional tests | ||
vendor/bin/phpunit --color --group Functional | ||
|
||
st: vendor ## Run static analyse | ||
vendor/bin/phpstan analyse | ||
|
||
|
||
################################################ | ||
|
||
ci-mu: vendor ## Mutation tests (for Github only) | ||
vendor/bin/infection --logger-github -s --threads=$(nproc) --min-msi=75 --min-covered-msi=75 | ||
|
||
ci-cc: vendor ## Show test coverage rates (console) | ||
vendor/bin/phpunit --coverage-text | ||
|
||
ci-cs: vendor ## Check all files using defined ECS rules | ||
vendor/bin/ecs check | ||
|
||
################################################ | ||
|
||
|
||
vendor: composer.json composer.lock | ||
composer validate | ||
composer install | ||
|
||
rector: vendor ## Check all files using Rector | ||
vendor/bin/rector process --ansi --dry-run --xdebug | ||
|
||
.DEFAULT_GOAL := help | ||
help: | ||
@grep -E '(^[a-zA-Z_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/' | ||
.PHONY: help |
Oops, something went wrong.