Skip to content

Commit

Permalink
Merge pull request #17 from manuelselbach/#15-compatiblity-with-TYPO3…
Browse files Browse the repository at this point in the history
…-v12

[TASK] Update to be compatible with TYPO3 v12 #15
  • Loading branch information
manuelselbach committed Oct 4, 2023
2 parents 52842b7 + 5a676c3 commit 4cc938f
Show file tree
Hide file tree
Showing 16 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/StaticAnalysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '7.4' ]
php: [ '8.1' ]
name: PHPstan
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
${{ runner.os }}-composer-
- uses: shivammathur/setup-php@v2
with:
php-version: 7.4
php-version: 8.1
coverage: none

- run: composer install --no-progress
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/Tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ '7.4' ]
typo3: [ '^11.5' ]
php: [ '8.1', '8.2' ]
typo3: [ '^12.4' ]

name: PHP ${{ matrix.php }}, TYPO3 ${{ matrix.typo3 }} tests
steps:
Expand All @@ -34,7 +34,7 @@ jobs:

- name: Install full TYPO3 in version ${{ matrix.typo3 }}
run: |
composer require --no-progress "typo3/cms-adminpanel:${{ matrix.typo3 }}" "typo3/cms-backend:${{ matrix.typo3 }}" "typo3/cms-belog:${{ matrix.typo3 }}" "typo3/cms-beuser:${{ matrix.typo3 }}" "typo3/cms-core:${{ matrix.typo3 }}" "typo3/cms-dashboard:${{ matrix.typo3 }}" "typo3/cms-extbase:${{ matrix.typo3 }}" "typo3/cms-extensionmanager:${{ matrix.typo3 }}" "typo3/cms-felogin:${{ matrix.typo3 }}" "typo3/cms-filelist:${{ matrix.typo3 }}" "typo3/cms-filemetadata:${{ matrix.typo3 }}" "typo3/cms-fluid:${{ matrix.typo3 }}" "typo3/cms-fluid-styled-content:${{ matrix.typo3 }}" "typo3/cms-form:${{ matrix.typo3 }}" "typo3/cms-frontend:${{ matrix.typo3 }}" "typo3/cms-impexp:${{ matrix.typo3 }}" "typo3/cms-indexed-search:${{ matrix.typo3 }}" "typo3/cms-info:${{ matrix.typo3 }}" "typo3/cms-install:${{ matrix.typo3 }}" "typo3/cms-linkvalidator:${{ matrix.typo3 }}" "typo3/cms-lowlevel:${{ matrix.typo3 }}" "typo3/cms-opendocs:${{ matrix.typo3 }}" "typo3/cms-recycler:${{ matrix.typo3 }}" "typo3/cms-redirects:${{ matrix.typo3 }}" "typo3/cms-reports:${{ matrix.typo3 }}" "typo3/cms-rte-ckeditor:${{ matrix.typo3 }}" "typo3/cms-scheduler:${{ matrix.typo3 }}" "typo3/cms-seo:${{ matrix.typo3 }}" "typo3/cms-setup:${{ matrix.typo3 }}" "typo3/cms-sys-note:${{ matrix.typo3 }}" "typo3/cms-t3editor:${{ matrix.typo3 }}" "typo3/cms-tstemplate:${{ matrix.typo3 }}" "typo3/cms-viewpage:${{ matrix.typo3 }}" "typo3/cms-workspaces:${{ matrix.typo3 }}" "typo3/minimal:^11"
composer require --no-progress "typo3/cms-adminpanel:${{ matrix.typo3 }}" "typo3/cms-backend:${{ matrix.typo3 }}" "typo3/cms-belog:${{ matrix.typo3 }}" "typo3/cms-beuser:${{ matrix.typo3 }}" "typo3/cms-core:${{ matrix.typo3 }}" "typo3/cms-dashboard:${{ matrix.typo3 }}" "typo3/cms-extbase:${{ matrix.typo3 }}" "typo3/cms-extensionmanager:${{ matrix.typo3 }}" "typo3/cms-felogin:${{ matrix.typo3 }}" "typo3/cms-filelist:${{ matrix.typo3 }}" "typo3/cms-filemetadata:${{ matrix.typo3 }}" "typo3/cms-fluid:${{ matrix.typo3 }}" "typo3/cms-fluid-styled-content:${{ matrix.typo3 }}" "typo3/cms-form:${{ matrix.typo3 }}" "typo3/cms-frontend:${{ matrix.typo3 }}" "typo3/cms-impexp:${{ matrix.typo3 }}" "typo3/cms-indexed-search:${{ matrix.typo3 }}" "typo3/cms-info:${{ matrix.typo3 }}" "typo3/cms-install:${{ matrix.typo3 }}" "typo3/cms-linkvalidator:${{ matrix.typo3 }}" "typo3/cms-lowlevel:${{ matrix.typo3 }}" "typo3/cms-opendocs:${{ matrix.typo3 }}" "typo3/cms-reactions:${{ matrix.typo3 }}" "typo3/cms-recycler:${{ matrix.typo3 }}" "typo3/cms-redirects:${{ matrix.typo3 }}" "typo3/cms-reports:${{ matrix.typo3 }}" "typo3/cms-rte-ckeditor:${{ matrix.typo3 }}" "typo3/cms-scheduler:${{ matrix.typo3 }}" "typo3/cms-seo:${{ matrix.typo3 }}" "typo3/cms-setup:${{ matrix.typo3 }}" "typo3/cms-sys-note:${{ matrix.typo3 }}" "typo3/cms-t3editor:${{ matrix.typo3 }}" "typo3/cms-tstemplate:${{ matrix.typo3 }}" "typo3/cms-viewpage:${{ matrix.typo3 }}" "typo3/cms-webhooks:${{ matrix.typo3 }}" "typo3/cms-workspaces:${{ matrix.typo3 }}" "typo3/minimal:^12"
git checkout composer.json
- name: Code Style
Expand Down
2 changes: 2 additions & 0 deletions Classes/Domain/Model/Country.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SJBR\StaticInfoTables\Domain\Model;

