Skip to content

Commit e53a370

Browse files
committed
Merge branch 'release/8.4.0'
2 parents 5cf398c + 37e1ec5 commit e53a370

File tree

240 files changed

+2967
-3437
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

240 files changed

+2967
-3437
lines changed

.github/workflows/testing.yaml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: testing
2+
on: [push, pull_request]
3+
4+
jobs:
5+
php-lint:
6+
name: "PHP linter"
7+
runs-on: ubuntu-20.04
8+
steps:
9+
- name: "Checkout"
10+
uses: actions/checkout@v2
11+
- name: "Install PHP"
12+
uses: shivammathur/setup-php@v2
13+
with:
14+
php-version: "${{ matrix.php-version }}"
15+
coverage: none
16+
tools: composer:v2
17+
- name: "Run PHP lint"
18+
run: "composer test:php:lint"
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
php-version:
23+
- 7.2
24+
- 7.3
25+
- 7.4
26+
typoscript-lint:
27+
name: "TypoScript linter"
28+
runs-on: ubuntu-20.04
29+
steps:
30+
- name: "Checkout"
31+
uses: actions/checkout@v2
32+
- name: "Run TypoScript lint"
33+
uses: TYPO3-Continuous-Integration/TYPO3-CI-Typoscript-Lint@v1
34+
with:
35+
files: "./Configuration"
36+
config_file: ".project/tests/typoscript-lint.yml"
37+
php-cs-fixer:
38+
name: "PHP CS Fixer"
39+
runs-on: ubuntu-20.04
40+
needs: php-lint
41+
steps:
42+
- name: "Checkout"
43+
uses: actions/checkout@v2
44+
- name: "Install PHP"
45+
uses: shivammathur/setup-php@v2
46+
with:
47+
php-version: 7.4
48+
- name: "Composer Install"
49+
run: "composer install"
50+
- name: "Run PHP CS Fixer"
51+
run: "composer test:php:cs"
52+
unit-tests:
53+
name: "PHP Unit Tests"
54+
runs-on: ubuntu-20.04
55+
needs: php-lint
56+
steps:
57+
- name: Checkout
58+
uses: actions/checkout@v2
59+
- name: "Install PHP"
60+
uses: shivammathur/setup-php@v2
61+
with:
62+
php-version: "${{ matrix.php-version }}"
63+
coverage: none
64+
tools: composer:v2
65+
- name: "Composer Install"
66+
run: "composer install"
67+
- name: "Run Unit Tests"
68+
run: "composer test:unit"
69+
strategy:
70+
fail-fast: false
71+
matrix:
72+
php-version:
73+
- 7.2
74+
- 7.3
75+
- 7.4

.project/tests/.php-cs-fixer.php

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
<?php
2+
/*
3+
* This file is part of the TYPO3 CMS project.
4+
*
5+
* It is free software; you can redistribute it and/or modify it under
6+
* the terms of the GNU General Public License, either version 2
7+
* of the License, or any later version.
8+
*
9+
* For the full copyright and license information, please read the
10+
* LICENSE.txt file that was distributed with this source code.
11+
*
12+
* The TYPO3 project - inspiring people to share!
13+
*/
14+
/**
15+
* This file represents the configuration for Code Sniffing PSR-2-related
16+
* automatic checks of coding guidelines
17+
* Install @fabpot's great php-cs-fixer tool via
18+
*
19+
* $ composer global require friendsofphp/php-cs-fixer
20+
*
21+
* And then simply run
22+
*
23+
* $ php-cs-fixer fix --config ../Build/.php_cs
24+
*
25+
* inside the TYPO3 directory. Warning: This may take up to 10 minutes.
26+
*
27+
* For more information read:
28+
* https://www.php-fig.org/psr/psr-2/
29+
* https://cs.sensiolabs.org
30+
*/
31+
if (PHP_SAPI !== 'cli') {
32+
die('This script supports command line usage only. Please check your command.');
33+
}
34+
// Define in which folders to search and which folders to exclude
35+
// Exclude some directories that are excluded by Git anyways to speed up the sniffing
36+
$finder = PhpCsFixer\Finder::create()
37+
->in(
38+
[
39+
__DIR__ . '/../../Classes',
40+
__DIR__ . '/../../Tests',
41+
__DIR__ . '/../../Configuration',
42+
]
43+
);
44+
// Return a Code Sniffing configuration using
45+
// all sniffers needed for PSR-2
46+
// and additionally:
47+
// - Remove leading slashes in use clauses.
48+
// - PHP single-line arrays should not have trailing comma.
49+
// - Single-line whitespace before closing semicolon are prohibited.
50+
// - Remove unused use statements in the PHP source code
51+
// - Ensure Concatenation to have at least one whitespace around
52+
// - Remove trailing whitespace at the end of blank lines.
53+
return PhpCsFixer\Config::create()->setRiskyAllowed(true)->setRules([
54+
'@PSR2' => true,
55+
'@DoctrineAnnotation' => true,
56+
'no_leading_import_slash' => true,
57+
'no_trailing_comma_in_singleline_array' => true,
58+
'no_singleline_whitespace_before_semicolons' => true,
59+
'no_unused_imports' => true,
60+
'concat_space' => ['spacing' => 'one'],
61+
'no_whitespace_in_blank_line' => true,
62+
'ordered_imports' => true,
63+
'single_quote' => true,
64+
'no_empty_statement' => true,
65+
'no_extra_consecutive_blank_lines' => true,
66+
'phpdoc_no_package' => true,
67+
'phpdoc_scalar' => true,
68+
'no_blank_lines_after_phpdoc' => true,
69+
'array_syntax' => ['syntax' => 'short'],
70+
'whitespace_after_comma_in_array' => true,
71+
'function_typehint_space' => true,
72+
'hash_to_slash_comment' => true,
73+
'no_alias_functions' => true,
74+
'lowercase_cast' => true,
75+
'no_leading_namespace_whitespace' => true,
76+
'native_function_casing' => true,
77+
'no_short_bool_cast' => true,
78+
'no_unneeded_control_parentheses' => true,
79+
'phpdoc_no_empty_return' => false,
80+
'phpdoc_trim' => true,
81+
'no_superfluous_elseif' => false,
82+
'no_useless_else' => true,
83+
'phpdoc_types' => true,
84+
'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
85+
'return_type_declaration' => ['space_before' => 'none'],
86+
'cast_spaces' => ['space' => 'none'],
87+
'declare_equal_normalize' => ['space' => 'single'],
88+
'dir_constant' => true,
89+
])->setFinder($finder);

