Skip to content

Commit 23d6344

Browse files
committed
[TASK] Update project
1 parent 9719252 commit 23d6344

19 files changed

Lines changed: 2388 additions & 1673 deletions

.editorconfig

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
charset = utf-8
9+
end_of_line = lf
10+
indent_style = space
11+
indent_size = 4
12+
insert_final_newline = true
13+
trim_trailing_whitespace = true
14+
15+
# TS/JS-Files
16+
[*.{ts,js}]
17+
indent_size = 2
18+
19+
# JSON-Files
20+
[*.json]
21+
indent_style = tab
22+
23+
# ReST-Files
24+
[*.{rst,rst.txt}]
25+
indent_size = 4
26+
max_line_length = 80
27+
28+
# Markdown-Files
29+
[*.md]
30+
max_line_length = 80
31+
32+
# YAML-Files
33+
[*.{yaml,yml}]
34+
indent_size = 2
35+
36+
# NEON-Files
37+
[*.neon]
38+
indent_size = 2
39+
indent_style = tab
40+
41+
#.eslintrc.json
42+
[.eslintrc.json]
43+
indent_size = 2
44+
indent_style = space
45+
46+
# stylelint
47+
[.stylelintrc]
48+
indent_size = 2
49+
50+
# package.json
51+
[package.json]
52+
indent_size = 2
53+
54+
# TypoScript
55+
[*.{typoscript,tsconfig}]
56+
indent_size = 2
57+
58+
# XLF-Files
59+
[*.xlf]
60+
indent_style = tab
61+
62+
# SQL-Files
63+
[*.sql]
64+
indent_style = tab
65+
indent_size = 2
66+
67+
# .htaccess
68+
[{_.htaccess,.htaccess}]
69+
indent_style = tab

.github/workflows/test.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,21 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v4
16+
17+
- name: "Install PHP"
18+
uses: "shivammathur/setup-php@v2"
19+
with:
20+
coverage: "none"
21+
php-version: "8.2"
22+
tools: composer
1623

1724
- name: Validate composer.json and composer.lock
1825
run: composer validate --strict
1926

2027
- name: Cache Composer packages
2128
id: composer-cache
22-
uses: actions/cache@v2
29+
uses: actions/cache@v4
2330
with:
2431
path: vendor
2532
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
@@ -41,10 +48,12 @@ jobs:
4148
strategy:
4249
matrix:
4350
php-version:
44-
- "7.4"
45-
- "8.0"
51+
- "8.2"
52+
- "8.3"
53+
- "8.4"
54+
- "8.5"
4655
steps:
47-
- uses: actions/checkout@v2
56+
- uses: actions/checkout@v4
4857

4958
- name: "Install PHP"
5059
uses: "shivammathur/setup-php@v2"
@@ -57,7 +66,7 @@ jobs:
5766

5867
- name: Cache Composer packages
5968
id: composer-cache
60-
uses: actions/cache@v2
69+
uses: actions/cache@v4
6170
with:
6271
path: vendor
6372
key: ${{ runner.os }}-php-${{ matrix.php-version }}
@@ -68,4 +77,4 @@ jobs:
6877
run: composer install --prefer-dist --no-progress
6978

7079
- name: PHPUnit
71-
run: vendor/bin/phpunit --coverage-text --log-junit phpunit-report.xml
80+
run: vendor/bin/phpunit --log-junit phpunit-report.xml

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
.idea
33
/vendor
44
.phpunit.result.cache
5-
.php_cs.cache
5+
/.php-cs-fixer.cache
66
/build

.gitlab-ci.yml

Lines changed: 0 additions & 90 deletions
This file was deleted.

.php-cs-fixer.dist.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
$config = \TYPO3\CodingStandards\CsFixerConfig::create();
4+
$config->getFinder()
5+
->in(__DIR__ . '/Classes')
6+
->in(__DIR__ . '/Tests')
7+
;
8+
9+
return $config;

.php_cs

Lines changed: 0 additions & 66 deletions
This file was deleted.