/***************************************************************
Expand Down
2 changes: 2 additions & 0 deletions Classes/Domain/Model/CountryZone.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SJBR\StaticInfoTables\Domain\Model;

/***************************************************************
Expand Down
2 changes: 2 additions & 0 deletions Classes/Domain/Model/Currency.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SJBR\StaticInfoTables\Domain\Model;

/***************************************************************
Expand Down
2 changes: 2 additions & 0 deletions Classes/Domain/Model/Language.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SJBR\StaticInfoTables\Domain\Model;

/***************************************************************
Expand Down
2 changes: 2 additions & 0 deletions Classes/Domain/Model/Territory.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SJBR\StaticInfoTables\Domain\Model;

/***************************************************************
Expand Down
2 changes: 2 additions & 0 deletions Classes/Provider/TcaProvider.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Mselbach\StaticInfoTablesRu\Provider;

use Mselbach\StaticInfoTablesRu\Extension;
Expand Down
2 changes: 0 additions & 2 deletions Configuration/TCA/Overrides/static_countries.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

defined('TYPO3_MODE') || die();

$initialize = function ($dataSetName) {
$additionalFields = [
'cn_short_en' => 'cn_short_ru',
Expand Down
2 changes: 0 additions & 2 deletions Configuration/TCA/Overrides/static_country_zones.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

defined('TYPO3_MODE') || die();

$initialize = function ($dataSetName) {
$additionalFields = [
'zn_name_en' => 'zn_name_ru',
Expand Down
2 changes: 0 additions & 2 deletions Configuration/TCA/Overrides/static_currencies.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

defined('TYPO3_MODE') || die();

$initialize = function ($dataSetName) {
$additionalFields = [
'cu_name_en' => 'cu_name_ru',
Expand Down
2 changes: 0 additions & 2 deletions Configuration/TCA/Overrides/static_languages.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

defined('TYPO3_MODE') || die();

$initialize = function ($dataSetName) {
$additionalFields = [
'lg_name_en' => 'lg_name_ru'
Expand Down
2 changes: 0 additions & 2 deletions Configuration/TCA/Overrides/static_territories.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

defined('TYPO3_MODE') || die();

$initialize = function ($dataSetName) {
$additionalFields = [
'tr_name_en' => 'tr_name_ru',
Expand Down
19 changes: 9 additions & 10 deletions class.ext_update.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace manuelselbach\StaticInfoTablesRu;

/***************************************************************
Expand All @@ -26,11 +28,10 @@
***************************************************************/

use Mselbach\StaticInfoTablesRu\Extension;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
use TYPO3\CMS\Extbase\Object\ObjectManager;
use SJBR\StaticInfoTables\Cache\ClassCacheManager;
use SJBR\StaticInfoTables\Utility\DatabaseUpdateUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;

/**
* Class for updating the db
Expand All @@ -44,25 +45,23 @@ class ext_update
*
* @return string HTML
*/
public function main()
public function main(): string
{
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);

// Clear the class cache
/** @var ClassCacheManager $classCacheManager */
$classCacheManager = $objectManager->get(ClassCacheManager::class);
$classCacheManager = GeneralUtility::makeInstance(ClassCacheManager::class);
$classCacheManager->reBuild();

// Update the database
/** @var DatabaseUpdateUtility $databaseUpdateUtility */
$databaseUpdateUtility = $objectManager->get(DatabaseUpdateUtility::class);
$databaseUpdateUtility = GeneralUtility::makeInstance(DatabaseUpdateUtility::class);
$databaseUpdateUtility->doUpdate(Extension::EXTENSION_KEY);

$updateLanguageLabels = LocalizationUtility::translate('updateLanguageLabels', 'StaticInfoTables');
return '<p>' . $updateLanguageLabels . ' '. Extension::EXTENSION_KEY . '</p>';
return '<p>' . $updateLanguageLabels . ' ' . Extension::EXTENSION_KEY . '</p>';
}

public function access()
public function access(): bool
{
return true;
}
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
"typo3-ter/static-info-tables-ru": "self.version"
},
"require": {
"php": ">=7.4",
"typo3/cms-core": "^11.5 || dev-master",
"sjbr/static-info-tables": "^11.5"
"php": "^8.1",
"typo3/cms-core": "^12.4 || dev-main",
"sjbr/static-info-tables": "^11.5 || dev-master"
},
"require-dev": {
"roave/security-advisories": "dev-latest",
"squizlabs/php_codesniffer": "^3.5",
"typo3/testing-framework": "^7.0",
"typo3/testing-framework": "^8.0",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^1.8",
"phpstan/phpstan-deprecation-rules": "^1.1",
Expand Down
1 change: 0 additions & 1 deletion ext_localconf.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php
defined('TYPO3_MODE') or die();

(function ($extKey) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup(
Expand Down

0 comments on commit 4cc938f

Please sign in to comment.