Skip to content

Commit

Permalink
[TASK] Adapt dependecies for latest TYPO3 major version
Browse files Browse the repository at this point in the history
  • Loading branch information
elbebass committed Sep 6, 2022
1 parent 7a4e7d5 commit bc87f3d
Show file tree
Hide file tree
Showing 6 changed files with 189 additions and 49 deletions.
51 changes: 51 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

# TS/JS-Files
[*.{ts,js}]
indent_size = 2

# JSON-Files
[*.json]
indent_style = tab

# ReST-Files
[*.rst]
indent_size = 3

# YAML-Files
[*.{yaml,yml}]
indent_size = 2

# package.json
# .travis.yml
[{package.json,.travis.yml}]
indent_size = 2

# TypoScript
[*.{typoscript,tsconfig}]
indent_size = 2

# XLF-Files
[*.xlf]
indent_style = tab

# SQL-Files
[*.sql]
indent_style = tab
indent_size = 2

# .htaccess
[{_.htaccess,.htaccess}]
indent_style = tab
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
/Tests/ export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/php-cs-fixer.php export-ignore
/.php-cs-fixer.php export-ignore
/.travis.yml export-ignore
/.editorconfig export-ignore
85 changes: 85 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?php

declare(strict_types=1);

if (PHP_SAPI !== 'cli') {
die('This script supports command line usage only. Please check your command.');
}

$headerComment = <<<COMMENT
This file is part of the "Static Info Tables (ID)" extension for TYPO3 CMS.
For the full copyright and license information, please read the
LICENSE.txt file that was distributed with this source code.
Max Rösch <[email protected]>, Leuchtfeuer Digital Marketing
COMMENT;

$finder = (new PhpCsFixer\Finder())
->name('*.php')
->in(__DIR__)
->exclude('Libraries')
->exclude('Resources')
->notName('ext_emconf.php')
->notName('ext_localconf.php')
->notName('php-cs-fixer.php');

