This repository has been archived by the owner on Mar 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from eclipxe13/development
Review 2021-09-03
- Loading branch information
Showing
28 changed files
with
383 additions
and
118 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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 @@ | ||
# see https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners | ||
/.github/* @phpcfdi/core-mantainers |
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,112 @@ | ||
name: build | ||
on: | ||
pull_request: | ||
branches: [ main ] | ||
push: | ||
branches: [ main ] | ||
schedule: | ||
- cron: '0 16 * * 0' # sunday 16:00 | ||
|
||
jobs: | ||
|
||
ci: # this job runs all the development tools and upload code coverage to scrutinizer | ||
|
||
name: PHP 8.0 (full) | ||
runs-on: "ubuntu-latest" | ||
|
||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
# see https://github.com/marketplace/actions/setup-php-action | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.0' | ||
extensions: dom | ||
coverage: xdebug | ||
tools: composer:v2, phpcs, php-cs-fixer, phpstan, psalm, infection, cs2pr | ||
env: | ||
fail-fast: true | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- name: Install project dependencies | ||
run: composer upgrade --no-interaction --no-progress --prefer-dist | ||
|
||
- name: Code style (phpcs) | ||
run: phpcs -q --report=checkstyle | cs2pr | ||
|
||
- name: Code style (php-cs-fixer) | ||
run: php-cs-fixer fix --dry-run --format=checkstyle | cs2pr | ||
|
||
- name: Tests (phpunit with code coverage) | ||
run: vendor/bin/phpunit --testdox --verbose --coverage-clover=build/coverage-clover.xml --coverage-xml=build/coverage --log-junit=build/coverage/junit.xml | ||
|
||
- name: Code analysis (phpstan) | ||
run: phpstan analyse --no-progress --verbose | ||
|
||
- name: Code analysis (psalm) | ||
run: psalm --no-progress --output-format=github | ||
|
||
- name: Mutation testing analysis | ||
run: infection --skip-initial-tests --coverage=build/coverage --no-progress --no-interaction --logger-github | ||
|
||
# see https://github.com/marketplace/actions/action-scrutinizer | ||
- name: Upload code coverage to scrutinizer | ||
uses: sudo-bot/action-scrutinizer@latest | ||
with: | ||
cli-args: "--format=php-clover build/coverage-clover.xml" | ||
continue-on-error: true | ||
|
||
build: # this job runs tests on all php supported versions | ||
|
||
name: PHP ${{ matrix.php-versions }} (tests) | ||
runs-on: "ubuntu-latest" | ||
|
||
strategy: | ||
matrix: | ||
php-versions: ['7.3', '7.4'] | ||
|
||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
# see https://github.com/marketplace/actions/setup-php-action | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: dom | ||
coverage: none | ||
tools: composer:v2, cs2pr | ||
env: | ||
fail-fast: true | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- name: Install project dependencies | ||
run: composer upgrade --no-interaction --no-progress --prefer-dist | ||
|
||
- name: Tests | ||
run: vendor/bin/phpunit --testdox --verbose |
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,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phive xmlns="https://phar.io/phive"> | ||
<phar name="php-cs-fixer" version="^3.1.0" installed="3.1.0" location="./tools/php-cs-fixer" copy="false"/> | ||
<phar name="phpcs" version="^3.6.0" installed="3.6.0" location="./tools/phpcs" copy="false"/> | ||
<phar name="phpcbf" version="^3.6.0" installed="3.6.0" location="./tools/phpcbf" copy="false"/> | ||
<phar name="phpstan" version="^0.12.98" installed="0.12.98" location="./tools/phpstan" copy="false"/> | ||
<phar name="psalm" version="^4.9.3" installed="4.9.3" location="./tools/psalm" copy="false"/> | ||
<phar name="infection" version="^0.23.0" installed="0.23.0" location="./tools/infection" copy="false"/> | ||
</phive> |
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 |
---|---|---|
@@ -1,51 +1,52 @@ | ||
<?php | ||
|
||
/** | ||
* @noinspection PhpUndefinedClassInspection | ||
* @noinspection PhpUndefinedNamespaceInspection | ||
* @see https://cs.symfony.com/doc/ruleSets/ | ||
* @see https://cs.symfony.com/doc/rules/ | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
return PhpCsFixer\Config::create() | ||
return (new PhpCsFixer\Config()) | ||
->setRiskyAllowed(true) | ||
->setCacheFile(__DIR__ . '/build/php_cs.cache') | ||
->setRules([ | ||
'@PSR2' => true, | ||
'@PHP70Migration' => true, | ||
'@PHP70Migration:risky' => true, | ||
'@PHP71Migration' => true, | ||
'@PSR12' => true, | ||
'@PSR12:risky' => true, | ||
'@PHP71Migration:risky' => true, | ||
// '@PHP73Migration' => true, | ||
'@PHP73Migration' => true, | ||
// PSR12 (remove when php-cs-fixer reaches ^3.1.1) | ||
'class_definition' => ['space_before_parenthesis' => true], | ||
// symfony | ||
'class_attributes_separation' => true, | ||
'whitespace_after_comma_in_array' => true, | ||
'no_empty_statement' => true, | ||
'no_extra_blank_lines' => true, | ||
'function_typehint_space' => true, | ||
'no_alias_functions' => true, | ||
'trailing_comma_in_multiline_array' => true, | ||
'new_with_braces' => true, | ||
'no_blank_lines_after_class_opening' => true, | ||
'no_blank_lines_after_phpdoc' => true, | ||
'object_operator_without_whitespace' => true, | ||
'binary_operator_spaces' => true, | ||
'phpdoc_scalar' => true, | ||
'self_accessor' => true, | ||
'no_trailing_comma_in_singleline_array' => true, | ||
'single_quote' => true, | ||
'no_singleline_whitespace_before_semicolons' => true, | ||
'no_unused_imports' => true, | ||
'no_whitespace_in_blank_line' => true, | ||
'yoda_style' => ['equal' => true, 'identical' => true, 'less_and_greater' => null], | ||
'standardize_not_equals' => true, | ||
// contrib | ||
'concat_space' => ['spacing' => 'one'], | ||
'not_operator_with_successor_space' => true, | ||
'single_blank_line_before_namespace' => true, | ||
'linebreak_after_opening_tag' => true, | ||
'blank_line_after_opening_tag' => true, | ||
'ordered_imports' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
// symfony:risky | ||
'no_alias_functions' => true, | ||
'self_accessor' => true, | ||
// contrib | ||
'not_operator_with_successor_space' => true, | ||
]) | ||
->setFinder( | ||
PhpCsFixer\Finder::create() | ||
->in(__DIR__) | ||
->append([__FILE__]) | ||
->exclude(['vendor', 'build']) | ||
) | ||
; |
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 |
---|---|---|
@@ -1,23 +1,19 @@ | ||
filter: | ||
excluded_paths: | ||
- 'tests/' | ||
dependency_paths: | ||
- 'tools/' | ||
- 'vendor/' | ||
|
||
build: | ||
dependencies: | ||
override: | ||
- composer self-update --2 --stable --no-interaction --no-progress | ||
- composer remove squizlabs/php_codesniffer friendsofphp/php-cs-fixer phpstan/phpstan --dev --no-interaction --no-progress --no-update | ||
- composer update --no-interaction --no-progress | ||
- composer update --no-interaction --prefer-dist | ||
nodes: | ||
analysis: | ||
project_setup: | ||
override: true | ||
analysis: # see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/ | ||
project_setup: {override: true} | ||
tests: | ||
override: | ||
- php-scrutinizer-run --enable-security-analysis | ||
- phpcs-run --standard=phpcs.xml.dist src/ tests/ | ||
- command: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover | ||
coverage: | ||
file: coverage.clover | ||
format: clover | ||
tools: | ||
external_code_coverage: true |
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
|
||
# Código de Conducta convenido para Contribuyentes | ||
# Código de Conducta Convenido para Contribuyentes | ||
|
||
## Nuestro compromiso | ||
|
||
|
@@ -37,7 +36,7 @@ Este código de conducta aplica tanto a espacios del proyecto como a espacios p | |
|
||
## Aplicación | ||
|
||
Instancias de comportamiento abusivo, acosador o inaceptable de otro modo podrán ser reportadas a los administradores de la comunidad responsables del cumplimiento a través de [[email protected]](). Todas las quejas serán evaluadas e investigadas de una manera puntual y justa. | ||
Instancias de comportamiento abusivo, acosador o inaceptable de otro modo podrán ser reportadas a los administradores de la comunidad responsables del cumplimiento a través de [[email protected]](mailto:[email protected]). Todas las quejas serán evaluadas e investigadas de una manera puntual y justa. | ||
|
||
Todos los administradores de la comunidad están obligados a respetar la privacidad y la seguridad de quienes reporten incidentes. | ||
|
||
|
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
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
Oops, something went wrong.