diff --git a/.code-quality/phpstan.neon b/.code-quality/phpstan.neon index 09d8aa9..441fdca 100644 --- a/.code-quality/phpstan.neon +++ b/.code-quality/phpstan.neon @@ -8,9 +8,11 @@ parameters: paths: - "../Classes/" + ignoreErrors: + - identifier: missingType.iterableValue + - identifier: missingType.generics + inferPrivatePropertyTypeFromConstructor: true - checkMissingIterableValueType: false - checkGenericClassInNonGenericObjectType: false services: - diff --git a/.code-quality/rector.php b/.code-quality/rector.php index 44bcb72..f596b03 100644 --- a/.code-quality/rector.php +++ b/.code-quality/rector.php @@ -5,7 +5,6 @@ use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector; use Rector\Config\RectorConfig; use Rector\DeadCode\Rector\Property\RemoveUnusedPrivatePropertyRector; -use Rector\EarlyReturn\Rector\If_\ChangeAndIfToEarlyReturnRector; use Rector\Set\ValueObject\SetList; use Rector\PHPUnit\CodeQuality\Rector\Class_\YieldDataProviderRector; use Rector\PHPUnit\Set\PHPUnitSetList; @@ -33,7 +32,6 @@ PHPUnitSetList::PHPUNIT_CODE_QUALITY ]) ->withSkip([ - ChangeAndIfToEarlyReturnRector::class, TypedPropertyFromStrictSetUpRector::class, AddMethodCallBasedStrictParamTypeRector::class, FlipTypeControlToUseExclusiveTypeRector::class, diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7fd0f0d..b879f79 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,7 +10,7 @@ jobs: strategy: fail-fast: false matrix: - typo3: [ ^11.5, ^12.4 ] + typo3: [ ^12.4 ] php: [ '8.1', '8.2', '8.3' ] mysql: [ '5.7' ] diff --git a/.scrutinizer.yml b/.scrutinizer.yml index a9b4ede..ed51821 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -1,6 +1,9 @@ build: nodes: analysis: + image: default-bionic + environment: + php: 8.3.0 tests: override: - php-scrutinizer-run @@ -15,14 +18,14 @@ filter: tools: external_code_coverage: - timeout: 700 + timeout: 1200 runs: 1 php_cpd: enabled: true php_code_sniffer: enabled: true config: - standard: TYPO3CMS + standard: PSR2 php_cs_fixer: enabled: true php_hhvm: diff --git a/Configuration/Services.yaml b/Configuration/Services.yaml index bde78b8..901b7d0 100644 --- a/Configuration/Services.yaml +++ b/Configuration/Services.yaml @@ -16,4 +16,4 @@ services: AOE\HappyFeet\Domain\Repository\FootnoteRepository: AOE\HappyFeet\Typo3\Hook\HappyFeetLinkWizzard: - public: true + public: true \ No newline at end of file diff --git a/Configuration/TCA/tx_happyfeet_domain_model_footnote.php b/Configuration/TCA/tx_happyfeet_domain_model_footnote.php index 3219cef..60ca84f 100644 --- a/Configuration/TCA/tx_happyfeet_domain_model_footnote.php +++ b/Configuration/TCA/tx_happyfeet_domain_model_footnote.php @@ -70,25 +70,20 @@ 'exclude' => 1, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime', 'config' => [ - 'type' => 'input', - 'renderType' => 'datetime', - 'size' => '8', - 'eval' => 'date', + 'type' => 'datetime', + 'format' => 'date', + 'size' => '20', 'default' => '0', - 'checkbox' => '0' ] ], 'endtime' => [ 'exclude' => 1, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime', 'config' => [ - 'type' => 'input', - 'renderType' => 'datetime', - 'size' => '8', - 'eval' => 'date', - 'checkbox' => '0', + 'type' => 'datetime', + 'format' => 'date', + 'size' => '20', 'default' => '0', - 'range' => 'must be configured in ext_tables.php, behause the configuration-data is not cacheable!' ] ], 'index_number' => [ diff --git a/README.md b/README.md index 5c35347..414853c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # happy_feet -[![Build Status](https://github.com/AOEpeople/happy_feet/workflows/CI/badge.svg?branch=main)](https://github.com/AOEpeople/happy_feet/actions) +[![Build Status](https://github.com/AOEpeople/happy_feet/actions/workflows/tests.yml/badge.svg)](https://github.com/AOEpeople/happy_feet/actions) [![Code Coverage](https://scrutinizer-ci.com/g/AOEpeople/happy_feet/badges/coverage.png?b=main)](https://scrutinizer-ci.com/g/AOEpeople/happy_feet/?branch=main) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/AOEpeople/happy_feet/badges/quality-score.png?b=main)](https://scrutinizer-ci.com/g/AOEpeople/happy_feet/?branch=main) @@ -20,11 +20,11 @@ The documentation is available online at [docs.typo3.org][2]. ## Versions and Support -| Release | TYPO3 | PHP | Fixes will contain -|---------|----------|---------|--------------------| -| 11.x.y | 11.5 | 7.4-8.3 | Features, Bugfixes, Security Updates -| 8.3.y | 8.7-10.4 | 7.2-7.4 | Security Updates -| 5.x.y | 7.6 | 5.5-5.6 | End of life +| Release | TYPO3 | PHP | Fixes will contain | +|---------|----------|---------|--------------------------------------| +| 12.x.y | 12.4 | 8.1-8.3 | Features, Bugfixes, Security Updates | +| 11.x.y | 11.5 | 7.4-8.0 | Security Updates | +| 8.x.y | 8.7 | 7.2-7.4 | End of life | ## Copyright / License diff --git a/Tests/Unit/Typo3/Hooks/TcemainTest.php b/Tests/Unit/Typo3/Hooks/TcemainTest.php index 4351492..4dd5d54 100644 --- a/Tests/Unit/Typo3/Hooks/TcemainTest.php +++ b/Tests/Unit/Typo3/Hooks/TcemainTest.php @@ -47,12 +47,12 @@ class TcemainTest extends UnitTestCase /** * @var DataHandler */ - protected $dataHandler; + protected MockObject $dataHandler; /** * @var FootnoteRepository|MockObject */ - protected $footnoteRepository; + protected MockObject $footnoteRepository; protected function setUp(): void { diff --git a/composer.json b/composer.json index 99edb61..db3cdd3 100755 --- a/composer.json +++ b/composer.json @@ -17,19 +17,19 @@ } ], "require": { - "php": ">8.0", + "php": "^8.1", "ext-pdo": "*", - "typo3/cms-core": "^11.5 || ^12.4", + "typo3/cms-core": "^12.4", "typo3/cms-extbase": "*" }, "require-dev": { - "phpunit/phpcov": "^8.0 || ^9.0", - "typo3/testing-framework": "^7.0 || ^8.0", + "phpunit/phpcov": "^9.0", + "typo3/testing-framework": "^8.0", "phpcompatibility/php-compatibility": "^9.3", "phpstan/phpstan": "^1.10", "rector/rector": "^1.0", - "symplify/easy-coding-standard": "12.1.14", - "symplify/phpstan-rules": "12.4.8" + "symplify/easy-coding-standard": "^12.1", + "symplify/phpstan-rules": "^13.0.0" }, "autoload": { "classmap": [ @@ -82,11 +82,9 @@ "./.Build/bin/phpstan analyse -c .code-quality/phpstan.neon --memory-limit=1G --generate-baseline" ], "code-compatibility": [ - "[ -e ./.Build/vendor/symplify/easy-coding-standard/vendor/squizlabs/php_codesniffer/bin/phpcs ] || composer install", + "[ -e ./.Build/vendor/symplify/easy-coding-standard/vendor/squizlabs/php_codesniffer/bin/phpcs ] || composer update", "[ -d ./reports/php_checkstyle ] || mkdir -p reports/php_checkstyle/", "./.code-quality/configure-checkstyle.sh", - "./.Build/vendor/symplify/easy-coding-standard/vendor/squizlabs/php_codesniffer/bin/phpcs -d memory_limit=1G --standard=PHPCompatibility --colors --ignore=*/.Build/* -p . --runtime-set testVersion 7.4", - "./.Build/vendor/symplify/easy-coding-standard/vendor/squizlabs/php_codesniffer/bin/phpcs -d memory_limit=1G --standard=PHPCompatibility --colors --ignore=*/.Build/* -p . --runtime-set testVersion 8.0", "./.Build/vendor/symplify/easy-coding-standard/vendor/squizlabs/php_codesniffer/bin/phpcs -d memory_limit=1G --standard=PHPCompatibility --colors --ignore=*/.Build/* -p . --runtime-set testVersion 8.1", "./.Build/vendor/symplify/easy-coding-standard/vendor/squizlabs/php_codesniffer/bin/phpcs -d memory_limit=1G --standard=PHPCompatibility --colors --ignore=*/.Build/* -p . --runtime-set testVersion 8.2", "./.Build/vendor/symplify/easy-coding-standard/vendor/squizlabs/php_codesniffer/bin/phpcs -d memory_limit=1G --standard=PHPCompatibility --colors --ignore=*/.Build/* -p . --runtime-set testVersion 8.3" @@ -106,7 +104,7 @@ }, "extra": { "branch-alias": { - "dev-main": "11.1.x-dev" + "dev-main": "12.0.x-dev" }, "typo3/cms": { "cms-package-dir": "{$vendor-dir}/typo3/cms", diff --git a/ext_emconf.php b/ext_emconf.php index 0ffdd65..6908d53 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -19,10 +19,10 @@ 'clearCacheOnLoad' => 0, 'lockType' => '', 'author_company' => 'AOE GmbH', - 'version' => '11.3.5', + 'version' => '12.0.0', 'constraints' => [ 'depends' => [ - 'typo3' => '11.5.0-11.5.99', + 'typo3' => '12.4.0-12.4.99', ], 'conflicts' => [], 'suggests' => [], diff --git a/ext_localconf.php b/ext_localconf.php index 87db85a..da722d7 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -2,7 +2,6 @@ use AOE\HappyFeet\Typo3\Hook\LinkHandler; use AOE\HappyFeet\Typo3\Hook\LinkRenderer; -use AOE\HappyFeet\Typo3\Hook\Tcemain; use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; defined('TYPO3') or die(); @@ -15,8 +14,5 @@ "@import 'EXT:happy_feet/Configuration/TsConfig/Page/TceMain.tsconfig'" ); -#$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['happy_feet'] = -# Tcemain::class; - $GLOBALS['TYPO3_CONF_VARS']['FE']['typolinkBuilder']['happy_feet'] = LinkRenderer::class; $GLOBALS['TYPO3_CONF_VARS']['SYS']['linkHandler']['happy_feet'] = LinkHandler::class; diff --git a/ext_tables.php b/ext_tables.php index 98022fc..bf008f2 100644 --- a/ext_tables.php +++ b/ext_tables.php @@ -1,10 +1,4 @@ mktime(0, 0, 0, 12, 31, date('Y') + 10), - 'lower' => mktime(0, 0, 0, date('m') - 1, date('d'), date('Y')) -]; - -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_happyfeet_domain_model_footnote'); +$GLOBALS['TCA']['tx_happyfeet_domain_model_footnote']['ctrl']['security']['ignorePageTypeRestriction'] = true;