Classes/Command/BaseComposerizeCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,24 @@
44

55
namespace B13\Typo3Composerize\Command;
66

7+
use Symfony\Component\Console\Attribute\AsCommand;
78
use Symfony\Component\Console\Command\Command;
89
use Symfony\Component\Console\Input\InputArgument;
910
use Symfony\Component\Console\Input\InputInterface;
1011
use Symfony\Component\Console\Input\InputOption;
1112
use Symfony\Component\Console\Output\OutputInterface;
1213

14+
#[AsCommand(name: 'base')]
1315
class BaseComposerizeCommand extends Command
1416
{
15-
protected static $defaultName = 'base';
16-
17-
protected function configure()
17+
protected function configure(): void
1818
{
1919
$this->addArgument('extension', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, 'Path to the TYPO3 Project', []);
2020
$this->addOption('doc-root', 'd', InputOption::VALUE_REQUIRED, 'Path to the TYPO3 project document root', '.');
2121
$this->addOption('folders', 'f', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Paths to scan for extensions relative to doc-root', ['typo3conf/ext/', 'typo3/sysext/']);
2222
}
2323

24-
protected function execute(InputInterface $input, OutputInterface $output)
24+
protected function execute(InputInterface $input, OutputInterface $output): int
2525
{
2626
return 0;
2727
}

Classes/Command/CheckIntegrityCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,23 @@
66

77
use B13\Typo3Composerize\Utilities\ComposerConvertUtility;
88
use B13\Typo3Composerize\Utilities\ComposerManifestCreator;
9+
use Symfony\Component\Console\Attribute\AsCommand;
910
use Symfony\Component\Console\Command\Command;
1011
use Symfony\Component\Console\Helper\Table;
1112
use Symfony\Component\Console\Input\InputInterface;
1213
use Symfony\Component\Console\Output\OutputInterface;
1314

15+
#[AsCommand(name: 'check')]
1416
class CheckIntegrityCommand extends BaseComposerizeCommand
1517
{
16-
protected static $defaultName = 'check';
17-
18-
protected function configure()
18+
protected function configure(): void
1919
{
2020
parent::configure();
2121
$this->setDescription('Check TYPO3 extensions for composer compatibility.')
2222
->setHelp('Check TYPO3 extensions for composer compatibility.');
2323
}
2424

25-
protected function execute(InputInterface $input, OutputInterface $output)
25+
protected function execute(InputInterface $input, OutputInterface $output): int
2626
{
2727
[$extensions, $docRoot, $folders] = $this->getArguments($input);
2828

Classes/Command/CreateComposerCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66

77
use B13\Typo3Composerize\Utilities\ComposerConvertUtility;
88
use Composer\Console\Application;
9+
use Symfony\Component\Console\Attribute\AsCommand;
910
use Symfony\Component\Console\Command\Command;
1011
use Symfony\Component\Console\Input\ArrayInput;
1112
use Symfony\Component\Console\Input\InputInterface;
1213
use Symfony\Component\Console\Output\BufferedOutput;
1314
use Symfony\Component\Console\Output\OutputInterface;
1415
use Symfony\Component\Filesystem\Exception\IOException;
1516

17+
#[AsCommand(name: 'create')]
1618
class CreateComposerCommand extends BaseComposerizeCommand
1719
{
18-
protected static $defaultName = 'create';
19-
20-
protected function configure()
20+
protected function configure(): void
2121
{
2222
parent::configure();
2323
$this->setDescription('Create composer.json')
@@ -26,7 +26,7 @@ protected function configure()
2626

2727
protected function execute(InputInterface $input, OutputInterface $output): int
2828
{
29-
list($extensions, $docRoot, $folders) = $this->getArguments($input);
29+
[$extensions, $docRoot, $folders] = $this->getArguments($input);
3030
$utility = new ComposerConvertUtility($docRoot, $folders);
3131
$extensions = $utility->validateExtensions($extensions);
3232

0 commit comments

Comments
 (0)