From 1897f14a5c886ff614ed294585ed60a6b6be21a6 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann <coding@daniel-siepmann.de> Date: Mon, 3 Feb 2025 12:27:27 +0100 Subject: [PATCH 01/12] [!!!][TASK] Drop support for PHP < 8.1 (#1576) As this is not supported by current TYPO3 LTS versions. Resolves: #1566 --- .github/workflows/ci.yml | 26 ------------------- .../pipeline/jobs/func-php7.4-v11-highest.yml | 14 ---------- .../pipeline/jobs/func-php7.4-v11-lowest.yml | 14 ---------- .../pipeline/jobs/func-php8.0-v11-highest.yml | 14 ---------- .../pipeline/jobs/func-php8.0-v11-lowest.yml | 14 ---------- .gitlab/pipeline/jobs/php-lint-php7.4.yml | 7 ----- .gitlab/pipeline/jobs/php-lint-php8.0.yml | 7 ----- .../pipeline/jobs/unit-php7.4-v11-highest.yml | 12 --------- .../pipeline/jobs/unit-php7.4-v11-lowest.yml | 12 --------- .../pipeline/jobs/unit-php8.0-v11-highest.yml | 12 --------- .../pipeline/jobs/unit-php8.0-v11-lowest.yml | 12 --------- Build/Scripts/runTests.sh | 6 ++--- composer.json | 2 +- ext_emconf.php | 2 +- rector.php | 2 +- 15 files changed, 5 insertions(+), 151 deletions(-) delete mode 100644 .gitlab/pipeline/jobs/func-php7.4-v11-highest.yml delete mode 100644 .gitlab/pipeline/jobs/func-php7.4-v11-lowest.yml delete mode 100644 .gitlab/pipeline/jobs/func-php8.0-v11-highest.yml delete mode 100644 .gitlab/pipeline/jobs/func-php8.0-v11-lowest.yml delete mode 100644 .gitlab/pipeline/jobs/php-lint-php7.4.yml delete mode 100644 .gitlab/pipeline/jobs/php-lint-php8.0.yml delete mode 100644 .gitlab/pipeline/jobs/unit-php7.4-v11-highest.yml delete mode 100644 .gitlab/pipeline/jobs/unit-php7.4-v11-lowest.yml delete mode 100644 .gitlab/pipeline/jobs/unit-php8.0-v11-highest.yml delete mode 100644 .gitlab/pipeline/jobs/unit-php8.0-v11-lowest.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e59e02a..762d36b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,8 +41,6 @@ jobs: fail-fast: false matrix: php-version: - - "7.4" - - "8.0" - "8.1" - "8.2" - "8.3" @@ -159,18 +157,6 @@ jobs: fail-fast: false matrix: include: - - typo3-version: "^11.5" - php-version: "7.4" - composer-dependencies: lowest - - typo3-version: "^11.5" - php-version: "7.4" - composer-dependencies: highest - - typo3-version: "^11.5" - php-version: "8.0" - composer-dependencies: lowest - - typo3-version: "^11.5" - php-version: "8.0" - composer-dependencies: highest - typo3-version: "^11.5" php-version: "8.1" composer-dependencies: lowest @@ -266,18 +252,6 @@ jobs: fail-fast: false matrix: include: - - typo3-version: "^11.5" - php-version: "7.4" - composer-dependencies: lowest - - typo3-version: "^11.5" - php-version: "7.4" - composer-dependencies: highest - - typo3-version: "^11.5" - php-version: "8.0" - composer-dependencies: lowest - - typo3-version: "^11.5" - php-version: "8.0" - composer-dependencies: highest - typo3-version: "^11.5" php-version: "8.1" composer-dependencies: lowest diff --git a/.gitlab/pipeline/jobs/func-php7.4-v11-highest.yml b/.gitlab/pipeline/jobs/func-php7.4-v11-highest.yml deleted file mode 100644 index 68f6353..0000000 --- a/.gitlab/pipeline/jobs/func-php7.4-v11-highest.yml +++ /dev/null @@ -1,14 +0,0 @@ -func-php7.4-v11-highest: - extends: .default - image: ghcr.io/typo3/core-testing-php74:latest - services: - - mariadb:10 - stage: test - needs: - - build-composer-dependencies - - php-lint-php7.4 - script: - - echo "Job ${CI_JOB_NAME}" - - composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5" - - composer update --no-ansi --no-interaction --no-progress --with-dependencies - - composer ci:tests:functional diff --git a/.gitlab/pipeline/jobs/func-php7.4-v11-lowest.yml b/.gitlab/pipeline/jobs/func-php7.4-v11-lowest.yml deleted file mode 100644 index d87b592..0000000 --- a/.gitlab/pipeline/jobs/func-php7.4-v11-lowest.yml +++ /dev/null @@ -1,14 +0,0 @@ -func-php7.4-v11-lowest: - extends: .default - image: ghcr.io/typo3/core-testing-php74:latest - services: - - mariadb:10 - stage: test - needs: - - build-composer-dependencies - - php-lint-php7.4 - script: - - echo "Job ${CI_JOB_NAME}" - - composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5" - - composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest - - composer ci:tests:functional diff --git a/.gitlab/pipeline/jobs/func-php8.0-v11-highest.yml b/.gitlab/pipeline/jobs/func-php8.0-v11-highest.yml deleted file mode 100644 index 4b819fd..0000000 --- a/.gitlab/pipeline/jobs/func-php8.0-v11-highest.yml +++ /dev/null @@ -1,14 +0,0 @@ -func-php8.0-v11-highest: - extends: .default - image: ghcr.io/typo3/core-testing-php80:latest - services: - - mariadb:10 - stage: test - needs: - - build-composer-dependencies - - php-lint-php8.0 - script: - - echo "Job ${CI_JOB_NAME}" - - composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5" - - composer update --no-ansi --no-interaction --no-progress --with-dependencies - - composer ci:tests:functional diff --git a/.gitlab/pipeline/jobs/func-php8.0-v11-lowest.yml b/.gitlab/pipeline/jobs/func-php8.0-v11-lowest.yml deleted file mode 100644 index 14b0571..0000000 --- a/.gitlab/pipeline/jobs/func-php8.0-v11-lowest.yml +++ /dev/null @@ -1,14 +0,0 @@ -func-php8.0-v11-lowest: - extends: .default - image: ghcr.io/typo3/core-testing-php80:latest - services: - - mariadb:10 - stage: test - needs: - - build-composer-dependencies - - php-lint-php8.0 - script: - - echo "Job ${CI_JOB_NAME}" - - composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5" - - composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest - - composer ci:tests:functional diff --git a/.gitlab/pipeline/jobs/php-lint-php7.4.yml b/.gitlab/pipeline/jobs/php-lint-php7.4.yml deleted file mode 100644 index 03bff54..0000000 --- a/.gitlab/pipeline/jobs/php-lint-php7.4.yml +++ /dev/null @@ -1,7 +0,0 @@ -php-lint-php7.4: - extends: .composer-update - image: ghcr.io/typo3/core-testing-php74:latest - stage: lint - needs: [ ] - script: - - composer ci:php:lint diff --git a/.gitlab/pipeline/jobs/php-lint-php8.0.yml b/.gitlab/pipeline/jobs/php-lint-php8.0.yml deleted file mode 100644 index bb24279..0000000 --- a/.gitlab/pipeline/jobs/php-lint-php8.0.yml +++ /dev/null @@ -1,7 +0,0 @@ -php-lint-php8.0: - extends: .composer-update - image: ghcr.io/typo3/core-testing-php80:latest - stage: lint - needs: [ ] - script: - - composer ci:php:lint diff --git a/.gitlab/pipeline/jobs/unit-php7.4-v11-highest.yml b/.gitlab/pipeline/jobs/unit-php7.4-v11-highest.yml deleted file mode 100644 index e440b26..0000000 --- a/.gitlab/pipeline/jobs/unit-php7.4-v11-highest.yml +++ /dev/null @@ -1,12 +0,0 @@ -unit-php7.4-v11-highest: - extends: .default - image: ghcr.io/typo3/core-testing-php74:latest - stage: test - needs: - - build-composer-dependencies - - php-lint-php7.4 - script: - - echo "Job ${CI_JOB_NAME}" - - composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5" - - composer update --no-ansi --no-interaction --no-progress --with-dependencies - - composer ci:tests:unit diff --git a/.gitlab/pipeline/jobs/unit-php7.4-v11-lowest.yml b/.gitlab/pipeline/jobs/unit-php7.4-v11-lowest.yml deleted file mode 100644 index 1408415..0000000 --- a/.gitlab/pipeline/jobs/unit-php7.4-v11-lowest.yml +++ /dev/null @@ -1,12 +0,0 @@ -unit-php7.4-v11-lowest: - extends: .default - image: ghcr.io/typo3/core-testing-php74:latest - stage: test - needs: - - build-composer-dependencies - - php-lint-php7.4 - script: - - echo "Job ${CI_JOB_NAME}" - - composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5" - - composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest - - composer ci:tests:unit diff --git a/.gitlab/pipeline/jobs/unit-php8.0-v11-highest.yml b/.gitlab/pipeline/jobs/unit-php8.0-v11-highest.yml deleted file mode 100644 index fe68ecb..0000000 --- a/.gitlab/pipeline/jobs/unit-php8.0-v11-highest.yml +++ /dev/null @@ -1,12 +0,0 @@ -unit-php8.0-v11-highest: - extends: .default - image: ghcr.io/typo3/core-testing-php80:latest - stage: test - needs: - - build-composer-dependencies - - php-lint-php8.0 - script: - - echo "Job ${CI_JOB_NAME}" - - composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5" - - composer update --no-ansi --no-interaction --no-progress --with-dependencies - - composer ci:tests:unit diff --git a/.gitlab/pipeline/jobs/unit-php8.0-v11-lowest.yml b/.gitlab/pipeline/jobs/unit-php8.0-v11-lowest.yml deleted file mode 100644 index 0293c3f..0000000 --- a/.gitlab/pipeline/jobs/unit-php8.0-v11-lowest.yml +++ /dev/null @@ -1,12 +0,0 @@ -unit-php8.0-v11-lowest: - extends: .default - image: ghcr.io/typo3/core-testing-php80:latest - stage: test - needs: - - build-composer-dependencies - - php-lint-php8.0 - script: - - echo "Job ${CI_JOB_NAME}" - - composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5" - - composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest - - composer ci:tests:unit diff --git a/Build/Scripts/runTests.sh b/Build/Scripts/runTests.sh index e16be97..ed3879f 100755 --- a/Build/Scripts/runTests.sh +++ b/Build/Scripts/runTests.sh @@ -229,10 +229,8 @@ Options: - 11.5: use TYPO3 v11 with typo3/cms-composer-installers ^3 - 12.4: (default) use TYPO3 v12 with typo3/cms-composer-installers ^5 - -p <7.4|8.0|8.1|8.2|8.3|8.4> + -p <8.1|8.2|8.3|8.4> Specifies the PHP minor version to be used - - 7.4: use PHP 7.4 - - 8.0: use PHP 8.0 - 8.1: use PHP 8.1 - 8.2: use PHP 8.2 - 8.3: (default) use PHP 8.3 @@ -367,7 +365,7 @@ while getopts "a:b:s:d:i:p:e:t:xy:o:nhu" OPT; do ;; p) PHP_VERSION=${OPTARG} - if ! [[ ${PHP_VERSION} =~ ^(7.4|8.0|8.1|8.2|8.3|8.4)$ ]]; then + if ! [[ ${PHP_VERSION} =~ ^(8.1|8.2|8.3|8.4)$ ]]; then INVALID_OPTIONS+=("-p ${OPTARG}") fi ;; diff --git a/composer.json b/composer.json index 66d7faf..d5cf2ed 100644 --- a/composer.json +++ b/composer.json @@ -39,7 +39,7 @@ "docs": "https://docs.typo3.org/p/ttn/tea/main/en-us/" }, "require": { - "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0", "psr/http-message": "^1.0.1", "typo3/cms-core": "^11.5.41 || ^12.4.26", "typo3/cms-extbase": "^11.5.41 || ^12.4.26", diff --git a/ext_emconf.php b/ext_emconf.php index 18559e1..b41745f 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -7,7 +7,7 @@ $EM_CONF[$_EXTKEY] = [ 'category' => 'example', 'constraints' => [ 'depends' => [ - 'php' => '7.4.0-8.3.99', + 'php' => '8.1.0-8.3.99', 'typo3' => '11.5.41-12.4.99', 'extbase' => '11.5.41-12.4.99', 'fluid' => '11.5.41-12.4.99', diff --git a/rector.php b/rector.php index f75a11b..aaaf1b0 100644 --- a/rector.php +++ b/rector.php @@ -95,7 +95,7 @@ return RectorConfig::configure() ]) ->withImportNames(true, true, false) ->withConfiguredRule(ExtEmConfRector::class, [ - ExtEmConfRector::PHP_VERSION_CONSTRAINT => '7.4.0-8.3.99', + ExtEmConfRector::PHP_VERSION_CONSTRAINT => '8.1.0-8.3.99', ExtEmConfRector::TYPO3_VERSION_CONSTRAINT => '11.5.41-12.4.99', ExtEmConfRector::ADDITIONAL_VALUES_TO_BE_REMOVED => [], ]) From a97840eccd04fa088f53770e000cae207e9cfc6b Mon Sep 17 00:00:00 2001 From: Daniel Siepmann <coding@daniel-siepmann.de> Date: Mon, 3 Feb 2025 12:53:11 +0100 Subject: [PATCH 02/12] [!!!][TASK] Remove TYPO3 v11 Support (#1578) As official v11 support has stopped. Resolves: #1567 --- .github/workflows/ci.yml | 36 -------- .../pipeline/jobs/func-php8.1-v11-highest.yml | 14 --- .../pipeline/jobs/func-php8.1-v11-lowest.yml | 14 --- .../pipeline/jobs/unit-php8.1-v11-highest.yml | 12 --- .../pipeline/jobs/unit-php8.1-v11-lowest.yml | 12 --- Build/Scripts/runTests.sh | 5 +- Configuration/TCA/tx_tea_domain_model_tea.php | 86 +------------------ README.md | 1 - .../FrontEndEditorControllerTest.php | 32 ++----- Tests/Unit/Controller/TeaControllerTest.php | 4 - composer.json | 10 +-- ext_emconf.php | 8 +- rector.php | 5 +- 13 files changed, 19 insertions(+), 220 deletions(-) delete mode 100644 .gitlab/pipeline/jobs/func-php8.1-v11-highest.yml delete mode 100644 .gitlab/pipeline/jobs/func-php8.1-v11-lowest.yml delete mode 100644 .gitlab/pipeline/jobs/unit-php8.1-v11-highest.yml delete mode 100644 .gitlab/pipeline/jobs/unit-php8.1-v11-lowest.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 762d36b..6acc10e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -157,24 +157,6 @@ jobs: fail-fast: false matrix: include: - - typo3-version: "^11.5" - php-version: "8.1" - composer-dependencies: lowest - - typo3-version: "^11.5" - php-version: "8.1" - composer-dependencies: highest - - typo3-version: "^11.5" - php-version: "8.2" - composer-dependencies: lowest - - typo3-version: "^11.5" - php-version: "8.2" - composer-dependencies: highest - - typo3-version: "^11.5" - php-version: "8.3" - composer-dependencies: lowest - - typo3-version: "^11.5" - php-version: "8.3" - composer-dependencies: highest - typo3-version: "^12.4" php-version: "8.1" composer-dependencies: lowest @@ -252,24 +234,6 @@ jobs: fail-fast: false matrix: include: - - typo3-version: "^11.5" - php-version: "8.1" - composer-dependencies: lowest - - typo3-version: "^11.5" - php-version: "8.1" - composer-dependencies: highest - - typo3-version: "^11.5" - php-version: "8.2" - composer-dependencies: lowest - - typo3-version: "^11.5" - php-version: "8.2" - composer-dependencies: highest - - typo3-version: "^11.5" - php-version: "8.3" - composer-dependencies: lowest - - typo3-version: "^11.5" - php-version: "8.3" - composer-dependencies: highest - typo3-version: "^12.4" php-version: "8.1" composer-dependencies: lowest diff --git a/.gitlab/pipeline/jobs/func-php8.1-v11-highest.yml b/.gitlab/pipeline/jobs/func-php8.1-v11-highest.yml deleted file mode 100644 index ca7bd93..0000000 --- a/.gitlab/pipeline/jobs/func-php8.1-v11-highest.yml +++ /dev/null @@ -1,14 +0,0 @@ -func-php8.1-v11-highest: - extends: .default - image: ghcr.io/typo3/core-testing-php81:latest - services: - - mariadb:10 - stage: test - needs: - - build-composer-dependencies - - php-lint-php8.1 - script: - - echo "Job ${CI_JOB_NAME}" - - composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5" - - composer update --no-ansi --no-interaction --no-progress --with-dependencies - - composer ci:tests:functional diff --git a/.gitlab/pipeline/jobs/func-php8.1-v11-lowest.yml b/.gitlab/pipeline/jobs/func-php8.1-v11-lowest.yml deleted file mode 100644 index eab6293..0000000 --- a/.gitlab/pipeline/jobs/func-php8.1-v11-lowest.yml +++ /dev/null @@ -1,14 +0,0 @@ -func-php8.1-v11-lowest: - extends: .default - image: ghcr.io/typo3/core-testing-php81:latest - services: - - mariadb:10 - stage: test - needs: - - build-composer-dependencies - - php-lint-php8.1 - script: - - echo "Job ${CI_JOB_NAME}" - - composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5" - - composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest - - composer ci:tests:functional diff --git a/.gitlab/pipeline/jobs/unit-php8.1-v11-highest.yml b/.gitlab/pipeline/jobs/unit-php8.1-v11-highest.yml deleted file mode 100644 index c4e8a50..0000000 --- a/.gitlab/pipeline/jobs/unit-php8.1-v11-highest.yml +++ /dev/null @@ -1,12 +0,0 @@ -unit-php8.1-v11-highest: - extends: .default - image: ghcr.io/typo3/core-testing-php81:latest - stage: test - needs: - - build-composer-dependencies - - php-lint-php8.1 - script: - - echo "Job ${CI_JOB_NAME}" - - composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5" - - composer update --no-ansi --no-interaction --no-progress --with-dependencies - - composer ci:tests:unit diff --git a/.gitlab/pipeline/jobs/unit-php8.1-v11-lowest.yml b/.gitlab/pipeline/jobs/unit-php8.1-v11-lowest.yml deleted file mode 100644 index 1eca603..0000000 --- a/.gitlab/pipeline/jobs/unit-php8.1-v11-lowest.yml +++ /dev/null @@ -1,12 +0,0 @@ -unit-php8.1-v11-lowest: - extends: .default - image: ghcr.io/typo3/core-testing-php81:latest - stage: test - needs: - - build-composer-dependencies - - php-lint-php8.1 - script: - - echo "Job ${CI_JOB_NAME}" - - composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5" - - composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest - - composer ci:tests:unit diff --git a/Build/Scripts/runTests.sh b/Build/Scripts/runTests.sh index ed3879f..d11f14c 100755 --- a/Build/Scripts/runTests.sh +++ b/Build/Scripts/runTests.sh @@ -223,10 +223,9 @@ Options: - 15 maintained until 2027-11-11 - 16 maintained until 2028-11-09 - -t <11.5|12.4> + -t <12.4> Only with -s composerUpdateMin|composerUpdateMax Specifies the TYPO3 CORE Version to be used - - 11.5: use TYPO3 v11 with typo3/cms-composer-installers ^3 - 12.4: (default) use TYPO3 v12 with typo3/cms-composer-installers ^5 -p <8.1|8.2|8.3|8.4> @@ -374,7 +373,7 @@ while getopts "a:b:s:d:i:p:e:t:xy:o:nhu" OPT; do ;; t) CORE_VERSION=${OPTARG} - if ! [[ ${CORE_VERSION} =~ ^(11.5|12.4)$ ]]; then + if ! [[ ${CORE_VERSION} =~ ^(12.4)$ ]]; then INVALID_OPTIONS+=("-t ${OPTARG}") fi ;; diff --git a/Configuration/TCA/tx_tea_domain_model_tea.php b/Configuration/TCA/tx_tea_domain_model_tea.php index f1b6b6c..e8986ae 100644 --- a/Configuration/TCA/tx_tea_domain_model_tea.php +++ b/Configuration/TCA/tx_tea_domain_model_tea.php @@ -1,9 +1,6 @@ <?php -use TYPO3\CMS\Core\Information\Typo3Version; -use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; - -$tca = [ +return [ 'ctrl' => [ 'title' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea', 'label' => 'title', @@ -208,84 +205,3 @@ $tca = [ ], ], ]; - -$typo3Version = new Typo3Version(); -if ($typo3Version->getMajorVersion() < 12) { - $tca = array_replace_recursive( - $tca, - [ - 'ctrl' => [ - 'cruser_id' => 'cruser_id', - ], - 'columns' => [ - 'title' => [ - 'config' => [ - 'eval' => 'trim,required', - ], - ], - ], - ] - ); - unset($tca['columns']['title']['required']); - - $tca['columns']['l18n_parent']['config']['items'] = [ - [ - 0 => '', - 1 => 0, - ], - ]; - $tca['columns']['image'] = [ - 'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea.image', - 'config' => ExtensionManagementUtility::getFileFieldTCAConfig( - 'image', - [ - 'maxitems' => 1, - 'appearance' => [ - 'collapseAll' => true, - 'useSortable' => false, - 'enabledControls' => [ - 'hide' => false, - ], - ], - ] - ), - ]; - $tca['columns']['hidden']['config'] = [ - 'type' => 'check', - 'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea.hidden', - 'items' => [ - [ - 0 => '', - 'invertStateDisplay' => true, - ], - ], - ]; - $tca['columns']['starttime']['config'] = [ - 'type' => 'input', - 'renderType' => 'inputDateTime', - 'eval' => 'datetime,int', - 'default' => 0, - ]; - $tca['columns']['endtime']['config'] = [ - 'type' => 'input', - 'renderType' => 'inputDateTime', - 'eval' => 'datetime,int', - 'default' => 0, - ]; - $tca['columns']['fe_group']['config']['items'] = [ - [ - 0 => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.hide_at_login', - 1 => -1, - ], - [ - 0 => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.any_login', - 1 => -2, - ], - [ - 0 => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.usergroups', - 1 => '--div--', - ], - ]; -} - -return $tca; diff --git a/README.md b/README.md index 19651a9..6e9c522 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # Example TYPO3 extension for code quality checks and automated tests [](https://get.typo3.org/version/12) -[](https://get.typo3.org/version/11) [](https://packagist.org/packages/ttn/tea) [](https://packagist.org/packages/ttn/tea) [](https://github.com/TYPO3BestPractices/tea/actions) diff --git a/Tests/Unit/Controller/FrontEndEditorControllerTest.php b/Tests/Unit/Controller/FrontEndEditorControllerTest.php index b871613..a90712b 100644 --- a/Tests/Unit/Controller/FrontEndEditorControllerTest.php +++ b/Tests/Unit/Controller/FrontEndEditorControllerTest.php @@ -12,10 +12,8 @@ use TYPO3\CMS\Core\Context\Context; use TYPO3\CMS\Core\Context\UserAspect; use TYPO3\CMS\Core\Http\HtmlResponse; use TYPO3\CMS\Core\Http\RedirectResponse; -use TYPO3\CMS\Core\Information\Typo3Version; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; -use TYPO3\CMS\Extbase\Mvc\Exception\StopActionException; use TYPO3\CMS\Extbase\Persistence\QueryResultInterface; use TYPO3\CMS\Fluid\View\TemplateView; use TYPO3\TestingFramework\Core\AccessibleObjectInterface; @@ -55,9 +53,6 @@ final class FrontEndEditorControllerTest extends UnitTestCase // We need to create an accessible mock in order to be able to set the protected `view`. $methodsToMock = ['htmlResponse', 'redirect', 'redirectToUri']; - if ((new Typo3Version())->getMajorVersion() < 12) { - $methodsToMock[] = 'forward'; - } $this->subject = $this->getAccessibleMock( FrontEndEditorController::class, $methodsToMock, @@ -214,32 +209,15 @@ final class FrontEndEditorControllerTest extends UnitTestCase private function mockRedirect(string $actionName): void { - if ((new Typo3Version())->getMajorVersion() < 12) { - $this->subject->expects(self::once())->method('redirect') - ->with($actionName) - // @phpstan-ignore-next-line This class does not exist in V12 anymore, but this branch is V11-only. - ->willThrowException(new StopActionException('redirectToUri', 1476045828)); - // @phpstan-ignore-next-line This class does not exist in V12 anymore, but this branch is V11-only. - $this->expectException(StopActionException::class); - } else { - $redirectResponse = $this->createStub(RedirectResponse::class); - $this->subject->expects(self::once())->method('redirect')->with($actionName) - ->willReturn($redirectResponse); - } + $redirectResponse = $this->createStub(RedirectResponse::class); + $this->subject->expects(self::once())->method('redirect')->with($actionName) + ->willReturn($redirectResponse); } private function stubRedirect(string $actionName): void { - if ((new Typo3Version())->getMajorVersion() < 12) { - $this->subject->method('redirect') - // @phpstan-ignore-next-line This class does not exist in V12 anymore, but this branch is V11-only. - ->willThrowException(new StopActionException('redirectToUri', 1476045828)); - // @phpstan-ignore-next-line This class does not exist in V12 anymore, but this branch is V11-only. - $this->expectException(StopActionException::class); - } else { - $redirectResponse = $this->createStub(RedirectResponse::class); - $this->subject->method('redirect')->willReturn($redirectResponse); - } + $redirectResponse = $this->createStub(RedirectResponse::class); + $this->subject->method('redirect')->willReturn($redirectResponse); } /** diff --git a/Tests/Unit/Controller/TeaControllerTest.php b/Tests/Unit/Controller/TeaControllerTest.php index b8913d9..568f1f4 100644 --- a/Tests/Unit/Controller/TeaControllerTest.php +++ b/Tests/Unit/Controller/TeaControllerTest.php @@ -9,7 +9,6 @@ use TTN\Tea\Controller\TeaController; use TTN\Tea\Domain\Model\Tea; use TTN\Tea\Domain\Repository\TeaRepository; use TYPO3\CMS\Core\Http\HtmlResponse; -use TYPO3\CMS\Core\Information\Typo3Version; use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; use TYPO3\CMS\Extbase\Persistence\QueryResultInterface; use TYPO3\CMS\Fluid\View\TemplateView; @@ -46,9 +45,6 @@ final class TeaControllerTest extends UnitTestCase $this->teaRepositoryMock = $this->createMock(TeaRepository::class); // We need to create an accessible mock in order to be able to set the protected `view`. $methodsToMock = ['htmlResponse', 'redirect', 'redirectToUri']; - if ((new Typo3Version())->getMajorVersion() < 12) { - $methodsToMock[] = 'forward'; - } $this->subject = $this->getAccessibleMock(TeaController::class, $methodsToMock, [$this->teaRepositoryMock]); $this->viewMock = $this->createMock(TemplateView::class); diff --git a/composer.json b/composer.json index d5cf2ed..0cf6830 100644 --- a/composer.json +++ b/composer.json @@ -41,10 +41,10 @@ "require": { "php": "~8.1.0 || ~8.2.0 || ~8.3.0", "psr/http-message": "^1.0.1", - "typo3/cms-core": "^11.5.41 || ^12.4.26", - "typo3/cms-extbase": "^11.5.41 || ^12.4.26", - "typo3/cms-fluid": "^11.5.41 || ^12.4.26", - "typo3/cms-frontend": "^11.5.41 || ^12.4.26" + "typo3/cms-core": "^12.4.26", + "typo3/cms-extbase": "^12.4.26", + "typo3/cms-fluid": "^12.4.26", + "typo3/cms-frontend": "^12.4.26" }, "require-dev": { "ergebnis/composer-normalize": "2.45.0", @@ -69,7 +69,7 @@ "symfony/yaml": "5.4.45 || 6.4.18 || 7.2.3", "tomasvotruba/cognitive-complexity": "0.2.3", "tomasvotruba/type-coverage": "1.0.0", - "typo3/cms-fluid-styled-content": "^11.5.41 || ^12.4.26", + "typo3/cms-fluid-styled-content": "^12.4.26", "typo3/coding-standards": "0.6.1 || 0.8.0", "typo3/testing-framework": "7.1.1", "webmozart/assert": "^1.11.0" diff --git a/ext_emconf.php b/ext_emconf.php index b41745f..aca4b50 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -8,10 +8,10 @@ $EM_CONF[$_EXTKEY] = [ 'constraints' => [ 'depends' => [ 'php' => '8.1.0-8.3.99', - 'typo3' => '11.5.41-12.4.99', - 'extbase' => '11.5.41-12.4.99', - 'fluid' => '11.5.41-12.4.99', - 'frontend' => '11.5.41-12.4.99', + 'typo3' => '12.4.26-12.4.99', + 'extbase' => '12.4.26-12.4.99', + 'fluid' => '12.4.26-12.4.99', + 'frontend' => '12.4.26-12.4.99', ], ], 'state' => 'stable', diff --git a/rector.php b/rector.php index aaaf1b0..ba12c0e 100644 --- a/rector.php +++ b/rector.php @@ -80,8 +80,7 @@ return RectorConfig::configure() Typo3SetList::CODE_QUALITY, Typo3SetList::GENERAL, - Typo3LevelSetList::UP_TO_TYPO3_11, - // Typo3LevelSetList::UP_TO_TYPO3_12, + Typo3LevelSetList::UP_TO_TYPO3_12, // TYPO3TestingFrameworkSetList::TYPO3_TESTING_FRAMEWORK_7, ]) @@ -96,7 +95,7 @@ return RectorConfig::configure() ->withImportNames(true, true, false) ->withConfiguredRule(ExtEmConfRector::class, [ ExtEmConfRector::PHP_VERSION_CONSTRAINT => '8.1.0-8.3.99', - ExtEmConfRector::TYPO3_VERSION_CONSTRAINT => '11.5.41-12.4.99', + ExtEmConfRector::TYPO3_VERSION_CONSTRAINT => '12.4.26-12.4.99', ExtEmConfRector::ADDITIONAL_VALUES_TO_BE_REMOVED => [], ]) ->withSkip([ From ab4d34f58455b2126074b772b6f7ed23a81b4503 Mon Sep 17 00:00:00 2001 From: Oliver Klee <typo3-coding@oliverklee.de> Date: Mon, 3 Feb 2025 13:20:36 +0100 Subject: [PATCH 03/12] [TASK] Drop obsolete GitLab CI jobs (#1579) Also link two existing jobs. Followup to #1566 and #1567 --- .gitlab/pipeline/.gitlab-ci.yml | 22 ++----------------- .../pipeline/jobs/func-php8.2-v11-highest.yml | 14 ------------ .../pipeline/jobs/func-php8.2-v11-lowest.yml | 14 ------------ .../pipeline/jobs/func-php8.3-v11-highest.yml | 14 ------------ .../pipeline/jobs/func-php8.3-v11-lowest.yml | 14 ------------ .../pipeline/jobs/unit-php8.2-v11-highest.yml | 12 ---------- .../pipeline/jobs/unit-php8.2-v11-lowest.yml | 12 ---------- .../pipeline/jobs/unit-php8.3-v11-highest.yml | 12 ---------- .../pipeline/jobs/unit-php8.3-v11-lowest.yml | 12 ---------- 9 files changed, 2 insertions(+), 124 deletions(-) delete mode 100644 .gitlab/pipeline/jobs/func-php8.2-v11-highest.yml delete mode 100644 .gitlab/pipeline/jobs/func-php8.2-v11-lowest.yml delete mode 100644 .gitlab/pipeline/jobs/func-php8.3-v11-highest.yml delete mode 100644 .gitlab/pipeline/jobs/func-php8.3-v11-lowest.yml delete mode 100644 .gitlab/pipeline/jobs/unit-php8.2-v11-highest.yml delete mode 100644 .gitlab/pipeline/jobs/unit-php8.2-v11-lowest.yml delete mode 100644 .gitlab/pipeline/jobs/unit-php8.3-v11-highest.yml delete mode 100644 .gitlab/pipeline/jobs/unit-php8.3-v11-lowest.yml diff --git a/.gitlab/pipeline/.gitlab-ci.yml b/.gitlab/pipeline/.gitlab-ci.yml index ee51fac..ffdc9da 100644 --- a/.gitlab/pipeline/.gitlab-ci.yml +++ b/.gitlab/pipeline/.gitlab-ci.yml @@ -14,43 +14,25 @@ include: - '/.gitlab/pipeline/jobs/build-composer-dependencies.yml' - '/.gitlab/pipeline/jobs/composer-normalize.yml' - '/.gitlab/pipeline/jobs/composer-psr-verify.yml' - - '/.gitlab/pipeline/jobs/func-php7.4-v11-highest.yml' - - '/.gitlab/pipeline/jobs/func-php7.4-v11-lowest.yml' - - '/.gitlab/pipeline/jobs/func-php8.0-v11-highest.yml' - - '/.gitlab/pipeline/jobs/func-php8.0-v11-lowest.yml' - - '/.gitlab/pipeline/jobs/func-php8.1-v11-highest.yml' - - '/.gitlab/pipeline/jobs/func-php8.1-v11-lowest.yml' - '/.gitlab/pipeline/jobs/func-php8.1-v12-highest.yml' - '/.gitlab/pipeline/jobs/func-php8.1-v12-lowest.yml' - - '/.gitlab/pipeline/jobs/func-php8.2-v11-highest.yml' - - '/.gitlab/pipeline/jobs/func-php8.2-v11-lowest.yml' - '/.gitlab/pipeline/jobs/func-php8.2-v12-highest.yml' - '/.gitlab/pipeline/jobs/func-php8.2-v12-lowest.yml' + - '/.gitlab/pipeline/jobs/func-php8.3-v12-highest.yml' + - '/.gitlab/pipeline/jobs/func-php8.3-v12-lowest.yml' - '/.gitlab/pipeline/jobs/javascript-lint.yml' - '/.gitlab/pipeline/jobs/json-lint.yml' - '/.gitlab/pipeline/jobs/php-cs-fixer.yml' - - '/.gitlab/pipeline/jobs/php-lint-php7.4.yml' - - '/.gitlab/pipeline/jobs/php-lint-php8.0.yml' - '/.gitlab/pipeline/jobs/php-lint-php8.1.yml' - '/.gitlab/pipeline/jobs/php-lint-php8.2.yml' - '/.gitlab/pipeline/jobs/php-lint-php8.3.yml' - '/.gitlab/pipeline/jobs/phpcs.yml' - '/.gitlab/pipeline/jobs/rector.yml' - '/.gitlab/pipeline/jobs/typoscript-lint.yml' - - '/.gitlab/pipeline/jobs/unit-php7.4-v11-highest.yml' - - '/.gitlab/pipeline/jobs/unit-php7.4-v11-lowest.yml' - - '/.gitlab/pipeline/jobs/unit-php8.0-v11-highest.yml' - - '/.gitlab/pipeline/jobs/unit-php8.0-v11-lowest.yml' - - '/.gitlab/pipeline/jobs/unit-php8.1-v11-highest.yml' - - '/.gitlab/pipeline/jobs/unit-php8.1-v11-lowest.yml' - '/.gitlab/pipeline/jobs/unit-php8.1-v12-highest.yml' - '/.gitlab/pipeline/jobs/unit-php8.1-v12-lowest.yml' - - '/.gitlab/pipeline/jobs/unit-php8.2-v11-highest.yml' - - '/.gitlab/pipeline/jobs/unit-php8.2-v11-lowest.yml' - '/.gitlab/pipeline/jobs/unit-php8.2-v12-highest.yml' - '/.gitlab/pipeline/jobs/unit-php8.2-v12-lowest.yml' - - '/.gitlab/pipeline/jobs/unit-php8.3-v11-highest.yml' - - '/.gitlab/pipeline/jobs/unit-php8.3-v11-lowest.yml' - '/.gitlab/pipeline/jobs/unit-php8.3-v12-highest.yml' - '/.gitlab/pipeline/jobs/unit-php8.3-v12-lowest.yml' - '/.gitlab/pipeline/jobs/xliff-lint.yml' diff --git a/.gitlab/pipeline/jobs/func-php8.2-v11-highest.yml b/.gitlab/pipeline/jobs/func-php8.2-v11-highest.yml deleted file mode 100644 index c29c224..0000000 --- a/.gitlab/pipeline/jobs/func-php8.2-v11-highest.yml +++ /dev/null @@ -1,14 +0,0 @@ -func-php8.2-v11-highest: - extends: .default - image: ghcr.io/typo3/core-testing-php82:latest - services: - - mariadb:10 - stage: test - needs: - - build-composer-dependencies - - php-lint-php8.2 - script: - - echo "Job ${CI_JOB_NAME}" - - composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5" - - composer update --no-ansi --no-interaction --no-progress --with-dependencies - - composer ci:tests:functional diff --git a/.gitlab/pipeline/jobs/func-php8.2-v11-lowest.yml b/.gitlab/pipeline/jobs/func-php8.2-v11-lowest.yml deleted file mode 100644 index 07ae353..0000000 --- a/.gitlab/pipeline/jobs/func-php8.2-v11-lowest.yml +++ /dev/null @@ -1,14 +0,0 @@ -func-php8.2-v11-lowest: - extends: .default - image: ghcr.io/typo3/core-testing-php82:latest - services: - - mariadb:10 - stage: test - needs: - - build-composer-dependencies - - php-lint-php8.2 - script: - - echo "Job ${CI_JOB_NAME}" - - composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5" - - composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest - - composer ci:tests:functional diff --git a/.gitlab/pipeline/jobs/func-php8.3-v11-highest.yml b/.gitlab/pipeline/jobs/func-php8.3-v11-highest.yml deleted file mode 100644 index 6feac9d..0000000 --- a/.gitlab/pipeline/jobs/func-php8.3-v11-highest.yml +++ /dev/null @@ -1,14 +0,0 @@ -func-php8.3-v11-highest: - extends: .default - image: ghcr.io/typo3/core-testing-php83:latest - services: - - mariadb:10 - stage: test - needs: - - build-composer-dependencies - - php-lint-php8.3 - script: - - echo "Job ${CI_JOB_NAME}" - - composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5" - - composer update --no-ansi --no-interaction --no-progress --with-dependencies - - composer ci:tests:functional diff --git a/.gitlab/pipeline/jobs/func-php8.3-v11-lowest.yml b/.gitlab/pipeline/jobs/func-php8.3-v11-lowest.yml deleted file mode 100644 index 2ddc49c..0000000 --- a/.gitlab/pipeline/jobs/func-php8.3-v11-lowest.yml +++ /dev/null @@ -1,14 +0,0 @@ -func-php8.3-v11-lowest: - extends: .default - image: ghcr.io/typo3/core-testing-php83:latest - services: - - mariadb:10 - stage: test - needs: - - build-composer-dependencies - - php-lint-php8.3 - script: - - echo "Job ${CI_JOB_NAME}" - - composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5" - - composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest - - composer ci:tests:functional diff --git a/.gitlab/pipeline/jobs/unit-php8.2-v11-highest.yml b/.gitlab/pipeline/jobs/unit-php8.2-v11-highest.yml deleted file mode 100644 index 044a430..0000000 --- a/.gitlab/pipeline/jobs/unit-php8.2-v11-highest.yml +++ /dev/null @@ -1,12 +0,0 @@ -unit-php8.2-v11-highest: - extends: .default - image: ghcr.io/typo3/core-testing-php82:latest - stage: test - needs: - - build-composer-dependencies - - php-lint-php8.2 - script: - - echo "Job ${CI_JOB_NAME}" - - composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5" - - composer update --no-ansi --no-interaction --no-progress --with-dependencies - - composer ci:tests:unit diff --git a/.gitlab/pipeline/jobs/unit-php8.2-v11-lowest.yml b/.gitlab/pipeline/jobs/unit-php8.2-v11-lowest.yml deleted file mode 100644 index f1d111c..0000000 --- a/.gitlab/pipeline/jobs/unit-php8.2-v11-lowest.yml +++ /dev/null @@ -1,12 +0,0 @@ -unit-php8.2-v11-lowest: - extends: .default - image: ghcr.io/typo3/core-testing-php82:latest - stage: test - needs: - - build-composer-dependencies - - php-lint-php8.2 - script: - - echo "Job ${CI_JOB_NAME}" - - composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5" - - composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest - - composer ci:tests:unit diff --git a/.gitlab/pipeline/jobs/unit-php8.3-v11-highest.yml b/.gitlab/pipeline/jobs/unit-php8.3-v11-highest.yml deleted file mode 100644 index fa3e57e..0000000 --- a/.gitlab/pipeline/jobs/unit-php8.3-v11-highest.yml +++ /dev/null @@ -1,12 +0,0 @@ -unit-php8.3-v11-highest: - extends: .default - image: ghcr.io/typo3/core-testing-php83:latest - stage: test - needs: - - build-composer-dependencies - - php-lint-php8.3 - script: - - echo "Job ${CI_JOB_NAME}" - - composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5" - - composer update --no-ansi --no-interaction --no-progress --with-dependencies - - composer ci:tests:unit diff --git a/.gitlab/pipeline/jobs/unit-php8.3-v11-lowest.yml b/.gitlab/pipeline/jobs/unit-php8.3-v11-lowest.yml deleted file mode 100644 index 4f94d7c..0000000 --- a/.gitlab/pipeline/jobs/unit-php8.3-v11-lowest.yml +++ /dev/null @@ -1,12 +0,0 @@ -unit-php8.3-v11-lowest: - extends: .default - image: ghcr.io/typo3/core-testing-php83:latest - stage: test - needs: - - build-composer-dependencies - - php-lint-php8.3 - script: - - echo "Job ${CI_JOB_NAME}" - - composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5" - - composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest - - composer ci:tests:unit From 524e2cb062d8b4f1dd92f51323aab0a402c06cce Mon Sep 17 00:00:00 2001 From: Oliver Klee <typo3-coding@oliverklee.de> Date: Mon, 3 Feb 2025 13:33:47 +0100 Subject: [PATCH 04/12] [TASK] Make the naming schema of CI jobs consistent (#1581) Now the GitLab CI jobs have the TYPO3 version first and the PHP version second, just like the GitHub Actions. This hopefully helps avoid confustion like we had in the past, and helps reduce cognitive load when working with the CI jobs. Fixes #1571 --- .gitlab/pipeline/.gitlab-ci.yml | 24 +++++++++---------- ...ighest.yml => func-v12-php8.1-highest.yml} | 2 +- ...-lowest.yml => func-v12-php8.1-lowest.yml} | 2 +- ...ighest.yml => func-v12-php8.2-highest.yml} | 2 +- ...-lowest.yml => func-v12-php8.2-lowest.yml} | 2 +- ...ighest.yml => func-v12-php8.3-highest.yml} | 2 +- ...-lowest.yml => func-v12-php8.3-lowest.yml} | 2 +- ...ighest.yml => unit-v12-php8.1-highest.yml} | 2 +- ...-lowest.yml => unit-v12-php8.1-lowest.yml} | 2 +- ...ighest.yml => unit-v12-php8.2-highest.yml} | 2 +- ...-lowest.yml => unit-v12-php8.2-lowest.yml} | 2 +- ...ighest.yml => unit-v12-php8.3-highest.yml} | 2 +- ...-lowest.yml => unit-v12-php8.3-lowest.yml} | 2 +- 13 files changed, 24 insertions(+), 24 deletions(-) rename .gitlab/pipeline/jobs/{func-php8.1-v12-highest.yml => func-v12-php8.1-highest.yml} (94%) rename .gitlab/pipeline/jobs/{func-php8.1-v12-lowest.yml => func-v12-php8.1-lowest.yml} (94%) rename .gitlab/pipeline/jobs/{func-php8.2-v12-highest.yml => func-v12-php8.2-highest.yml} (94%) rename .gitlab/pipeline/jobs/{func-php8.2-v12-lowest.yml => func-v12-php8.2-lowest.yml} (94%) rename .gitlab/pipeline/jobs/{func-php8.3-v12-highest.yml => func-v12-php8.3-highest.yml} (94%) rename .gitlab/pipeline/jobs/{func-php8.3-v12-lowest.yml => func-v12-php8.3-lowest.yml} (94%) rename .gitlab/pipeline/jobs/{unit-php8.1-v12-highest.yml => unit-v12-php8.1-highest.yml} (91%) rename .gitlab/pipeline/jobs/{unit-php8.1-v12-lowest.yml => unit-v12-php8.1-lowest.yml} (94%) rename .gitlab/pipeline/jobs/{unit-php8.2-v12-highest.yml => unit-v12-php8.2-highest.yml} (91%) rename .gitlab/pipeline/jobs/{unit-php8.2-v12-lowest.yml => unit-v12-php8.2-lowest.yml} (94%) rename .gitlab/pipeline/jobs/{unit-php8.3-v12-highest.yml => unit-v12-php8.3-highest.yml} (91%) rename .gitlab/pipeline/jobs/{unit-php8.3-v12-lowest.yml => unit-v12-php8.3-lowest.yml} (94%) diff --git a/.gitlab/pipeline/.gitlab-ci.yml b/.gitlab/pipeline/.gitlab-ci.yml index ffdc9da..ca4d4e2 100644 --- a/.gitlab/pipeline/.gitlab-ci.yml +++ b/.gitlab/pipeline/.gitlab-ci.yml @@ -14,12 +14,12 @@ include: - '/.gitlab/pipeline/jobs/build-composer-dependencies.yml' - '/.gitlab/pipeline/jobs/composer-normalize.yml' - '/.gitlab/pipeline/jobs/composer-psr-verify.yml' - - '/.gitlab/pipeline/jobs/func-php8.1-v12-highest.yml' - - '/.gitlab/pipeline/jobs/func-php8.1-v12-lowest.yml' - - '/.gitlab/pipeline/jobs/func-php8.2-v12-highest.yml' - - '/.gitlab/pipeline/jobs/func-php8.2-v12-lowest.yml' - - '/.gitlab/pipeline/jobs/func-php8.3-v12-highest.yml' - - '/.gitlab/pipeline/jobs/func-php8.3-v12-lowest.yml' + - '/.gitlab/pipeline/jobs/func-v12-php8.1-highest.yml' + - '/.gitlab/pipeline/jobs/func-v12-php8.1-lowest.yml' + - '/.gitlab/pipeline/jobs/func-v12-php8.2-highest.yml' + - '/.gitlab/pipeline/jobs/func-v12-php8.2-lowest.yml' + - '/.gitlab/pipeline/jobs/func-v12-php8.3-highest.yml' + - '/.gitlab/pipeline/jobs/func-v12-php8.3-lowest.yml' - '/.gitlab/pipeline/jobs/javascript-lint.yml' - '/.gitlab/pipeline/jobs/json-lint.yml' - '/.gitlab/pipeline/jobs/php-cs-fixer.yml' @@ -29,12 +29,12 @@ include: - '/.gitlab/pipeline/jobs/phpcs.yml' - '/.gitlab/pipeline/jobs/rector.yml' - '/.gitlab/pipeline/jobs/typoscript-lint.yml' - - '/.gitlab/pipeline/jobs/unit-php8.1-v12-highest.yml' - - '/.gitlab/pipeline/jobs/unit-php8.1-v12-lowest.yml' - - '/.gitlab/pipeline/jobs/unit-php8.2-v12-highest.yml' - - '/.gitlab/pipeline/jobs/unit-php8.2-v12-lowest.yml' - - '/.gitlab/pipeline/jobs/unit-php8.3-v12-highest.yml' - - '/.gitlab/pipeline/jobs/unit-php8.3-v12-lowest.yml' + - '/.gitlab/pipeline/jobs/unit-v12-php8.1-highest.yml' + - '/.gitlab/pipeline/jobs/unit-v12-php8.1-lowest.yml' + - '/.gitlab/pipeline/jobs/unit-v12-php8.2-highest.yml' + - '/.gitlab/pipeline/jobs/unit-v12-php8.2-lowest.yml' + - '/.gitlab/pipeline/jobs/unit-v12-php8.3-highest.yml' + - '/.gitlab/pipeline/jobs/unit-v12-php8.3-lowest.yml' - '/.gitlab/pipeline/jobs/xliff-lint.yml' - '/.gitlab/pipeline/jobs/yaml-lint.yml' - template: Security/Secret-Detection.gitlab-ci.yml diff --git a/.gitlab/pipeline/jobs/func-php8.1-v12-highest.yml b/.gitlab/pipeline/jobs/func-v12-php8.1-highest.yml similarity index 94% rename from .gitlab/pipeline/jobs/func-php8.1-v12-highest.yml rename to .gitlab/pipeline/jobs/func-v12-php8.1-highest.yml index 49ced8c..d18a872 100644 --- a/.gitlab/pipeline/jobs/func-php8.1-v12-highest.yml +++ b/.gitlab/pipeline/jobs/func-v12-php8.1-highest.yml @@ -1,4 +1,4 @@ -func-php8.1-v11-highest: +func-v12-php8.1-highest: extends: .default image: ghcr.io/typo3/core-testing-php81:latest services: diff --git a/.gitlab/pipeline/jobs/func-php8.1-v12-lowest.yml b/.gitlab/pipeline/jobs/func-v12-php8.1-lowest.yml similarity index 94% rename from .gitlab/pipeline/jobs/func-php8.1-v12-lowest.yml rename to .gitlab/pipeline/jobs/func-v12-php8.1-lowest.yml index 4963df1..b7cb154 100644 --- a/.gitlab/pipeline/jobs/func-php8.1-v12-lowest.yml +++ b/.gitlab/pipeline/jobs/func-v12-php8.1-lowest.yml @@ -1,4 +1,4 @@ -func-php8.1-v11-lowest: +func-v12-php8.1-lowest: extends: .default image: ghcr.io/typo3/core-testing-php81:latest services: diff --git a/.gitlab/pipeline/jobs/func-php8.2-v12-highest.yml b/.gitlab/pipeline/jobs/func-v12-php8.2-highest.yml similarity index 94% rename from .gitlab/pipeline/jobs/func-php8.2-v12-highest.yml rename to .gitlab/pipeline/jobs/func-v12-php8.2-highest.yml index cb3d952..26ef23f 100644 --- a/.gitlab/pipeline/jobs/func-php8.2-v12-highest.yml +++ b/.gitlab/pipeline/jobs/func-v12-php8.2-highest.yml @@ -1,4 +1,4 @@ -func-php8.2-v12-highest: +func-v12-php8.2-highest: extends: .default image: ghcr.io/typo3/core-testing-php82:latest services: diff --git a/.gitlab/pipeline/jobs/func-php8.2-v12-lowest.yml b/.gitlab/pipeline/jobs/func-v12-php8.2-lowest.yml similarity index 94% rename from .gitlab/pipeline/jobs/func-php8.2-v12-lowest.yml rename to .gitlab/pipeline/jobs/func-v12-php8.2-lowest.yml index 2ba379d..87cad2f 100644 --- a/.gitlab/pipeline/jobs/func-php8.2-v12-lowest.yml +++ b/.gitlab/pipeline/jobs/func-v12-php8.2-lowest.yml @@ -1,4 +1,4 @@ -func-php8.2-v12-lowest: +func-v12-php8.2-lowest: extends: .default image: ghcr.io/typo3/core-testing-php82:latest services: diff --git a/.gitlab/pipeline/jobs/func-php8.3-v12-highest.yml b/.gitlab/pipeline/jobs/func-v12-php8.3-highest.yml similarity index 94% rename from .gitlab/pipeline/jobs/func-php8.3-v12-highest.yml rename to .gitlab/pipeline/jobs/func-v12-php8.3-highest.yml index eb2a0f0..5defe7b 100644 --- a/.gitlab/pipeline/jobs/func-php8.3-v12-highest.yml +++ b/.gitlab/pipeline/jobs/func-v12-php8.3-highest.yml @@ -1,4 +1,4 @@ -func-php8.3-v11-highest: +func-v12-php8.3-highest: extends: .default image: ghcr.io/typo3/core-testing-php83:latest services: diff --git a/.gitlab/pipeline/jobs/func-php8.3-v12-lowest.yml b/.gitlab/pipeline/jobs/func-v12-php8.3-lowest.yml similarity index 94% rename from .gitlab/pipeline/jobs/func-php8.3-v12-lowest.yml rename to .gitlab/pipeline/jobs/func-v12-php8.3-lowest.yml index 3eb28a1..bd67f5a 100644 --- a/.gitlab/pipeline/jobs/func-php8.3-v12-lowest.yml +++ b/.gitlab/pipeline/jobs/func-v12-php8.3-lowest.yml @@ -1,4 +1,4 @@ -func-php8.3-v12-lowest: +func-v12-php8.3-lowest: extends: .default image: ghcr.io/typo3/core-testing-php83:latest services: diff --git a/.gitlab/pipeline/jobs/unit-php8.1-v12-highest.yml b/.gitlab/pipeline/jobs/unit-v12-php8.1-highest.yml similarity index 91% rename from .gitlab/pipeline/jobs/unit-php8.1-v12-highest.yml rename to .gitlab/pipeline/jobs/unit-v12-php8.1-highest.yml index fc1fb61..3ff0fc5 100644 --- a/.gitlab/pipeline/jobs/unit-php8.1-v12-highest.yml +++ b/.gitlab/pipeline/jobs/unit-v12-php8.1-highest.yml @@ -1,4 +1,4 @@ -unit-php8.1-v12-highest: +unit-v12-php8.1-highest: extends: .default image: ghcr.io/typo3/core-testing-php81:latest stage: test diff --git a/.gitlab/pipeline/jobs/unit-php8.1-v12-lowest.yml b/.gitlab/pipeline/jobs/unit-v12-php8.1-lowest.yml similarity index 94% rename from .gitlab/pipeline/jobs/unit-php8.1-v12-lowest.yml rename to .gitlab/pipeline/jobs/unit-v12-php8.1-lowest.yml index 7e3a700..b62fcf7 100644 --- a/.gitlab/pipeline/jobs/unit-php8.1-v12-lowest.yml +++ b/.gitlab/pipeline/jobs/unit-v12-php8.1-lowest.yml @@ -1,4 +1,4 @@ -unit-php8.1-v12-lowest: +unit-v12-php8.1-lowest: extends: .default image: ghcr.io/typo3/core-testing-php81:latest stage: test diff --git a/.gitlab/pipeline/jobs/unit-php8.2-v12-highest.yml b/.gitlab/pipeline/jobs/unit-v12-php8.2-highest.yml similarity index 91% rename from .gitlab/pipeline/jobs/unit-php8.2-v12-highest.yml rename to .gitlab/pipeline/jobs/unit-v12-php8.2-highest.yml index 9663b4b..fd068b3 100644 --- a/.gitlab/pipeline/jobs/unit-php8.2-v12-highest.yml +++ b/.gitlab/pipeline/jobs/unit-v12-php8.2-highest.yml @@ -1,4 +1,4 @@ -unit-php8.2-v12-highest: +unit-v12-php8.2-highest: extends: .default image: ghcr.io/typo3/core-testing-php82:latest stage: test diff --git a/.gitlab/pipeline/jobs/unit-php8.2-v12-lowest.yml b/.gitlab/pipeline/jobs/unit-v12-php8.2-lowest.yml similarity index 94% rename from .gitlab/pipeline/jobs/unit-php8.2-v12-lowest.yml rename to .gitlab/pipeline/jobs/unit-v12-php8.2-lowest.yml index 2a86d30..1f5aeb9 100644 --- a/.gitlab/pipeline/jobs/unit-php8.2-v12-lowest.yml +++ b/.gitlab/pipeline/jobs/unit-v12-php8.2-lowest.yml @@ -1,4 +1,4 @@ -unit-php8.2-v12-lowest: +unit-v12-php8.2-lowest: extends: .default image: ghcr.io/typo3/core-testing-php82:latest stage: test diff --git a/.gitlab/pipeline/jobs/unit-php8.3-v12-highest.yml b/.gitlab/pipeline/jobs/unit-v12-php8.3-highest.yml similarity index 91% rename from .gitlab/pipeline/jobs/unit-php8.3-v12-highest.yml rename to .gitlab/pipeline/jobs/unit-v12-php8.3-highest.yml index 24338fe..1b2344b 100644 --- a/.gitlab/pipeline/jobs/unit-php8.3-v12-highest.yml +++ b/.gitlab/pipeline/jobs/unit-v12-php8.3-highest.yml @@ -1,4 +1,4 @@ -unit-php8.3-v12-highest: +unit-v12-php8.3-highest: extends: .default image: ghcr.io/typo3/core-testing-php83:latest stage: test diff --git a/.gitlab/pipeline/jobs/unit-php8.3-v12-lowest.yml b/.gitlab/pipeline/jobs/unit-v12-php8.3-lowest.yml similarity index 94% rename from .gitlab/pipeline/jobs/unit-php8.3-v12-lowest.yml rename to .gitlab/pipeline/jobs/unit-v12-php8.3-lowest.yml index 094565a..9661b4f 100644 --- a/.gitlab/pipeline/jobs/unit-php8.3-v12-lowest.yml +++ b/.gitlab/pipeline/jobs/unit-v12-php8.3-lowest.yml @@ -1,4 +1,4 @@ -unit-php8.3-v12-lowest: +unit-v12-php8.3-lowest: extends: .default image: ghcr.io/typo3/core-testing-php83:latest stage: test From e56a0244a52ad5b746452288cdc669ec65de4a0a Mon Sep 17 00:00:00 2001 From: Daniel Siepmann <coding@daniel-siepmann.de> Date: Mon, 3 Feb 2025 13:35:01 +0100 Subject: [PATCH 05/12] [TASK] Drop PHP_CodeSniffer (#1582) As we already have php-cs-fixer to maintain the CGL. Therefore we get rid of a second tool for the same job. They have different rules in the existing setup for newer PHP syntax. Resolves: #1580 --- .github/workflows/ci.yml | 1 - .gitlab/pipeline/.gitlab-ci.yml | 1 - .gitlab/pipeline/jobs/phpcs.yml | 11 ----------- Documentation/DependencyManager.rst | 2 +- Documentation/Running.rst | 14 -------------- composer.json | 10 +--------- 6 files changed, 2 insertions(+), 37 deletions(-) delete mode 100644 .gitlab/pipeline/jobs/phpcs.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6acc10e..4897eba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,7 +82,6 @@ jobs: - "php:cs-fixer" - "php:mess" - "php:rector" - - "php:sniff" - "php:stan" - "typoscript:lint" - "yaml:lint" diff --git a/.gitlab/pipeline/.gitlab-ci.yml b/.gitlab/pipeline/.gitlab-ci.yml index ca4d4e2..b2e768e 100644 --- a/.gitlab/pipeline/.gitlab-ci.yml +++ b/.gitlab/pipeline/.gitlab-ci.yml @@ -26,7 +26,6 @@ include: - '/.gitlab/pipeline/jobs/php-lint-php8.1.yml' - '/.gitlab/pipeline/jobs/php-lint-php8.2.yml' - '/.gitlab/pipeline/jobs/php-lint-php8.3.yml' - - '/.gitlab/pipeline/jobs/phpcs.yml' - '/.gitlab/pipeline/jobs/rector.yml' - '/.gitlab/pipeline/jobs/typoscript-lint.yml' - '/.gitlab/pipeline/jobs/unit-v12-php8.1-highest.yml' diff --git a/.gitlab/pipeline/jobs/phpcs.yml b/.gitlab/pipeline/jobs/phpcs.yml deleted file mode 100644 index b174b1e..0000000 --- a/.gitlab/pipeline/jobs/phpcs.yml +++ /dev/null @@ -1,11 +0,0 @@ -phpcs: - extends: .default - stage: codestyle - needs: - - build-composer-dependencies - - php-lint-php7.4 - - php-lint-php8.0 - - php-lint-php8.1 - - php-lint-php8.2 - script: - - composer ci:php:sniff diff --git a/Documentation/DependencyManager.rst b/Documentation/DependencyManager.rst index e459971..578f7ce 100644 --- a/Documentation/DependencyManager.rst +++ b/Documentation/DependencyManager.rst @@ -6,7 +6,7 @@ Dependency manager ================== -To keep things simple, most development tools, for example PHP_CodeSniffer, are +To keep things simple, most development tools, for example php-cs-fixer, are installed by Composer as development requirements and in some cases where installation via Composer is not possible, we use `PHIVE <https://phar.io/>`__. diff --git a/Documentation/Running.rst b/Documentation/Running.rst index b3e96c9..2b5f885 100644 --- a/Documentation/Running.rst +++ b/Documentation/Running.rst @@ -71,13 +71,6 @@ Checks the code style with the PHP Coding Standards Fixer (PHP-CS-Fixer). Lints the PHP files for syntax errors. -.. index:: Commands; composer ci:php:sniff -.. code-block:: bash - - composer ci:php:sniff - -Checks the code style with PHP_CodeSniffer (PHPCS). - .. index:: Commands; composer ci:php:stan .. code-block:: bash @@ -127,13 +120,6 @@ Runs all fixers for the PHP code. Fixes the code style with PHP-CS-Fixer. -.. index:: Commands; composer fix:php:sniff -.. code-block:: bash - - composer fix:php:sniff - -Fixes the code style with PHP_CodeSniffer. - .. index:: Commands; composer phpstan:baseline .. code-block:: bash diff --git a/composer.json b/composer.json index 0cf6830..2114b9f 100644 --- a/composer.json +++ b/composer.json @@ -61,7 +61,6 @@ "saschaegerer/phpstan-typo3": "1.10.2", "seld/jsonlint": "1.11.0", "spaze/phpstan-disallowed-calls": "4.2.1", - "squizlabs/php_codesniffer": "3.11.3", "ssch/typo3-rector": "2.12.2", "ssch/typo3-rector-testing-framework": "2.0.1", "symfony/console": "5.4.47 || 6.4.17 || 7.2.1", @@ -141,14 +140,12 @@ "ci:php": [ "@ci:php:cs-fixer", "@ci:php:lint", - "@ci:php:sniff", "@ci:php:stan" ], "ci:php:cs-fixer": "php-cs-fixer fix --config ./Build/php-cs-fixer/php-cs-fixer.php -v --dry-run --diff", "ci:php:lint": "parallel-lint *.php Build Classes Configuration Tests", "ci:php:mess": "phpmd Classes text Build/phpmd/phpmd.xml", "ci:php:rector": "rector --dry-run", - "ci:php:sniff": "phpcs --standard=Build/phpcs/phpcs.xml Classes Configuration Tests", "ci:php:stan": "phpstan --no-progress -v", "ci:static": [ "@ci:composer:normalize", @@ -158,7 +155,6 @@ "@ci:php:rector", "@ci:php:stan", "@ci:php:cs-fixer", - "@ci:php:sniff", "@ci:typoscript:lint", "@ci:xliff:lint", "@ci:yaml:lint" @@ -181,12 +177,10 @@ "fix:composer:normalize": "@composer normalize --no-check-lock", "fix:php": [ "@fix:php:rector", - "@fix:php:cs", - "@fix:php:sniff" + "@fix:php:cs" ], "fix:php:cs": "php-cs-fixer fix --config ./Build/php-cs-fixer/php-cs-fixer.php", "fix:php:rector": "rector", - "fix:php:sniff": "phpcbf --standard=Build/phpcs/phpcs.xml Classes Configuration Tests", "phpstan:baseline": "phpstan --generate-baseline --allow-empty-baseline", "prepare-release": [ "rm -rf .Build", @@ -226,7 +220,6 @@ "ci:php:lint": "Lints the PHP files for syntax errors.", "ci:php:mess": "Runs PHP mess detection.", "ci:php:rector": "Checks for code for changes by Rector.", - "ci:php:sniff": "Checks the code style with PHP_CodeSniffer (PHPCS).", "ci:php:stan": "Checks the PHP types using PHPStan.", "ci:static": "Runs all static code checks (syntax, style, types).", "ci:tests:create-directories": "Creates the directories required to smoothely run the functional tests.", @@ -242,7 +235,6 @@ "fix:php": "Runs all fixers for the PHP code.", "fix:php:cs": "Fixes the code style with PHP-CS-Fixer.", "fix:php:rector": "Updates the code with Rector.", - "fix:php:sniff": "Fixes the code style with PHP_CodeSniffer.", "phpstan:baseline": "Updates the PHPStan baseline file to match the code.", "prepare-release": "Removes development-only files in preparation of a TER release." } From 8bb14d867de8f31bb315832af842a10a2a91ab2a Mon Sep 17 00:00:00 2001 From: Eike Starkmann <eike.starkmann@undkonsorten.com> Date: Mon, 3 Feb 2025 13:52:48 +0100 Subject: [PATCH 06/12] [FEATURE] Switch the PHPUnit tests to paratest (#1381) Fixes #1379 --- .gitlab/build/docker_install.sh | 2 -- Build/Scripts/runTests.sh | 6 +++--- composer.json | 9 +++++---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.gitlab/build/docker_install.sh b/.gitlab/build/docker_install.sh index df2df16..6a41f26 100644 --- a/.gitlab/build/docker_install.sh +++ b/.gitlab/build/docker_install.sh @@ -3,5 +3,3 @@ [[ ! -e /.dockerenv ]] && exit 0 set -xe - -apk add parallel diff --git a/Build/Scripts/runTests.sh b/Build/Scripts/runTests.sh index d11f14c..70e09c3 100755 --- a/Build/Scripts/runTests.sh +++ b/Build/Scripts/runTests.sh @@ -555,7 +555,7 @@ case ${TEST_SUITE} in ;; functional) [ -z "${TEST_FILE}" ] && TEST_FILE="Tests/Functional" - COMMAND=".Build/bin/phpunit -c Build/phpunit/FunctionalTests.xml --exclude-group not-${DBMS} ${EXTRA_TEST_OPTIONS} ${TEST_FILE}" + COMMAND=".Build/bin/paratest -c Build/phpunit/FunctionalTests.xml --exclude-group not-${DBMS} ${EXTRA_TEST_OPTIONS} ${TEST_FILE}" case ${DBMS} in mariadb) echo "Using driver: ${DATABASE_DRIVER}" @@ -642,12 +642,12 @@ case ${TEST_SUITE} in ;; unit) [ -z "${TEST_FILE}" ] && TEST_FILE="Tests/Unit" - ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name unit-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${IMAGE_PHP} .Build/bin/phpunit -c Build/phpunit/UnitTests.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE} + ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name unit-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${IMAGE_PHP} .Build/bin/paratest -c Build/phpunit/UnitTests.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE} SUITE_EXIT_CODE=$? ;; unitRandom) [ -z "${TEST_FILE}" ] && TEST_FILE="Tests/Unit" - ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name unit-random-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${IMAGE_PHP} .Build/bin/phpunit -c Build/phpunit/UnitTests.xml --order-by=random ${EXTRA_TEST_OPTIONS} ${PHPUNIT_RANDOM} ${TEST_FILE} + ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name unit-random-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${IMAGE_PHP} .Build/bin/paratest -c Build/phpunit/UnitTests.xml --order-by=random ${EXTRA_TEST_OPTIONS} ${PHPUNIT_RANDOM} ${TEST_FILE} SUITE_EXIT_CODE=$? ;; update) diff --git a/composer.json b/composer.json index 2114b9f..91a4ed6 100644 --- a/composer.json +++ b/composer.json @@ -47,6 +47,7 @@ "typo3/cms-frontend": "^12.4.26" }, "require-dev": { + "brianium/paratest": "6.11.1", "ergebnis/composer-normalize": "2.45.0", "friendsofphp/php-cs-fixer": "3.68.5", "helmich/typo3-typoscript-lint": "3.1.1 || 3.2.1", @@ -126,7 +127,7 @@ "ci:coverage:functional": [ "@ci:tests:create-directories", "@coverage:create-directories", - "phpunit -c Build/phpunit/FunctionalTests.xml --whitelist Classes --coverage-php=build/coverage/functional.cov Tests/Functional" + "paratest -c Build/phpunit/FunctionalTests.xml --whitelist Classes --coverage-php=build/coverage/functional.cov Tests/Functional" ], "ci:coverage:merge": [ "@coverage:create-directories", @@ -134,7 +135,7 @@ ], "ci:coverage:unit": [ "@coverage:create-directories", - "phpunit -c Build/phpunit/UnitTests.xml --whitelist Classes --coverage-php=build/coverage/unit.cov Tests/Unit" + "paratest -c Build/phpunit/UnitTests.xml --whitelist Classes --coverage-php=build/coverage/unit.cov Tests/Unit" ], "ci:json:lint": "find . ! -path '*/.cache/*' ! -path '*/.Build/*' ! -path '*/node_modules/*' -name '*.json' | xargs -r php .Build/bin/jsonlint -q", "ci:php": [ @@ -162,9 +163,9 @@ "ci:tests:create-directories": "mkdir -p .Build/public/typo3temp/var/tests", "ci:tests:functional": [ "@ci:tests:create-directories", - "find 'Tests/Functional' -wholename '*Test.php' | parallel --gnu 'echo; echo \\\"Running functional test suite {}\\\"; .Build/bin/phpunit -c Build/phpunit/FunctionalTests.xml {}';" + "paratest -c Build/phpunit/FunctionalTests.xml Tests/Functional" ], - "ci:tests:unit": "phpunit -c Build/phpunit/UnitTests.xml Tests/Unit", + "ci:tests:unit": "paratest -c Build/phpunit/UnitTests.xml Tests/Unit", "ci:typoscript:lint": "typoscript-lint -c Configuration/TsLint.yml --ansi -n --fail-on-warnings -vvv Configuration/TypoScript", "ci:xliff:lint": "php Build/xliff/xliff-lint lint:xliff Resources/Private/Language", "ci:yaml:lint": "find . ! -path '*.Build/*' ! -path '*node_modules/*' \\( -name '*.yaml' -o -name '*.yml' \\) | xargs -r php ./.Build/bin/yaml-lint", From d49083123cfa231ed221aaf987206e0c2a735fff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Feb 2025 13:03:35 +0000 Subject: [PATCH 07/12] [Dependabot] Update helmich/typo3-typoscript-lint requirement from 3.1.1 || 3.2.1 to ^3.3.0 (#1584) --- updated-dependencies: - dependency-name: helmich/typo3-typoscript-lint dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 91a4ed6..0efbd3c 100644 --- a/composer.json +++ b/composer.json @@ -50,7 +50,7 @@ "brianium/paratest": "6.11.1", "ergebnis/composer-normalize": "2.45.0", "friendsofphp/php-cs-fixer": "3.68.5", - "helmich/typo3-typoscript-lint": "3.1.1 || 3.2.1", + "helmich/typo3-typoscript-lint": "^3.3.0", "icanhazstring/composer-unused": "0.8.11", "php-parallel-lint/php-parallel-lint": "1.4.0", "phpmd/phpmd": "2.15.0", From c9d6e8742e15e1760d54d50aece0aee201e812d4 Mon Sep 17 00:00:00 2001 From: Oliver Klee <typo3-coding@oliverklee.de> Date: Mon, 3 Feb 2025 14:25:20 +0100 Subject: [PATCH 08/12] [TASK] Drop support for Symfony 5.x (#1583) As we now require TYPO3 >= 12LTS, and as that version requires Symfony >= 6.x, we now can safely drop support for Symfony 5.x --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 0efbd3c..b0113fa 100644 --- a/composer.json +++ b/composer.json @@ -64,9 +64,9 @@ "spaze/phpstan-disallowed-calls": "4.2.1", "ssch/typo3-rector": "2.12.2", "ssch/typo3-rector-testing-framework": "2.0.1", - "symfony/console": "5.4.47 || 6.4.17 || 7.2.1", - "symfony/translation": "5.4.45 || 6.4.13 || 7.2.2", - "symfony/yaml": "5.4.45 || 6.4.18 || 7.2.3", + "symfony/console": "6.4.17 || 7.2.1", + "symfony/translation": "6.4.13 || 7.2.2", + "symfony/yaml": "6.4.18 || 7.2.3", "tomasvotruba/cognitive-complexity": "0.2.3", "tomasvotruba/type-coverage": "1.0.0", "typo3/cms-fluid-styled-content": "^12.4.26", From 44429528fdf32e3c4be25b941e40c6990c7a6b60 Mon Sep 17 00:00:00 2001 From: Oliver Klee <typo3-coding@oliverklee.de> Date: Mon, 3 Feb 2025 14:27:04 +0100 Subject: [PATCH 09/12] [FEATURE] Add support for PHP 8.4 (#1536) Comment-out GitHub Action jobs that fail with PHP 8.4 due to incompatible dependencies. --- .github/workflows/ci.yml | 13 +++++++++++++ .gitlab/pipeline/.gitlab-ci.yml | 3 +++ .gitlab/pipeline/jobs/func-v12-php8.4-highest.yml | 14 ++++++++++++++ .gitlab/pipeline/jobs/func-v12-php8.4-lowest.yml | 14 ++++++++++++++ .gitlab/pipeline/jobs/php-lint-php8.4.yml | 7 +++++++ .gitlab/pipeline/jobs/unit-v12-php8.4-highest.yml | 11 +++++++++++ CHANGELOG.md | 1 + composer.json | 2 +- ext_emconf.php | 2 +- rector.php | 2 +- 10 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 .gitlab/pipeline/jobs/func-v12-php8.4-highest.yml create mode 100644 .gitlab/pipeline/jobs/func-v12-php8.4-lowest.yml create mode 100644 .gitlab/pipeline/jobs/php-lint-php8.4.yml create mode 100644 .gitlab/pipeline/jobs/unit-v12-php8.4-highest.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4897eba..f167a8a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,6 +44,7 @@ jobs: - "8.1" - "8.2" - "8.3" + - "8.4" code-quality: name: "Code quality checks" runs-on: ubuntu-24.04 @@ -174,6 +175,12 @@ jobs: - typo3-version: "^12.4" php-version: "8.3" composer-dependencies: highest + - typo3-version: "^12.4" + php-version: "8.4" + composer-dependencies: lowest + - typo3-version: "^12.4" + php-version: "8.4" + composer-dependencies: highest functional-tests: name: "Functional tests" runs-on: ubuntu-24.04 @@ -251,6 +258,12 @@ jobs: - typo3-version: "^12.4" php-version: "8.3" composer-dependencies: highest +# - typo3-version: "^12.4" +# php-version: "8.4" +# composer-dependencies: lowest + - typo3-version: "^12.4" + php-version: "8.4" + composer-dependencies: highest shellcheck: name: Check shell scripts runs-on: ubuntu-24.04 diff --git a/.gitlab/pipeline/.gitlab-ci.yml b/.gitlab/pipeline/.gitlab-ci.yml index b2e768e..f4b8cac 100644 --- a/.gitlab/pipeline/.gitlab-ci.yml +++ b/.gitlab/pipeline/.gitlab-ci.yml @@ -20,6 +20,8 @@ include: - '/.gitlab/pipeline/jobs/func-v12-php8.2-lowest.yml' - '/.gitlab/pipeline/jobs/func-v12-php8.3-highest.yml' - '/.gitlab/pipeline/jobs/func-v12-php8.3-lowest.yml' + - '/.gitlab/pipeline/jobs/func-v12-php8.4-highest.yml' + - '/.gitlab/pipeline/jobs/func-v12-php8.4-lowest.yml' - '/.gitlab/pipeline/jobs/javascript-lint.yml' - '/.gitlab/pipeline/jobs/json-lint.yml' - '/.gitlab/pipeline/jobs/php-cs-fixer.yml' @@ -34,6 +36,7 @@ include: - '/.gitlab/pipeline/jobs/unit-v12-php8.2-lowest.yml' - '/.gitlab/pipeline/jobs/unit-v12-php8.3-highest.yml' - '/.gitlab/pipeline/jobs/unit-v12-php8.3-lowest.yml' + - '/.gitlab/pipeline/jobs/unit-v12-php8.4-highest.yml' - '/.gitlab/pipeline/jobs/xliff-lint.yml' - '/.gitlab/pipeline/jobs/yaml-lint.yml' - template: Security/Secret-Detection.gitlab-ci.yml diff --git a/.gitlab/pipeline/jobs/func-v12-php8.4-highest.yml b/.gitlab/pipeline/jobs/func-v12-php8.4-highest.yml new file mode 100644 index 0000000..f219893 --- /dev/null +++ b/.gitlab/pipeline/jobs/func-v12-php8.4-highest.yml @@ -0,0 +1,14 @@ +func-v12-php8.4-highest: + extends: .default + image: ghcr.io/typo3/core-testing-php84:latest + services: + - mariadb:10 + stage: test + needs: + - build-composer-dependencies + - php-lint-php8.4 + script: + - echo "Job ${CI_JOB_NAME}" + - composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^12.4" + - composer update --no-ansi --no-interaction --no-progress --with-dependencies + - composer ci:tests:functional diff --git a/.gitlab/pipeline/jobs/func-v12-php8.4-lowest.yml b/.gitlab/pipeline/jobs/func-v12-php8.4-lowest.yml new file mode 100644 index 0000000..e5f0058 --- /dev/null +++ b/.gitlab/pipeline/jobs/func-v12-php8.4-lowest.yml @@ -0,0 +1,14 @@ +func-v12-php8.4-lowest: + extends: .default + image: ghcr.io/typo3/core-testing-php84:latest + services: + - mariadb:10 + stage: test + needs: + - build-composer-dependencies + - php-lint-php8.4 + script: + - echo "Job ${CI_JOB_NAME}" + - composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^12.4" + - composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest + - composer ci:tests:functional diff --git a/.gitlab/pipeline/jobs/php-lint-php8.4.yml b/.gitlab/pipeline/jobs/php-lint-php8.4.yml new file mode 100644 index 0000000..a9724eb --- /dev/null +++ b/.gitlab/pipeline/jobs/php-lint-php8.4.yml @@ -0,0 +1,7 @@ +php-lint-php8.4: + extends: .composer-update + image: ghcr.io/typo3/core-testing-php84:latest + stage: lint + needs: [ ] + script: + - composer ci:php:lint diff --git a/.gitlab/pipeline/jobs/unit-v12-php8.4-highest.yml b/.gitlab/pipeline/jobs/unit-v12-php8.4-highest.yml new file mode 100644 index 0000000..c61e3b9 --- /dev/null +++ b/.gitlab/pipeline/jobs/unit-v12-php8.4-highest.yml @@ -0,0 +1,11 @@ +unit-v12-php8.4-highest: + extends: .default + image: ghcr.io/typo3/core-testing-php84:latest + stage: test + needs: + - build-composer-dependencies + - php-lint-php8.4 + script: + - echo "Job ${CI_JOB_NAME}" + - composer require --no-progress typo3/cms-core:"^12.4" + - composer ci:tests:unit diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f1807e..46e4d73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). ## x.y.z ### Added +- Add support for PHP 8.4 (#1536) - Add support for PostgreSQL 16 (#1271) ### Changed diff --git a/composer.json b/composer.json index b0113fa..36aa278 100644 --- a/composer.json +++ b/composer.json @@ -39,7 +39,7 @@ "docs": "https://docs.typo3.org/p/ttn/tea/main/en-us/" }, "require": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "psr/http-message": "^1.0.1", "typo3/cms-core": "^12.4.26", "typo3/cms-extbase": "^12.4.26", diff --git a/ext_emconf.php b/ext_emconf.php index aca4b50..ad93ded 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -7,7 +7,7 @@ $EM_CONF[$_EXTKEY] = [ 'category' => 'example', 'constraints' => [ 'depends' => [ - 'php' => '8.1.0-8.3.99', + 'php' => '8.1.0-8.4.99', 'typo3' => '12.4.26-12.4.99', 'extbase' => '12.4.26-12.4.99', 'fluid' => '12.4.26-12.4.99', diff --git a/rector.php b/rector.php index ba12c0e..7f171a9 100644 --- a/rector.php +++ b/rector.php @@ -94,7 +94,7 @@ return RectorConfig::configure() ]) ->withImportNames(true, true, false) ->withConfiguredRule(ExtEmConfRector::class, [ - ExtEmConfRector::PHP_VERSION_CONSTRAINT => '8.1.0-8.3.99', + ExtEmConfRector::PHP_VERSION_CONSTRAINT => '8.1.0-8.4.99', ExtEmConfRector::TYPO3_VERSION_CONSTRAINT => '12.4.26-12.4.99', ExtEmConfRector::ADDITIONAL_VALUES_TO_BE_REMOVED => [], ]) From 39ed4cf313b36dedb48dc638cea40c2600063df8 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann <coding@daniel-siepmann.de> Date: Mon, 3 Feb 2025 15:37:30 +0100 Subject: [PATCH 10/12] [TASK] Raise PHP Language Level to 8.1 (#1577) Resolves: #1568 --- .../Controller/FrontEndEditorController.php | 25 ++++++------------- Classes/Controller/TeaController.php | 9 +++---- Classes/Domain/Model/Tea.php | 12 +++------ rector.php | 2 +- 4 files changed, 15 insertions(+), 33 deletions(-) diff --git a/Classes/Controller/FrontEndEditorController.php b/Classes/Controller/FrontEndEditorController.php index 8b2c50c..486c5c7 100644 --- a/Classes/Controller/FrontEndEditorController.php +++ b/Classes/Controller/FrontEndEditorController.php @@ -17,15 +17,10 @@ use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; */ class FrontEndEditorController extends ActionController { - private Context $context; - - private TeaRepository $teaRepository; - - public function __construct(Context $context, TeaRepository $teaRepository) - { - $this->context = $context; - $this->teaRepository = $teaRepository; - } + public function __construct( + private readonly Context $context, + private readonly TeaRepository $teaRepository, + ) {} public function indexAction(): ResponseInterface { @@ -48,9 +43,7 @@ class FrontEndEditorController extends ActionController return $userUid; } - /** - * @Extbase\IgnoreValidation("tea") - */ + #[Extbase\IgnoreValidation(['argumentName' => 'tea'])] public function editAction(Tea $tea): ResponseInterface { $this->checkIfUserIsOwner($tea); @@ -79,9 +72,7 @@ class FrontEndEditorController extends ActionController return $this->redirect('index'); } - /** - * @Extbase\IgnoreValidation("tea") - */ + #[Extbase\IgnoreValidation(['argumentName' => 'tea'])] public function newAction(?Tea $tea = null): ResponseInterface { // Note: We are using `makeInstance` here instead of `new` to allow for XCLASSing. @@ -100,9 +91,7 @@ class FrontEndEditorController extends ActionController return $this->redirect('index'); } - /** - * @Extbase\IgnoreValidation("tea") - */ + #[Extbase\IgnoreValidation(['argumentName' => 'tea'])] public function deleteAction(Tea $tea): ResponseInterface { $this->checkIfUserIsOwner($tea); diff --git a/Classes/Controller/TeaController.php b/Classes/Controller/TeaController.php index 46086ac..4a715d6 100644 --- a/Classes/Controller/TeaController.php +++ b/Classes/Controller/TeaController.php @@ -14,12 +14,9 @@ use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; */ class TeaController extends ActionController { - private TeaRepository $teaRepository; - - public function __construct(TeaRepository $teaRepository) - { - $this->teaRepository = $teaRepository; - } + public function __construct( + private readonly TeaRepository $teaRepository, + ) {} public function indexAction(): ResponseInterface { diff --git a/Classes/Domain/Model/Tea.php b/Classes/Domain/Model/Tea.php index 7ce31a0..c7f4a32 100644 --- a/Classes/Domain/Model/Tea.php +++ b/Classes/Domain/Model/Tea.php @@ -14,22 +14,18 @@ use TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy; */ class Tea extends AbstractEntity { - /** - * @Extbase\Validate("StringLength", options={"maximum": 255}) - * @Extbase\Validate("NotEmpty") - */ + #[Extbase\Validate(['validator' => 'StringLength', 'options' => ['maximum' => 255]])] + #[Extbase\Validate(['validator' => 'NotEmpty'])] protected string $title = ''; - /** - * @Extbase\Validate("StringLength", options={"maximum": 2000}) - */ + #[Extbase\Validate(['validator' => 'StringLength', 'options' => ['maximum' => 2000]])] protected string $description = ''; /** * @var FileReference|null * @phpstan-var FileReference|LazyLoadingProxy|null - * @Extbase\ORM\Lazy */ + #[Extbase\ORM\Lazy] protected $image; // Note: We cannot use `@var` for the more specific type annotation here as this confuses the Extbase type mapper. diff --git a/rector.php b/rector.php index 7f171a9..e8f7fdd 100644 --- a/rector.php +++ b/rector.php @@ -26,7 +26,7 @@ return RectorConfig::configure() __DIR__ . '/ext_emconf.php', __DIR__ . '/ext_localconf.php', ]) - ->withPhpVersion(PhpVersion::PHP_74) + ->withPhpVersion(PhpVersion::PHP_81) ->withPhpSets( true ) From a9be05fbc3ce2732c3c8b88f31873194f741d516 Mon Sep 17 00:00:00 2001 From: Karsten Nowak <kanow@users.noreply.github.com> Date: Mon, 3 Feb 2025 15:41:58 +0100 Subject: [PATCH 11/12] [DOCS] Extend PHIVE section in docs (#1388) Fixes #543 Fixes #429 --- Documentation/DependencyManager.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Documentation/DependencyManager.rst b/Documentation/DependencyManager.rst index 578f7ce..fbb8eb7 100644 --- a/Documentation/DependencyManager.rst +++ b/Documentation/DependencyManager.rst @@ -16,3 +16,18 @@ install or upgrade some tool as the tool's dependencies conflict with the dependencies on another library). It also allows running versions of tools that require a PHP version that is higher than the lowest allowed PHP version for this project. + +.. _using-phive-to-install-phpcov: + +Using PHIVE to install `phpunit/phpcov` +======================================= + +To support php version 7.4 and 8.2 in the `tea` extension, we are using PHIVE +to install `phpunit/phpcov`. +We need `phpunit/phpcov` in version 10 to support php 8.2. +Our minimum php version 7.4 would prevent the installation with composer. + +.. note:: + + To find more information about install and usage, + please check out the documentation of `PHIVE <https://phar.io>`__. From 23027f1370b0e84c6ee5be7e1bf22dc473ea16c9 Mon Sep 17 00:00:00 2001 From: Oliver Klee <typo3-coding@oliverklee.de> Date: Mon, 3 Feb 2025 16:05:37 +0100 Subject: [PATCH 12/12] [TASK] Drop the PHP_CodeSniffer configuration file (#1586) Followup to #1580 --- Build/phpcs/phpcs.xml | 128 ------------------------------------------ 1 file changed, 128 deletions(-) delete mode 100644 Build/phpcs/phpcs.xml diff --git a/Build/phpcs/phpcs.xml b/Build/phpcs/phpcs.xml deleted file mode 100644 index 3225022..0000000 --- a/Build/phpcs/phpcs.xml +++ /dev/null @@ -1,128 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ruleset name="phpList Coding Standard"> - <description> - This standard requires PHP_CodeSniffer >= 3.5.3. - </description> - - <arg name="colors"/> - <arg name="extensions" value="php"/> - - <!--The complete PSR-12 rule set--> - <rule ref="PSR12"/> - - <!-- Arrays --> - <rule ref="Generic.Arrays.DisallowLongArraySyntax"/> - <rule ref="Squiz.Arrays.ArrayBracketSpacing"/> - - <!-- Classes --> - <rule ref="Generic.Classes.DuplicateClassName"/> - <rule ref="PSR1.Classes.ClassDeclaration"/> - <rule ref="Squiz.Classes.ClassFileName"/> - <rule ref="Squiz.Classes.DuplicateProperty"/> - <rule ref="Squiz.Classes.LowercaseClassKeywords"/> - <rule ref="Squiz.Classes.SelfMemberReference"/> - - <!-- Code analysis --> - <rule ref="Generic.CodeAnalysis.AssignmentInCondition"/> - <rule ref="Generic.CodeAnalysis.EmptyStatement"/> - <rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop"/> - <rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall"/> - <rule ref="Generic.CodeAnalysis.JumbledIncrementer"/> - <rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/> - <rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/> - <rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/> - - <!-- Commenting --> - <rule ref="Generic.Commenting.Fixme"/> - <rule ref="Generic.Commenting.Todo"/> - <rule ref="PEAR.Commenting.InlineComment"/> - <rule ref="Squiz.Commenting.DocCommentAlignment"/> - <rule ref="Squiz.Commenting.EmptyCatchComment"/> - <rule ref="Squiz.Commenting.FunctionCommentThrowTag"/> - <rule ref="Squiz.Commenting.PostStatementComment"/> - - <!-- Control structures --> - <rule ref="PEAR.ControlStructures.ControlSignature"/> - - <!-- Debug --> - <rule ref="Generic.Debug.ClosureLinter"/> - - <!-- Files --> - <rule ref="Generic.Files.LineLength"> - <exclude-pattern>Configuration/TCA/</exclude-pattern> - </rule> - <rule ref="Generic.Files.OneClassPerFile"/> - <rule ref="Generic.Files.OneInterfacePerFile"/> - <rule ref="Generic.Files.OneObjectStructurePerFile"/> - <rule ref="Zend.Files.ClosingTag"/> - - <!-- Formatting --> - <rule ref="PEAR.Formatting.MultiLineAssignment"/> - - <!-- Functions --> - <rule ref="Generic.Functions.CallTimePassByReference"/> - <rule ref="Squiz.Functions.FunctionDuplicateArgument"/> - <rule ref="Squiz.Functions.GlobalFunction"/> - - <!-- Methods --> - <rule ref="PSR2.Methods.MethodDeclaration.Underscore"/> - - <!-- Metrics --> - <rule ref="Generic.Metrics.CyclomaticComplexity"/> - <rule ref="Generic.Metrics.NestingLevel"/> - - <!-- Naming conventions --> - <rule ref="Generic.NamingConventions.ConstructorName"/> - <rule ref="PEAR.NamingConventions.ValidClassName"/> - - <!-- Objects --> - <rule ref="Squiz.Objects.ObjectMemberComma"/> - - <!-- Operators --> - <rule ref="Squiz.Operators.IncrementDecrementUsage"/> - <rule ref="Squiz.Operators.ValidLogicalOperators"/> - - <!-- PHP --> - <rule ref="Generic.PHP.BacktickOperator"/> - <rule ref="Generic.PHP.CharacterBeforePHPOpeningTag"/> - <rule ref="Generic.PHP.DeprecatedFunctions"/> - <rule ref="Generic.PHP.DisallowAlternativePHPTags"/> - <rule ref="Generic.PHP.DisallowShortOpenTag"/> - <rule ref="Generic.PHP.DiscourageGoto"/> - <rule ref="Generic.PHP.ForbiddenFunctions"/> - <rule ref="Generic.PHP.NoSilencedErrors"/> - <rule ref="Squiz.PHP.CommentedOutCode"> - <properties> - <property name="maxPercentage" value="70"/> - </properties> - </rule> - <rule ref="Squiz.PHP.DisallowMultipleAssignments"/> - <rule ref="Squiz.PHP.DisallowSizeFunctionsInLoops"/> - <rule ref="Squiz.PHP.DiscouragedFunctions"/> - <rule ref="Squiz.PHP.Eval"/> - <rule ref="Squiz.PHP.GlobalKeyword"/> - <rule ref="Squiz.PHP.Heredoc"/> - <rule ref="Squiz.PHP.InnerFunctions"/> - <rule ref="Squiz.PHP.LowercasePHPFunctions"/> - <rule ref="Squiz.PHP.NonExecutableCode"/> - - <!-- Scope --> - <rule ref="Squiz.Scope.MemberVarScope"/> - <rule ref="Squiz.Scope.StaticThisUsage"/> - - <!--Strings--> - <rule ref="Squiz.Strings.DoubleQuoteUsage"/> - - <!-- Whitespace --> - <rule ref="PEAR.WhiteSpace.ObjectOperatorIndent"/> - <rule ref="PEAR.WhiteSpace.ScopeClosingBrace"/> - <rule ref="Squiz.WhiteSpace.CastSpacing"/> - <rule ref="Squiz.WhiteSpace.LogicalOperatorSpacing"/> - <rule ref="Squiz.WhiteSpace.OperatorSpacing"> - <properties> - <property name="ignoreNewlines" value="true" /> - </properties> - </rule> - <rule ref="Squiz.WhiteSpace.PropertyLabelSpacing"/> - <rule ref="Squiz.WhiteSpace.SemicolonSpacing"/> -</ruleset>