.project/tests/typoscript-lint.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
paths:
2+
- ./
3+
filePatterns:
4+
- "*.tsconfig"
5+
- "*.typoscript"
6+
sniffs:
7+
- class: Indentation
8+
parameters:
9+
useSpaces: true
10+
indentPerLevel: 2
11+
indentConditions: false
12+
- class: DeadCode
13+
disabled: true
14+
- class: OperatorWhitespace
15+
- class: RepeatingRValue
16+
disabled: true
17+
- class: EmptySection
18+
- class: NestingConsistency
19+
parameters:
20+
commonPathPrefixThreshold: 1

Classes/Command/AbstractCleanupCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
declare(strict_types=1);
2+
declare(strict_types = 1);
33
namespace In2code\Powermail\Command;
44

55
use Symfony\Component\Console\Command\Command;

Classes/Command/CleanupExportsCommand.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
<?php
2-
declare(strict_types=1);
2+
declare(strict_types = 1);
33
namespace In2code\Powermail\Command;
44

55
use Symfony\Component\Console\Input\InputArgument;
66
use Symfony\Component\Console\Input\InputInterface;
77
use Symfony\Component\Console\Output\OutputInterface;
8-
use TYPO3\CMS\Extbase\Object\Exception;
98

109
/**
1110
* Class CleanupExportsCommand

Classes/Command/CleanupUnusedUploadsCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
declare(strict_types=1);
2+
declare(strict_types = 1);
33
namespace In2code\Powermail\Command;
44

55
use In2code\Powermail\Domain\Repository\AnswerRepository;

Classes/Command/CleanupUploadsCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
declare(strict_types=1);
2+
declare(strict_types = 1);
33
namespace In2code\Powermail\Command;
44

55
use Symfony\Component\Console\Input\InputArgument;

Classes/Command/ExportCommand.php

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
<?php
2-
declare(strict_types=1);
2+
declare(strict_types = 1);
33
namespace In2code\Powermail\Command;
44

5-
use In2code\Powermail\Domain\Model\Field;
6-
use In2code\Powermail\Domain\Repository\AnswerRepository;
75
use In2code\Powermail\Domain\Repository\MailRepository;
86
use In2code\Powermail\Domain\Service\ExportService;
9-
use In2code\Powermail\Domain\Service\GetNewMarkerNamesForFormService;
10-
use In2code\Powermail\Utility\BasicFileUtility;
11-
use In2code\Powermail\Utility\DatabaseUtility;
127
use In2code\Powermail\Utility\ObjectUtility;
138
use Symfony\Component\Console\Command\Command;
149
use Symfony\Component\Console\Input\InputArgument;
1510
use Symfony\Component\Console\Input\InputInterface;
1611
use Symfony\Component\Console\Output\OutputInterface;
17-
use TYPO3\CMS\Core\Utility\GeneralUtility;
1812
use TYPO3\CMS\Extbase\Configuration\Exception\InvalidConfigurationTypeException;
1913
use TYPO3\CMS\Extbase\Mvc\Exception\InvalidExtensionNameException;
2014
use TYPO3\CMS\Extbase\Object\Exception;
@@ -94,10 +88,9 @@ public function execute(InputInterface $input, OutputInterface $output): int
9488
if ($exportService->send() === true) {
9589
$output->writeln('Export finished');
9690
return 0;
97-
} else {
98-
$output->writeln('Export could not be generated');
99-
return 1;
10091
}
92+
$output->writeln('Export could not be generated');
93+
return 1;
10194
}
10295

10396
/**

Classes/Command/ResetMarkersCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
declare(strict_types=1);
2+
declare(strict_types = 1);
33
namespace In2code\Powermail\Command;
44

55
use In2code\Powermail\Domain\Model\Field;

Classes/Condition/PowermailConditionFunctionsProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
declare(strict_types=1);
2+
declare(strict_types = 1);
33
namespace In2code\Powermail\Condition;
44

55
use In2code\Powermail\Utility\DatabaseUtility;

0 commit comments

Comments
 (0)