Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo3 13 compatibility #33

Merged
merged 21 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
d15c8aa
[TASK] Fixed git workflows
hojalatheef Nov 27, 2024
df91712
[TASK] Fixed documentation formats
hojalatheef Nov 27, 2024
d745fbc
[TASK] Fixed new ersion related infos
hojalatheef Nov 27, 2024
4030b41
[TASK] Updated Testing Suite
hojalatheef Nov 27, 2024
e5de004
[TASK] Fixed Code formatting
hojalatheef Nov 27, 2024
0dbed5b
[TASK] Removed default option and added description
hojalatheef Nov 27, 2024
0cd366a
[TASK] Added HeaderComment
hojalatheef Nov 27, 2024
9f729f5
[TASK] Composer Normalized fixes
hojalatheef Nov 27, 2024
63e18f2
[TASK] Fixed functional test cases
hojalatheef Nov 29, 2024
c1231b1
[TASK] Updated README file
hojalatheef Nov 29, 2024
af03e40
[TASK] Fixed CGL issues
hojalatheef Nov 29, 2024
551be55
[TASK] Removed phpstan
hojalatheef Nov 29, 2024
87d1bb6
[TASK] Removed Unit Tests
hojalatheef Nov 29, 2024
65407cd
Update Build/phpstan/phpstan.neon
hojalatheef Dec 2, 2024
26af1b7
Update Build/phpstan/phpstan-baseline.neon
hojalatheef Dec 2, 2024
ec12ab9
[TASK] Removed php unit dependeny as it is part of testing framework
hojalatheef Dec 2, 2024
145469a
[TASK] Removed named parameter for integer
hojalatheef Dec 2, 2024
3ee6691
[TASK] Replaced willReturnOnConsecutiveCalls function
hojalatheef Dec 2, 2024
166f89f
Merge remote-tracking branch 'origin/typo3_13_compatibility' into typ…
hojalatheef Dec 2, 2024
505091d
[TASK] Removed typo3 12 compatibilites
hojalatheef Dec 2, 2024
39ab473
[TASK] Fixed prepared statement usage in query in command controller
hojalatheef Dec 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Build/phpstan/phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
parameters:
# Ignore specific errors:
ignoreErrors:
# Ignore specific errors:
ignoreErrors:
1 change: 1 addition & 0 deletions Build/phpstan/phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
includes:
- phpstan-baseline.neon

parameters:
level: 6

Expand Down
10 changes: 1 addition & 9 deletions Build/phpunit/UnitTestsBootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,7 @@
// We can use the "typo3/cms-composer-installers" constant "TYPO3_COMPOSER_MODE" to determine composer mode.
// This should be always true except for TYPO3 mono repository.
$composerMode = defined('TYPO3_COMPOSER_MODE') && TYPO3_COMPOSER_MODE === true;

// @todo: Remove else branch when dropping support for v12
$hasConsolidatedHttpEntryPoint = class_exists(CoreHttpApplication::class);
if ($hasConsolidatedHttpEntryPoint) {
SystemEnvironmentBuilder::run(0, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_CLI, $composerMode);
} else {
$requestType = \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_BE | \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_CLI;
SystemEnvironmentBuilder::run(0, $requestType, $composerMode);
}
SystemEnvironmentBuilder::run(0, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_CLI, $composerMode);