return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@DoctrineAnnotation' => true,
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'blank_line_after_opening_tag' => true,
'braces' => ['allow_single_line_closure' => true],
'cast_spaces' => ['space' => 'none'],
'compact_nullable_typehint' => true,
'concat_space' => ['spacing' => 'one'],
'declare_equal_normalize' => ['space' => 'none'],
'dir_constant' => true,
'function_typehint_space' => true,
'header_comment' => [
'header' => $headerComment,
'comment_type' => 'comment',
'separate' => 'both',
'location' => 'after_declare_strict'
],
'lowercase_cast' => true,
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
'modernize_types_casting' => true,
'native_function_casing' => true,
'new_with_braces' => true,
'no_alias_functions' => true,
'no_blank_lines_after_phpdoc' => true,
'no_empty_phpdoc' => true,
'no_empty_statement' => true,
'no_extra_blank_lines' => true,
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_null_property_initialization' => true,
'no_short_bool_cast' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_superfluous_elseif' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_unneeded_control_parentheses' => true,
'no_unused_imports' => true,
'no_useless_else' => true,
'no_whitespace_in_blank_line' => true,
'ordered_imports' => true,
'php_unit_construct' => ['assertions' => ['assertEquals', 'assertSame', 'assertNotEquals', 'assertNotSame']],
'php_unit_mock_short_will_return' => true,
'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
'phpdoc_no_access' => true,
'phpdoc_no_empty_return' => true,
'phpdoc_no_package' => true,
'phpdoc_scalar' => true,
'phpdoc_trim' => true,
'phpdoc_types' => true,
'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
'return_type_declaration' => ['space_before' => 'none'],
'single_quote' => true,
'single_line_comment_style' => ['comment_types' => ['hash']],
'single_trait_insert_per_statement' => true,
'whitespace_after_comma_in_array' => true,
])
->setFinder($finder);
85 changes: 42 additions & 43 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,44 @@
{
"name": "leuchtfeuer/static-info-tables-id",
"description": "Indonesian (id) language pack for the Static Info Tables providing localized names for countries, currencies and so on.",
"type": "typo3-cms-extension",
"license": "GPL-2.0-or-later",
"homepage": "https://www.Leuchtfeuer.com",
"authors": [
{
"name": "Florian Wessels",
"role": "Developer",
"email": "[email protected]",
"homepage": "https://www.Leuchtfeuer.com"
},
{
"name": "Max Rösch",
"role": "Developer",
"email": "[email protected]",
"homepage": "https://www.Leuchtfeuer.com"
}
],
"support": {
"issues": "https://github.com/Leuchtfeuer/static-info-tables-id/issues",
"source": "https://github.com/Leuchtfeuer/static-info-tables-id",
"email": "[email protected]"
},
"replace": {
"bitmotion/static-info-tables-id": "self.version",
"typo3-ter/static-info-tables-id": "self.version"
},
"require": {
"typo3/cms-core": "^9.5.17 || ^10.4.2",
"typo3/cms-extbase": "^9.5.17 || ^10.4.2",
"sjbr/static-info-tables": "^6.9"
},
"autoload": {
"psr-4": {
"Bitmotion\\StaticInfoTablesId\\": "Classes/"
}
},
"extra": {
"typo3/cms": {
"extension-key": "static_info_tables_id"
}
}
"name": "leuchtfeuer/static-info-tables-id",
"description": "Indonesian (id) language pack for the Static Info Tables providing localized names for countries, currencies and so on.",
"type": "typo3-cms-extension",
"license": "GPL-2.0-or-later",
"homepage": "https://www.Leuchtfeuer.com",
"authors": [
{
"name": "Florian Wessels",
"role": "Developer",
"email": "[email protected]"
},
{
"name": "Max Rösch",
"role": "Developer",
"email": "[email protected]",
"homepage": "https://www.Leuchtfeuer.com"
}
],
"support": {
"issues": "https://github.com/Leuchtfeuer/static-info-tables-id/issues",
"source": "https://github.com/Leuchtfeuer/static-info-tables-id",
"email": "[email protected]"
},
"replace": {
"bitmotion/static-info-tables-id": "self.version",
"typo3-ter/static-info-tables-id": "self.version"
},
"require": {
"typo3/cms-core": "^10.4 || ^11.5",
"typo3/cms-extbase": "^10.4 || ^11.5",
"sjbr/static-info-tables": "^6.7 || ^11.5"
},
"autoload": {
"psr-4": {
"Bitmotion\\StaticInfoTablesId\\": "Classes/"
}
},
"extra": {
"typo3/cms": {
"extension-key": "static_info_tables_id"
}
}
}
6 changes: 3 additions & 3 deletions ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
'title' => 'Static Info Tables (id)',
'description' => 'Indonesian (id) language pack for the Static Info Tables providing localized names for countries.',
'category' => 'misc',
'version' => '6.9.2',
'version' => '7.0.0',
'state' => 'stable',
'uploadfolder' => false,
'createDirs' => '',
Expand All @@ -14,9 +14,9 @@
'author_company' => 'Leuchtfeuer Digital Marketing',
'constraints' => [
'depends' => [
'typo3' => '9.5.0-10.4.99',
'typo3' => '10.4.0-11.5.99',
'php' => '7.2.0-7.4.99',
'static_info_tables' => '6.9.0-6.99.99',
'static_info_tables' => '6.7.3-11.5.99',
],
'conflicts' => [],
'suggests' => [],
Expand Down
8 changes: 6 additions & 2 deletions ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@

call_user_func(
function($extensionKey) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $extensionKey . '/Configuration/TypoScript/Extbase/setup.typoscript">');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $extensionKey . '/Configuration/PageTSconfig/Suggest.tsconfig">');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup(
sprintf('@import \'EXT:%s/Configuration/TypoScript/Extbase/setup.typoscript\'', $extensionKey)
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
sprintf('@import \'EXT:%s/Configuration/PageTSconfig/Suggest.tsconfig\'', $extensionKey)
);
}, \Bitmotion\StaticInfoTablesId\Extension::EXTENSION_KEY
);

0 comments on commit bc87f3d

Please sign in to comment.