-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Upgrade php version, changes typo3 testing framework and up…
…dated code-style tools version (#83) * switch typo3 testing framework, set php version to 8.3 * chore: fix some tests and codestyles for php83 * chore: fix pipeline * chore: fix pipeline unittest.xml * chore: fix pipeline tests without coverage * changing unittest.xml location * renamed BaseTest to BaseTestCase --------- Co-authored-by: thomas.layh <[email protected]>
- Loading branch information
Showing
45 changed files
with
621 additions
and
763 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
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,60 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use PhpCsFixer\Fixer\ClassNotation\ClassAttributesSeparationFixer; | ||
use PhpCsFixer\Fixer\Import\OrderedImportsFixer; | ||
use PhpCsFixer\Fixer\Operator\NotOperatorWithSuccessorSpaceFixer; | ||
use PhpCsFixer\Fixer\Phpdoc\GeneralPhpdocAnnotationRemoveFixer; | ||
use PhpCsFixer\Fixer\Phpdoc\NoSuperfluousPhpdocTagsFixer; | ||
use PhpCsFixer\Fixer\Strict\DeclareStrictTypesFixer; | ||
use PhpCsFixer\Fixer\Strict\StrictComparisonFixer; | ||
use PhpCsFixer\Fixer\Strict\StrictParamFixer; | ||
use PhpCsFixer\Fixer\StringNotation\ExplicitStringVariableFixer; | ||
use PhpCsFixer\Fixer\Whitespace\ArrayIndentationFixer; | ||
use Symplify\CodingStandard\Fixer\ArrayNotation\ArrayListItemNewlineFixer; | ||
use Symplify\CodingStandard\Fixer\ArrayNotation\ArrayOpenerAndCloserNewlineFixer; | ||
use Symplify\EasyCodingStandard\Config\ECSConfig; | ||
use Symplify\CodingStandard\Fixer\LineLength\LineLengthFixer; | ||
use Symplify\EasyCodingStandard\ValueObject\Set\SetList; | ||
|
||
return ECSConfig::configure() | ||
->withPaths([ | ||
__DIR__ . '/../Classes', | ||
__DIR__ . '/ecs.php', | ||
]) | ||
->withSets([ | ||
SetList::COMMON, | ||
SetList::CLEAN_CODE, | ||
SetList::PSR_12, | ||
SetList::SYMPLIFY, | ||
]) | ||
->withConfiguredRule( | ||
LineLengthFixer::class, | ||
[ | ||
LineLengthFixer::LINE_LENGTH => 140, | ||
LineLengthFixer::INLINE_SHORT_LINES => false, | ||
] | ||
) | ||
->withSkip([ | ||
// Default Skips | ||
Symplify\CodingStandard\Fixer\LineLength\LineLengthFixer::class => [ | ||
__DIR__ . '/ecs.php', | ||
], | ||
ArrayListItemNewlineFixer::class => null, | ||
ArrayOpenerAndCloserNewlineFixer::class => null, | ||
ClassAttributesSeparationFixer::class => null, | ||
GeneralPhpdocAnnotationRemoveFixer::class => null, | ||
OrderedImportsFixer::class => null, | ||
NotOperatorWithSuccessorSpaceFixer::class => null, | ||
ExplicitStringVariableFixer::class => null, | ||
ArrayIndentationFixer::class => null, | ||
|
||
// @todo for next upgrade | ||
NoSuperfluousPhpdocTagsFixer::class => null, | ||
|
||
// @todo strict php | ||
DeclareStrictTypesFixer::class => null, | ||
StrictComparisonFixer::class => null, | ||
StrictParamFixer::class => null, | ||
]); |
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,62 +1,66 @@ | ||
parameters: | ||
ignoreErrors: | ||
- | ||
message: "#^(.*)has no return typehint specified\\.$#" | ||
path: ../ | ||
- | ||
message: "#^Access to an undefined property Luracast\\\\Restler\\\\Restler\\:\\:\\$_authClasses\\.$#" | ||
count: 1 | ||
path: ../Classes/System/RestApi/RestApiRequest.php | ||
|
||
- | ||
message: "#^Access to an undefined property Luracast\\\\Restler\\\\Restler\\:\\:\\$_authClasses\\.$#" | ||
count: 2 | ||
path: ../Classes/System/RestApi/RestApiRequestScope.php | ||
|
||
- | ||
message: "#^Method Aoe\\\\Restler\\\\System\\\\RestApi\\\\RestApiRequestScope\\:\\:getOriginalRestApiRequest\\(\\) should return Luracast\\\\Restler\\\\Restler but returns Luracast\\\\Restler\\\\Scope\\.$#" | ||
count: 1 | ||
path: ../Classes/System/RestApi/RestApiRequestScope.php | ||
|
||
- | ||
message: "#^Method Aoe\\\\Restler\\\\System\\\\Restler\\\\Builder\\:\\:getCache\\(\\) should return TYPO3\\\\CMS\\\\Core\\\\Cache\\\\Backend\\\\SimpleFileBackend but returns TYPO3\\\\CMS\\\\Core\\\\Cache\\\\Backend\\\\BackendInterface\\.$#" | ||
count: 1 | ||
path: ../Classes/System/Restler/Builder.php | ||
|
||
- | ||
message: "#^Cognitive complexity for \"Aoe\\\\Restler\\\\System\\\\Restler\\\\Format\\\\HalJsonFormat\\:\\:decode\\(\\)\" is 9, keep it under 8$#" | ||
message: "#^Strict comparison using \\=\\=\\= between bool and null will always evaluate to false\\.$#" | ||
count: 1 | ||
path: ../Classes/System/Restler/Format/HalJsonFormat.php | ||
|
||
- | ||
message: "#^Cognitive complexity for \"Aoe\\\\Restler\\\\System\\\\Restler\\\\Format\\\\HalJsonFormat\\:\\:encode\\(\\)\" is 17, keep it under 8$#" | ||
message: "#^Method Aoe\\\\Restler\\\\System\\\\TYPO3\\\\Cache\\:\\:getCacheEntry\\(\\) has no return type specified\\.$#" | ||
count: 1 | ||
path: ../Classes/System/Restler/Format/HalJsonFormat.php | ||
|
||
path: ../Classes/System/TYPO3/Cache.php | ||
- | ||
message: "#^Cognitive complexity for \"Aoe\\\\Restler\\\\System\\\\Restler\\\\Format\\\\HalJsonFormat\\:\\:formatJson\\(\\)\" is 14, keep it under 8$#" | ||
message: "#^Method Aoe\\\\Restler\\\\System\\\\Restler\\\\RestlerExtended\\:\\:handle\\(\\) has no return type specified\\.$#" | ||
count: 1 | ||
path: ../Classes/System/Restler/Format/HalJsonFormat.php | ||
|
||
path: ../Classes/System/Restler/RestlerExtended.php | ||
- | ||
message: "#^Method Aoe\\\\Restler\\\\System\\\\Restler\\\\RestlerExtended\\:\\:postCall\\(\\) has no return type specified\\.$#" | ||
count: 1 | ||
path: ../Classes/System/Restler/RestlerExtended.php | ||
- | ||
message: "#^Dead catch \\- Error is never thrown in the try block\\.$#" | ||
count: 1 | ||
path: ../Classes/System/Restler/Builder.php | ||
- | ||
message: "#^Anonymous variable in a `\\$request\\-\\>getAttribute\\('site'\\)\\-\\>\\.\\.\\.\\(\\)` method call can lead to false dead methods\\. Make sure the variable type is known$#" | ||
count: 1 | ||
path: ../Classes/System/Dispatcher.php | ||
- | ||
message: "#^Cognitive complexity for \"Aoe\\\\Restler\\\\System\\\\Restler\\\\RestlerExtended\\:\\:getPath\\(\\)\" is 9, keep it under 8$#" | ||
message: "#^Anonymous variable in a `\\$request\\-\\>getAttribute\\('site'\\)\\-\\>getBase\\(\\)\\-\\>\\.\\.\\.\\(\\)` method call can lead to false dead methods\\. Make sure the variable type is known$#" | ||
count: 1 | ||
path: ../Classes/System/Dispatcher.php | ||
- | ||
message: "#^Anonymous variable in a `\\$this\\-\\>request\\-\\>getAttribute\\('site'\\)\\-\\>\\.\\.\\.\\(\\)` method call can lead to false dead methods\\. Make sure the variable type is known$#" | ||
count: 1 | ||
path: ../Classes/System/Restler/RestlerExtended.php | ||
|
||
- | ||
message: "#^Cognitive complexity for \"Aoe\\\\Restler\\\\System\\\\Restler\\\\RestlerExtended\\:\\:handleRequestByTypo3Cache\\(\\)\" is 13, keep it under 8$#" | ||
message: "#^Anonymous variable in a `\\$this\\-\\>request\\-\\>getAttribute\\('site'\\)\\-\\>getBase\\(\\)\\-\\>\\.\\.\\.\\(\\)` method call can lead to false dead methods\\. Make sure the variable type is known$#" | ||
count: 1 | ||
path: ../Classes/System/Restler/RestlerExtended.php | ||
|
||
- | ||
message: "#^Cognitive complexity for \"Aoe\\\\Restler\\\\System\\\\Restler\\\\Routes\\:\\:containsUrl\\(\\)\" is 16, keep it under 8$#" | ||
message: "#^Method Aoe\\\\Restler\\\\System\\\\RestApi\\\\RestApiRequest\\:\\:composeHeaders\\(\\) has no return type specified\\.$#" | ||
count: 1 | ||
path: ../Classes/System/Restler/Routes.php | ||
path: ../Classes/System/RestApi/RestApiRequest.php | ||
- | ||
message: "#^Strict comparison using \\=\\=\\= between bool and null will always evaluate to false\\.$#" | ||
message: "#^Method Aoe\\\\Restler\\\\System\\\\RestApi\\\\RestApiRequest\\:\\:postCall\\(\\) has no return type specified\\.$#" | ||
count: 1 | ||
path: ../Classes/System/Restler/Format/HalJsonFormat.php | ||
path: ../Classes/System/RestApi/RestApiRequest.php | ||
- | ||
message: "#^Cognitive complexity for \"Aoe\\\\Restler\\\\System\\\\Restler\\\\Builder\\:\\:addApiClassesByGlobalArray\\(\\)\" is 9, keep it under 8$#" | ||
message: "#^Property Aoe\\\\Restler\\\\System\\\\RestApi\\\\RestApiRequestScope\\:\\:\\$originalRestApiRequest \\(Luracast\\\\Restler\\\\Scope\\) on left side of \\?\\? is not nullable\\.$#" | ||
count: 1 | ||
path: ../Classes/System/Restler/Builder.php | ||
path: ../Classes/System/RestApi/RestApiRequestScope.php | ||
- | ||
message: "#^Comparison operation \"\\>\" between int\\<1, max\\> and 0 is always true\\.$#" | ||
count: 1 | ||
path: ../Classes/System/Restler/Format/HalJsonFormat.php |
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.