$testbase->createDirectory(Environment::getPublicPath() . '/typo3conf/ext');
$testbase->createDirectory(Environment::getPublicPath() . '/typo3temp/assets');
Expand Down
2 changes: 1 addition & 1 deletion Classes/Command/SynchronizeCropVariantsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ protected function getStatementForSysFileReferences(): Result
->where(
$queryBuilder->expr()->eq(
'sync_crop_area',
$queryBuilder->createNamedParameter(1)
1
hojalatheef marked this conversation as resolved.
Show resolved Hide resolved
)
)
->executeQuery();
Expand Down
58 changes: 39 additions & 19 deletions Tests/Functional/Command/SynchronizeCropVariantsCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,16 @@ public function runWithEmptyCropColumnWillSkipRecord(): void
$this->outputMock
->expects(self::exactly(3))
->method('writeln')
->willReturnOnConsecutiveCalls(
'Start synchronizing crop variants of table sys_file_reference',
'SKIP: Column "crop" of sys_file_reference record with UID 1 is empty',
'We had 1 sys_file_reference records in total. 0 records were processed successfully and 1 records must be skipped because of invalid values',
);
->willReturnCallback(function () {
static $calls = 0;
$responses = [
'Start synchronizing crop variants of table sys_file_reference',
'SKIP: Column "crop" of sys_file_reference record with UID 1 is empty',
'We had 1 sys_file_reference records in total. 0 records were processed successfully and 1 records must be skipped because of invalid values',
];

return $responses[$calls++];
});

$this->subject->run(
$this->inputMock,
Expand Down Expand Up @@ -159,11 +164,16 @@ public function runWithEmptyPidColumnWillSkipRecord(): void
$this->outputMock
->expects(self::exactly(3))
->method('writeln')
->willReturnOnConsecutiveCalls(
'Start synchronizing crop variants of table sys_file_reference',
'SKIP: Column "pid" of sys_file_reference record with UID 1 is empty',
'We had 1 sys_file_reference records in total. 0 records were processed successfully and 1 records must be skipped because of invalid values',
);
->willReturnCallback(function () {
static $calls = 0;
$responses = [
'Start synchronizing crop variants of table sys_file_reference',
'SKIP: Column "pid" of sys_file_reference record with UID 1 is empty',
'We had 1 sys_file_reference records in total. 0 records were processed successfully and 1 records must be skipped because of invalid values',
];

return $responses[$calls++];
});

$this->subject->run(
$this->inputMock,
Expand Down Expand Up @@ -197,11 +207,16 @@ public function runWithUnchangedCropWillSkipRecord(): void
$this->outputMock
->expects(self::exactly(3))
->method('writeln')
->willReturnOnConsecutiveCalls(
'Start synchronizing crop variants of table sys_file_reference',
'SKIP: Column "crop" of table "sys_file_reference" with UID 1 because it is unchanged, empty or invalid JSON',
'We had 1 sys_file_reference records in total. 0 records were processed successfully and 1 records must be skipped because of invalid values',
);
->willReturnCallback(function () {
static $calls = 0;
$responses = [
'Start synchronizing crop variants of table sys_file_reference',
'SKIP: Column "crop" of table "sys_file_reference" with UID 1 because it is unchanged, empty or invalid JSON',
'We had 1 sys_file_reference records in total. 0 records were processed successfully and 1 records must be skipped because of invalid values',
];

return $responses[$calls++];
});

$this->updateCropVariantsServiceMock
->expects(self::atLeastOnce())
Expand All @@ -225,10 +240,15 @@ public function runWithChangedCropWillUpdateRecord(): void
$this->outputMock
->expects(self::exactly(2))
->method('writeln')
->willReturnOnConsecutiveCalls(
'Start synchronizing crop variants of table sys_file_reference',
'We had 3 sys_file_reference records in total. 3 records were processed successfully and 0 records must be skipped because of invalid values',
);
->willReturnCallback(function () {
static $calls = 0;
$responses = [
'Start synchronizing crop variants of table sys_file_reference',
'We had 3 sys_file_reference records in total. 3 records were processed successfully and 0 records must be skipped because of invalid values',
];

return $responses[$calls++];
});

$this->updateCropVariantsServiceMock
->expects(self::atLeastOnce())
Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"ergebnis/composer-normalize": "^2.44",
"friendsofphp/php-cs-fixer": "^3.14",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^11.2.5",
"roave/security-advisories": "dev-latest",
"sbuerk/typo3-cmscomposerinstallers-testingframework-bridge": "^0.1",
"typo3/coding-standards": "^0.8",
Expand Down