diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6a292a41..878a06d1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,7 +43,7 @@ jobs: with: php-version: "${{ env.MAIN_PHP_VERSION }}" - run: | - bash .Build/bin/t3_check_codestyle.sh PSRHtml5mediakit + bash .Build/bin/t3_check_codestyle.sh PerCodeStyleT3Ext "check-codestyle-php-cs-fixer": name: "PHP CS Fixer check" diff --git a/Build/php-cs-fixer/config.php b/Build/php-cs-fixer/config.php index 13eb5916..1e86a259 100644 --- a/Build/php-cs-fixer/config.php +++ b/Build/php-cs-fixer/config.php @@ -8,7 +8,7 @@ exit('This script supports command line usage only. Please check your command.'); } -$rules = include __DIR__ . '/../../.Build/vendor/de-swebhosting/php-codestyle/PhpCsFixer/Psr12DefaultRules.php'; +$rules = include __DIR__ . '/../../.Build/vendor/de-swebhosting/php-codestyle/PhpCsFixer/PerCsDefaultRules.php'; return (new Config()) ->setFinder( diff --git a/Classes/Exception/MediaException.php b/Classes/Exception/MediaException.php index b2680dc2..73cf1fd5 100644 --- a/Classes/Exception/MediaException.php +++ b/Classes/Exception/MediaException.php @@ -21,6 +21,4 @@ * * @codeCoverageIgnore No code to test. */ -class MediaException extends RuntimeException -{ -} +class MediaException extends RuntimeException {} diff --git a/Configuration/Services.php b/Configuration/Services.php index c09ffac9..19b57652 100644 --- a/Configuration/Services.php +++ b/Configuration/Services.php @@ -4,7 +4,7 @@ use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; -return function (ContainerConfigurator $configurator): void { +return static function (ContainerConfigurator $configurator): void { $configurator->services() ->defaults()->autowire()->autoconfigure()->public() diff --git a/Configuration/TCA/Overrides/sys_file_reference.php b/Configuration/TCA/Overrides/sys_file_reference.php index fd255b80..66b7c08f 100644 --- a/Configuration/TCA/Overrides/sys_file_reference.php +++ b/Configuration/TCA/Overrides/sys_file_reference.php @@ -4,7 +4,7 @@ use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; -$lllPrefix = 'LLL:EXT:html5mediakit/Resources/Private/Language/locallang_db:sys_file_reference.'; +$lllPrefix = 'LLL:EXT:html5mediakit/Resources/Private/Language/locallang_db.xlf:sys_file_reference.'; $additionalColumns = [ 'tx_html5mediakit_track_kind' => [ diff --git a/Configuration/TCA/tx_html5mediakit_domain_model_media.php b/Configuration/TCA/tx_html5mediakit_domain_model_media.php index 597a517c..4c25d71c 100644 --- a/Configuration/TCA/tx_html5mediakit_domain_model_media.php +++ b/Configuration/TCA/tx_html5mediakit_domain_model_media.php @@ -10,8 +10,8 @@ $languagePrefixCsh = 'LLL:EXT:html5mediakit/Resources/Private/Language/locallang_csh_media.xlf:'; $lllAddImageFileReference = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'; -$buildFileFieldConfig = function ( - string|array $allowedFileTypes, +$buildFileFieldConfig = static function ( + array|string $allowedFileTypes, int $maxitems = 1, string $showitem = '', string $createNewRelationLinkTitle = '', diff --git a/Documentation/Settings.cfg b/Documentation/Settings.cfg index 3fd8dce2..25624483 100644 --- a/Documentation/Settings.cfg +++ b/Documentation/Settings.cfg @@ -25,7 +25,7 @@ project = html5mediakit # ... (recommended) version, displayed next to title (desktop) and in ['typo3conf/ext/html5mediakit'], diff --git a/Tests/CodeSniffer/PSRHtml5mediakit/ruleset.xml b/Tests/CodeSniffer/PerCodeStyleT3Ext/ruleset.xml similarity index 56% rename from Tests/CodeSniffer/PSRHtml5mediakit/ruleset.xml rename to Tests/CodeSniffer/PerCodeStyleT3Ext/ruleset.xml index b62c17df..64761aa0 100644 --- a/Tests/CodeSniffer/PSRHtml5mediakit/ruleset.xml +++ b/Tests/CodeSniffer/PerCodeStyleT3Ext/ruleset.xml @@ -1,5 +1,5 @@ - + Based on PSRDefault. Adjust only if REALLY neccessary! @@ -9,4 +9,11 @@ Tests/Acceptance/* ext_emconf.php + + + Classes/Exception/MediaException.php + + + Classes/Exception/MediaException.php + diff --git a/Tests/Unit/ViewHelpers/VideoViewHelperTest.php b/Tests/Unit/ViewHelpers/VideoViewHelperTest.php index ed479162..771ffd96 100644 --- a/Tests/Unit/ViewHelpers/VideoViewHelperTest.php +++ b/Tests/Unit/ViewHelpers/VideoViewHelperTest.php @@ -47,7 +47,7 @@ private function assertRenderResult(string $expectedResult, ?Video $video = null { $this->arguments['video'] = $video ?: new Video(); - $renderChildrenClosure = function () { + $renderChildrenClosure = static function () { return 'children'; }; diff --git a/composer.json b/composer.json index dbb21128..9049607f 100644 --- a/composer.json +++ b/composer.json @@ -10,13 +10,14 @@ "typo3/cms-frontend": "*" }, "require-dev": { - "de-swebhosting/php-codestyle": "^5.0", + "de-swebhosting/php-codestyle": "^5.1", "de-swebhosting/typo3-extension-buildtools": "dev-TYPO3_12", "ergebnis/composer-normalize": "^2.28", "friendsofphp/php-cs-fixer": "^3.14", "michielroos/typo3scan": "^1.7", "squizlabs/php_codesniffer": "^3.7", "symfony/dom-crawler": "^6.3", + "typo3/cms-filelist": "*", "typo3/cms-fluid-styled-content": "*" }, "replace": { @@ -35,9 +36,9 @@ }, "config": { "allow-plugins": { + "ergebnis/composer-normalize": true, "typo3/class-alias-loader": true, - "typo3/cms-composer-installers": true, - "ergebnis/composer-normalize": true + "typo3/cms-composer-installers": true }, "bin-dir": ".Build/bin", "vendor-dir": ".Build/vendor" diff --git a/ext_emconf.php b/ext_emconf.php index d9ebf9c1..53a96f4e 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -12,7 +12,7 @@ 'author' => 'Alexander Stehlik', 'author_email' => 'alexander.stehlik.deleteme@gmail.com', 'author_company' => '', - 'version' => '12.1.0', + 'version' => '12.1.1', 'constraints' => [ 'depends' => [ 'typo3' => '12.4.0-12.4.99',