-
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.
Use rector, PHPUnit, Codeception and PHPStan to find and fix issues.
- Loading branch information
1 parent
8a2c543
commit 7a046f0
Showing
201 changed files
with
4,380 additions
and
3,662 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 |
---|---|---|
@@ -1,12 +1,10 @@ | ||
Tests export-ignore | ||
shell.nix export-ignore | ||
|
||
.github export-ignore | ||
codeception.dist.yml export-ignore | ||
.gitattributes export-ignore | ||
.github export-ignore | ||
.gitignore export-ignore | ||
|
||
ecs.php export-ignore | ||
phpstan.neon export-ignore | ||
.php-cs-fixer.dist.php export-ignore | ||
phpstan-baseline.neon export-ignore | ||
phpstan.neon export-ignore | ||
phpunit.xml.dist export-ignore | ||
codeception.dist.yml export-ignore | ||
shell.nix export-ignore | ||
Tests export-ignore |
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 |
---|---|---|
|
@@ -15,10 +15,9 @@ jobs: | |
strategy: | ||
matrix: | ||
php-version: | ||
- 7.4 | ||
- 8.0 | ||
- 8.1 | ||
- 8.2 | ||
- 8.3 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
@@ -41,7 +40,7 @@ jobs: | |
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "7.4" | ||
php-version: "8.2" | ||
tools: composer:v2 | ||
|
||
- name: Install xmllint | ||
|
@@ -70,14 +69,14 @@ jobs: | |
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "7.4" | ||
php-version: "8.2" | ||
tools: composer:v2 | ||
|
||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-progress --no-suggest | ||
|
||
- name: Coding Guideline | ||
run: ./vendor/bin/ecs check | ||
run: ./vendor/bin/php-cs-fixer fix --dry-run --diff | ||
|
||
code-quality: | ||
runs-on: ubuntu-latest | ||
|
@@ -86,16 +85,12 @@ jobs: | |
strategy: | ||
matrix: | ||
include: | ||
- php-version: '7.4' | ||
typo3-version: '^10.4' | ||
- php-version: '7.4' | ||
typo3-version: '^11.5' | ||
- php-version: '8.0' | ||
typo3-version: '^11.5' | ||
- php-version: '8.1' | ||
typo3-version: '^11.5' | ||
typo3-version: '^12.4' | ||
- php-version: '8.2' | ||
typo3-version: '^11.5' | ||
typo3-version: '^12.4' | ||
- php-version: '8.3' | ||
typo3-version: '^12.4' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
|
@@ -121,23 +116,14 @@ jobs: | |
strategy: | ||
matrix: | ||
include: | ||
- php-version: '7.4' | ||
typo3-version: '^10.4' | ||
db-version: '5.6' | ||
- php-version: '7.4' | ||
typo3-version: '^10.4' | ||
db-version: '8' | ||
- php-version: '7.4' | ||
typo3-version: '^11.5' | ||
db-version: '8' | ||
- php-version: '8.0' | ||
typo3-version: '^11.5' | ||
db-version: '8' | ||
- php-version: '8.1' | ||
typo3-version: '^11.5' | ||
typo3-version: '^12.4' | ||
db-version: '8' | ||
- php-version: '8.2' | ||
typo3-version: '^11.5' | ||
typo3-version: '^12.4' | ||
db-version: '8' | ||
- php-version: '8.3' | ||
typo3-version: '^12.4' | ||
db-version: '8' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -151,10 +137,16 @@ jobs: | |
- name: Setup MySQL | ||
uses: mirromutth/[email protected] | ||
with: | ||
mysql version: '5.7' | ||
mysql version: "${{ matrix.db-version }}" | ||
mysql database: 'typo3' | ||
mysql root password: 'root' | ||
|
||
- name: Wait for MySQL | ||
run: | | ||
while ! mysqladmin ping --host=127.0.0.1 --password=root --silent; do | ||
sleep 1 | ||
done | ||
- name: Install dependencies | ||
run: composer require --no-interaction --prefer-dist --no-progress "typo3/cms-backend:${{ matrix.typo3-version }}" "typo3/cms-core:${{ matrix.typo3-version }}" "typo3/cms-extbase:${{ matrix.typo3-version }}" "typo3/cms-frontend:${{ matrix.typo3-version }}" "typo3/cms-fluid-styled-content:${{ matrix.typo3-version }}" | ||
|
||
|
@@ -165,4 +157,16 @@ jobs: | |
export typo3DatabaseHost="127.0.0.1" | ||
export typo3DatabaseUsername="root" | ||
export typo3DatabasePassword="root" | ||
./vendor/bin/phpunit --testdox | ||
./vendor/bin/phpunit | ||
tests-acceptance: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: cachix/install-nix-action@v24 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
|
||
- name: Run Acceptance Tests | ||
run: nix-shell --run project-test-acceptance |
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,3 +1,4 @@ | ||
/.Build/ | ||
/.phpunit.cache | ||
/composer.lock | ||
/vendor/ |
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,73 @@ | ||
<?php | ||
$finder = (new PhpCsFixer\Finder()) | ||
->ignoreVCSIgnored(true) | ||
->in(realpath(__DIR__)) | ||
; | ||
|
||
return (new \PhpCsFixer\Config()) | ||
->setRiskyAllowed(true) | ||
->setRules([ | ||
'@DoctrineAnnotation' => true, | ||
'@PSR2' => true, | ||
'array_indentation' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'attribute_empty_parentheses' => true, | ||
'blank_line_after_opening_tag' => true, | ||
'braces' => ['allow_single_line_closure' => true], | ||
'cast_spaces' => ['space' => 'none'], | ||
'compact_nullable_typehint' => true, | ||
'concat_space' => ['spacing' => 'one'], | ||
'declare_equal_normalize' => ['space' => 'none'], | ||
'declare_strict_types' => true, | ||
'dir_constant' => true, | ||
'fully_qualified_strict_types' => false, | ||
'function_to_constant' => ['functions' => ['get_called_class', 'get_class', 'get_class_this', 'php_sapi_name', 'phpversion', 'pi']], | ||
'function_typehint_space' => true, | ||
'global_namespace_import' => ['import_classes' => true, 'import_constants' => true, 'import_functions' => true], | ||
'lowercase_cast' => true, | ||
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'], | ||
'modernize_strpos' => true, | ||
'modernize_types_casting' => true, | ||
'multiline_whitespace_before_semicolons' => ['strategy' => 'new_line_for_chained_calls'], | ||
'native_function_casing' => true, | ||
'new_with_braces' => true, | ||
'no_alias_functions' => true, | ||
'no_blank_lines_after_phpdoc' => true, | ||
'no_empty_phpdoc' => true, | ||
'no_empty_statement' => true, | ||
'no_extra_blank_lines' => true, | ||
'no_leading_import_slash' => true, | ||
'no_leading_namespace_whitespace' => true, | ||
'no_multiline_whitespace_around_double_arrow' => true, | ||
'no_null_property_initialization' => true, | ||
'no_short_bool_cast' => true, | ||
'no_singleline_whitespace_before_semicolons' => true, | ||
'no_superfluous_elseif' => true, | ||
'no_trailing_comma_in_singleline_array' => true, | ||
'no_unneeded_control_parentheses' => true, | ||
'no_unneeded_import_alias' => true, | ||
'no_unused_imports' => true, | ||
'no_useless_else' => true, | ||
'no_whitespace_in_blank_line' => true, | ||
'ordered_imports' => true, | ||
'php_unit_construct' => ['assertions' => ['assertEquals', 'assertSame', 'assertNotEquals', 'assertNotSame']], | ||
'php_unit_mock_short_will_return' => true, | ||
'php_unit_test_case_static_method_calls' => ['call_type' => 'self'], | ||
'phpdoc_no_access' => true, | ||
'phpdoc_no_package' => true, | ||
'phpdoc_order' => ['order' => ['test', 'dataProvider', 'param', 'throws', 'return']], | ||
'phpdoc_scalar' => true, | ||
'phpdoc_separation' => ['groups' => [['Extbase\\*']]], | ||
'phpdoc_trim' => true, | ||
'phpdoc_types' => true, | ||
'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'], | ||
'return_type_declaration' => ['space_before' => 'none'], | ||
'single_line_comment_style' => ['comment_types' => ['hash']], | ||
'single_quote' => true, | ||
'single_trait_insert_per_statement' => true, | ||
'trailing_comma_in_multiline' => ['elements' => ['arrays']], | ||
'whitespace_after_comma_in_array' => true, | ||
'yoda_style' => ['equal' => false, 'identical' => false, 'less_and_greater' => false], | ||
]) | ||
->setFinder($finder) | ||
; |
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
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.