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

[TASK] Drop the configuration check for the currency #4272

Merged
merged 1 commit into from
Mar 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
19 changes: 0 additions & 19 deletions Classes/Configuration/SharedConfigurationCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
namespace OliverKlee\Seminars\Configuration;

use OliverKlee\Oelib\Configuration\AbstractConfigurationCheck;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Utility\GeneralUtility;

/**
* Configuration check for all settings in `plugin.tx_seminars`.
Expand All @@ -17,7 +15,6 @@ class SharedConfigurationCheck extends AbstractConfigurationCheck
{
protected function checkAllConfigurationValues(): void
{
$this->checkCurrency();
$this->checkGeneralPriceInMail();
$this->checkRegistrationFlag();
$this->checkSalutationMode();
Expand All @@ -32,22 +29,6 @@ protected function checkAllConfigurationValues(): void
}
}

/**
* Checks whether `plugin.tx_seminars.currency` is not empty and a valid ISO 4217 alpha 3.
*/
private function checkCurrency(): void
{
$connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('static_currencies');
$result = $connection->select(['cu_iso_3'], 'static_currencies')->fetchAllAssociative();
$allowedValues = \array_column($result, 'cu_iso_3');

$this->checkIfSingleInSetNotEmpty(
'currency',
'The specified currency setting is either empty or not a valid ISO 4217 alpha 3 code.',
$allowedValues
);
}

private function checkGeneralPriceInMail(): void
{
$this->checkIfBoolean(
Expand Down
5 changes: 0 additions & 5 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,6 @@ parameters:
count: 1
path: Classes/Configuration/EventRegistrationFlexForms.php

-
message: "#^Parameter \\#3 \\$allowedValues of method OliverKlee\\\\Oelib\\\\Configuration\\\\AbstractConfigurationCheck\\:\\:checkIfSingleInSetNotEmpty\\(\\) expects array\\<string\\>, array\\<int, mixed\\> given\\.$#"
count: 1
path: Classes/Configuration/SharedConfigurationCheck.php

-
message: "#^Provide more specific return type \"OliverKlee\\\\Seminars\\\\Csv\\\\CsvResponse\" over abstract one$#"
count: 1
Expand Down