diff --git a/.gitattributes b/.gitattributes index eee1915..5b12c69 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,12 +1,11 @@ /.ddev export-ignore /.github export-ignore +/Tests export-ignore /.editorconfig export-ignore /.gitignore export-ignore /captainhook.json export-ignore /composer-dependency-analyser.php export-ignore +/composer-unused.php export-ignore /eslint.config.mjs export-ignore /package.json export-ignore -/php-cs-fixer.php export-ignore -/phpstan.neon export-ignore -/phpstan-baseline.neon export-ignore -/rector.php export-ignore +/version-bumper.yaml export-ignore diff --git a/.gitignore b/.gitignore index 1b28fd9..a79509a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,4 @@ /public /var /vendor -/.php-cs-fixer.cache /package-lock.json -/php-cs-fixer.xml -/phpstan.xml diff --git a/Classes/Page/AssetRenderer.php b/Classes/Page/AssetRenderer.php index 04d3e50..f0d733a 100644 --- a/Classes/Page/AssetRenderer.php +++ b/Classes/Page/AssetRenderer.php @@ -10,6 +10,7 @@ readonly class AssetRenderer extends \TYPO3\CMS\Core\Page\AssetRenderer { + #[\Override] public function renderStyleSheets(bool $priority = false, string $endingSlash = '', ?ConsumableNonce $nonce = null): string { $inlineStyles = $this->assetCollector->getInlineStyleSheets(); diff --git a/Classes/ViewHelpers/Asset/CssViewHelper.php b/Classes/ViewHelpers/Asset/CssViewHelper.php index 6eb947c..1af98eb 100644 --- a/Classes/ViewHelpers/Asset/CssViewHelper.php +++ b/Classes/ViewHelpers/Asset/CssViewHelper.php @@ -26,12 +26,10 @@ final class CssViewHelper extends AbstractTagBasedViewHelper { protected $escapeChildren = true; - protected AssetCollector $assetCollector; - public function __construct(\TYPO3\CMS\Core\Page\AssetCollector $assetCollector) + public function __construct(protected AssetCollector $assetCollector) { parent::__construct(); - $this->assetCollector = $assetCollector; } #[\Override] diff --git a/Tests/CGL/composer.json b/Tests/CGL/composer.json index f838fcd..c052b97 100644 --- a/Tests/CGL/composer.json +++ b/Tests/CGL/composer.json @@ -63,6 +63,7 @@ "lint:editorconfig": "ec --git-only", "lint:language": "@composer validate-translations ./../../Resources/Private/Language", "lint:php": "@fix:php --dry-run", + "lint:typoscript": "@php typoscript-lint", "lint:yaml": "find ./ ! -path './../../node_modules/*' ! -path './../../vendor/*' ! -path './vendor/*' ! -path './../../typo3_toolbox/*' \\( -name '*.yaml' -o -name '*.yml' \\) | xargs -r yaml-lint", "migration": [ "@migration:rector" diff --git a/Tests/CGL/rector.php b/Tests/CGL/rector.php index 3b8d1b0..84040ba 100644 --- a/Tests/CGL/rector.php +++ b/Tests/CGL/rector.php @@ -8,7 +8,6 @@ use Rector\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector; use Rector\ValueObject\PhpVersion; use Ssch\TYPO3Rector\CodeQuality\General\{ConvertImplicitVariablesToExplicitGlobalsRector, - ExtEmConfRector, GeneralUtilityMakeInstanceToConstructorPropertyRector}; use Ssch\TYPO3Rector\Configuration\Typo3Option; use Ssch\TYPO3Rector\Set\{Typo3LevelSetList, Typo3SetList}; @@ -20,8 +19,6 @@ $rootPath.'/Classes', $rootPath.'/Configuration', ]) - // uncomment to reach your current PHP version - // ->withPhpSets() ->withPhpVersion(PhpVersion::PHP_84) ->withSets([ Typo3SetList::CODE_QUALITY, @@ -40,8 +37,6 @@ // If you use withImportNames(), you should consider excluding some // TYPO3 files. ->withSkip([ - // @see https://github.com/sabbelasichon/typo3-rector/issues/2536 - $rootPath.'/**/Configuration/ExtensionBuilder/*', NameImportingPostRector::class => [ 'ClassAliasMap.php', ], diff --git a/Tests/CGL/typoscript-lint.yml b/Tests/CGL/typoscript-lint.yml new file mode 100644 index 0000000..85c0bef --- /dev/null +++ b/Tests/CGL/typoscript-lint.yml @@ -0,0 +1,15 @@ +paths: + - ../../Configuration/ +filePatterns: + - "*.typoscript" + - "*.tsconfig" +sniffs: + - class: Indentation + parameters: + useSpaces: false + indentPerLevel: 1 + indentConditions: true + - class: NestingConsistency + disabled: true + - class: RepeatingRValue + disabled: true