From 423cdf6ca21165cbed989684bcc33230321c2867 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sun, 6 Jul 2025 22:00:46 +0200 Subject: [PATCH] Set envVarMode to override everywhere --- .../InfoProviderSystem/DigikeySettings.php | 15 +++++++++----- .../InfoProviderSystem/Element14Settings.php | 7 +++++-- .../InfoProviderSystem/LCSCSettings.php | 7 +++++-- .../InfoProviderSystem/MouserSettings.php | 12 +++++++---- .../InfoProviderSystem/OEMSecretsSettings.php | 16 ++++++++++----- .../InfoProviderSystem/OctopartSettings.php | 20 +++++++++++++------ .../InfoProviderSystem/PollinSettings.php | 4 +++- .../InfoProviderSystem/ReicheltSettings.php | 16 ++++++++++----- .../InfoProviderSystem/TMESettings.php | 19 ++++++++++++------ 9 files changed, 80 insertions(+), 36 deletions(-) diff --git a/src/Settings/InfoProviderSystem/DigikeySettings.php b/src/Settings/InfoProviderSystem/DigikeySettings.php index e92041bb..17d05c5b 100644 --- a/src/Settings/InfoProviderSystem/DigikeySettings.php +++ b/src/Settings/InfoProviderSystem/DigikeySettings.php @@ -24,6 +24,7 @@ declare(strict_types=1); namespace App\Settings\InfoProviderSystem; use App\Settings\SettingsIcon; +use Jbtronics\SettingsBundle\Metadata\EnvVarMode; use Jbtronics\SettingsBundle\Settings\Settings; use Jbtronics\SettingsBundle\Settings\SettingsTrait; use Symfony\Component\Form\Extension\Core\Type\CountryType; @@ -41,25 +42,29 @@ class DigikeySettings #[SettingsParameter( label: new TM("settings.ips.digikey.client_id"), - envVar: "PROVIDER_DIGIKEY_CLIENT_ID" + envVar: "PROVIDER_DIGIKEY_CLIENT_ID", envVarMode: EnvVarMode::OVERWRITE )] public ?string $clientId = null; #[SettingsParameter( label: new TM("settings.ips.digikey.secret"), - envVar: "PROVIDER_DIGIKEY_SECRET" + envVar: "PROVIDER_DIGIKEY_SECRET", envVarMode: EnvVarMode::OVERWRITE )] public ?string $secret = null; - #[SettingsParameter(label: new TM("settings.ips.tme.currency"), formType: CurrencyType::class, formOptions: ["preferred_choices" => ["EUR", "USD", "CHF", "GBP"]], envVar: "PROVIDER_DIGIKEY_CURRENCY")] + #[SettingsParameter(label: new TM("settings.ips.tme.currency"), formType: CurrencyType::class, + formOptions: ["preferred_choices" => ["EUR", "USD", "CHF", "GBP"]], + envVar: "PROVIDER_DIGIKEY_CURRENCY", envVarMode: EnvVarMode::OVERWRITE)] #[Assert\Currency()] public string $currency = "EUR"; - #[SettingsParameter(label: new TM("settings.ips.tme.country"), formType: CountryType::class, envVar: "PROVIDER_DIGIKEY_COUNTRY")] + #[SettingsParameter(label: new TM("settings.ips.tme.country"), formType: CountryType::class, + envVar: "PROVIDER_DIGIKEY_COUNTRY", envVarMode: EnvVarMode::OVERWRITE)] #[Assert\Country] public string $country = "DE"; - #[SettingsParameter(label: new TM("settings.ips.tme.language"), formType: LanguageType::class, envVar: "PROVIDER_DIGIKEY_LANGUAGE")] + #[SettingsParameter(label: new TM("settings.ips.tme.language"), formType: LanguageType::class, + envVar: "PROVIDER_DIGIKEY_LANGUAGE", envVarMode: EnvVarMode::OVERWRITE)] #[Assert\Language] public string $language = "en"; } \ No newline at end of file diff --git a/src/Settings/InfoProviderSystem/Element14Settings.php b/src/Settings/InfoProviderSystem/Element14Settings.php index 8ca38425..42e2de5d 100644 --- a/src/Settings/InfoProviderSystem/Element14Settings.php +++ b/src/Settings/InfoProviderSystem/Element14Settings.php @@ -24,6 +24,7 @@ declare(strict_types=1); namespace App\Settings\InfoProviderSystem; use App\Settings\SettingsIcon; +use Jbtronics\SettingsBundle\Metadata\EnvVarMode; use Jbtronics\SettingsBundle\Settings\Settings; use Jbtronics\SettingsBundle\Settings\SettingsParameter; use Jbtronics\SettingsBundle\Settings\SettingsTrait; @@ -35,9 +36,11 @@ class Element14Settings { use SettingsTrait; - #[SettingsParameter(label: new TM("settings.ips.element14.apiKey"), description: new TM("settings.ips.element14.apiKey.help"), formOptions: ["help_html" => true], envVar: "PROVIDER_ELEMENT14_KEY")] + #[SettingsParameter(label: new TM("settings.ips.element14.apiKey"), description: new TM("settings.ips.element14.apiKey.help"), + formOptions: ["help_html" => true], envVar: "PROVIDER_ELEMENT14_KEY", envVarMode: EnvVarMode::OVERWRITE)] public ?string $apiKey = null; - #[SettingsParameter(label: new TM("settings.ips.element14.storeId"), description: new TM("settings.ips.element14.storeId.help"), formOptions: ["help_html" => true], envVar: "PROVIDER_ELEMENT14_STORE_ID")] + #[SettingsParameter(label: new TM("settings.ips.element14.storeId"), description: new TM("settings.ips.element14.storeId.help"), + formOptions: ["help_html" => true], envVar: "PROVIDER_ELEMENT14_STORE_ID", envVarMode: EnvVarMode::OVERWRITE)] public string $storeId = "de.farnell.com"; } \ No newline at end of file diff --git a/src/Settings/InfoProviderSystem/LCSCSettings.php b/src/Settings/InfoProviderSystem/LCSCSettings.php index ac4a47f4..906838e2 100644 --- a/src/Settings/InfoProviderSystem/LCSCSettings.php +++ b/src/Settings/InfoProviderSystem/LCSCSettings.php @@ -24,6 +24,7 @@ declare(strict_types=1); namespace App\Settings\InfoProviderSystem; use App\Settings\SettingsIcon; +use Jbtronics\SettingsBundle\Metadata\EnvVarMode; use Jbtronics\SettingsBundle\Settings\Settings; use Jbtronics\SettingsBundle\Settings\SettingsParameter; use Jbtronics\SettingsBundle\Settings\SettingsTrait; @@ -37,10 +38,12 @@ class LCSCSettings { use SettingsTrait; - #[SettingsParameter(label: new TM("settings.ips.lcsc.enabled"), envVar: "bool:PROVIDER_LCSC_ENABLED")] + #[SettingsParameter(label: new TM("settings.ips.lcsc.enabled"), + envVar: "bool:PROVIDER_LCSC_ENABLED", envVarMode: EnvVarMode::OVERWRITE)] public bool $enabled = false; - #[SettingsParameter(label: new TM("settings.ips.lcsc.currency"), formType: CurrencyType::class, envVar: "string:PROVIDER_LCSC_CURRENCY")] + #[SettingsParameter(label: new TM("settings.ips.lcsc.currency"), formType: CurrencyType::class, + envVar: "string:PROVIDER_LCSC_CURRENCY", envVarMode: EnvVarMode::OVERWRITE)] #[Assert\Currency()] public string $currency = 'EUR'; } \ No newline at end of file diff --git a/src/Settings/InfoProviderSystem/MouserSettings.php b/src/Settings/InfoProviderSystem/MouserSettings.php index 5407620d..b84deb50 100644 --- a/src/Settings/InfoProviderSystem/MouserSettings.php +++ b/src/Settings/InfoProviderSystem/MouserSettings.php @@ -24,6 +24,7 @@ declare(strict_types=1); namespace App\Settings\InfoProviderSystem; use App\Settings\SettingsIcon; +use Jbtronics\SettingsBundle\Metadata\EnvVarMode; use Jbtronics\SettingsBundle\Settings\Settings; use Jbtronics\SettingsBundle\Settings\SettingsParameter; use Symfony\Component\Validator\Constraints as Assert; @@ -33,22 +34,25 @@ use Symfony\Component\Translation\TranslatableMessage as TM; #[SettingsIcon("fa-plug")] class MouserSettings { - #[SettingsParameter(label: new TM("settings.ips.mouser.apiKey"), description: new TM("settings.ips.mouser.apiKey.help"), formOptions: ["help_html" => true], envVar: "PROVIDER_MOUSER_KEY")] + #[SettingsParameter(label: new TM("settings.ips.mouser.apiKey"), description: new TM("settings.ips.mouser.apiKey.help"), + formOptions: ["help_html" => true], envVar: "PROVIDER_MOUSER_KEY", envVarMode: EnvVarMode::OVERWRITE)] public ?string $apiKey = null; /** @var int The number of results to get from Mouser while searching (please note that this value is max 50) */ - #[SettingsParameter(label: new TM("settings.ips.mouser.searchLimit"), description: new TM("settings.ips.mouser.searchLimit.help"), envVar: "int:PROVIDER_MOUSER_SEARCH_LIMIT")] + #[SettingsParameter(label: new TM("settings.ips.mouser.searchLimit"), description: new TM("settings.ips.mouser.searchLimit.help"), + envVar: "int:PROVIDER_MOUSER_SEARCH_LIMIT", envVarMode: EnvVarMode::OVERWRITE)] #[Assert\Range(min: 1, max: 50)] public int $searchLimit = 50; /** @var MouserSearchOptions Filter search results by RoHS compliance and stock availability */ - #[SettingsParameter(label: new TM("settings.ips.mouser.searchOptions"), description: new TM("settings.ips.mouser.searchOptions.help"), envVar: "PROVIDER_MOUSER_SEARCH_OPTION", envVarMapper: [self::class, "mapSearchOptionEnvVar"])] + #[SettingsParameter(label: new TM("settings.ips.mouser.searchOptions"), description: new TM("settings.ips.mouser.searchOptions.help"), + envVar: "PROVIDER_MOUSER_SEARCH_OPTION", envVarMode: EnvVarMode::OVERWRITE, envVarMapper: [self::class, "mapSearchOptionEnvVar"])] public MouserSearchOptions $searchOption = MouserSearchOptions::NONE; /** @var bool It is recommended to leave this set to 'true'. The option is not really documented by Mouser: * Used when searching for keywords in the language specified when you signed up for Search API. */ //TODO: Put this into some expert mode only - #[SettingsParameter(envVar: "bool:PROVIDER_MOUSER_SEARCH_WITH_SIGNUP_LANGUAGE")] + //#[SettingsParameter(envVar: "bool:PROVIDER_MOUSER_SEARCH_WITH_SIGNUP_LANGUAGE")] public bool $searchWithSignUpLanguage = true; public static function mapSearchOptionEnvVar(?string $value): MouserSearchOptions diff --git a/src/Settings/InfoProviderSystem/OEMSecretsSettings.php b/src/Settings/InfoProviderSystem/OEMSecretsSettings.php index dfb2d689..75c2c821 100644 --- a/src/Settings/InfoProviderSystem/OEMSecretsSettings.php +++ b/src/Settings/InfoProviderSystem/OEMSecretsSettings.php @@ -24,6 +24,7 @@ declare(strict_types=1); namespace App\Settings\InfoProviderSystem; use App\Settings\SettingsIcon; +use Jbtronics\SettingsBundle\Metadata\EnvVarMode; use Jbtronics\SettingsBundle\Settings\Settings; use Jbtronics\SettingsBundle\Settings\SettingsParameter; use Jbtronics\SettingsBundle\Settings\SettingsTrait; @@ -41,14 +42,17 @@ class OEMSecretsSettings public const SUPPORTED_CURRENCIES = ["AUD", "CAD", "CHF", "CNY", "DKK", "EUR", "GBP", "HKD", "ILS", "INR", "JPY", "KRW", "NOK", "NZD", "RUB", "SEK", "SGD", "TWD", "USD"]; - #[SettingsParameter(label: new TM("settings.ips.element14.apiKey"), envVar: "PROVIDER_OEMSECRETS_KEY")] + #[SettingsParameter(label: new TM("settings.ips.element14.apiKey"), + envVar: "PROVIDER_OEMSECRETS_KEY", envVarMode: EnvVarMode::OVERWRITE)] public ?string $apiKey = null; #[Assert\Country] - #[SettingsParameter(label: new TM("settings.ips.tme.country"), formType: CountryType::class, formOptions: ["preferred_choices" => ["DE", "PL", "GB", "FR", "US"]], envVar: "PROVIDER_OEMSECRETS_COUNTRY_CODE")] + #[SettingsParameter(label: new TM("settings.ips.tme.country"), formType: CountryType::class, formOptions: ["preferred_choices" => ["DE", "PL", "GB", "FR", "US"]], + envVar: "PROVIDER_OEMSECRETS_COUNTRY_CODE", envVarMode: EnvVarMode::OVERWRITE)] public ?string $country = "DE"; - #[SettingsParameter(label: new TM("settings.ips.tme.currency"), formType: CurrencyType::class, formOptions: ["preferred_choices" => self::SUPPORTED_CURRENCIES], envVar: "PROVIDER_OEMSECRETS_CURRENCY")] + #[SettingsParameter(label: new TM("settings.ips.tme.currency"), formType: CurrencyType::class, formOptions: ["preferred_choices" => self::SUPPORTED_CURRENCIES], + envVar: "PROVIDER_OEMSECRETS_CURRENCY", envVarMode: EnvVarMode::OVERWRITE)] #[Assert\Choice(choices: self::SUPPORTED_CURRENCIES)] public string $currency = "EUR"; @@ -56,7 +60,8 @@ class OEMSecretsSettings * @var bool If this is enabled, distributors with zero prices * will be discarded from the creation of a new part */ - #[SettingsParameter(label: new TM("settings.ips.oemsecrets.keepZeroPrices"), description: new TM("settings.ips.oemsecrets.keepZeroPrices.help"), envVar: "bool:PROVIDER_OEMSECRETS_ZERO_PRICE")] + #[SettingsParameter(label: new TM("settings.ips.oemsecrets.keepZeroPrices"), description: new TM("settings.ips.oemsecrets.keepZeroPrices.help"), + envVar: "bool:PROVIDER_OEMSECRETS_ZERO_PRICE", envVarMode: EnvVarMode::OVERWRITE)] public bool $keepZeroPrices = false; /** @@ -64,7 +69,8 @@ class OEMSecretsSettings * # from the description transforming unstructured descriptions into structured parameters; * # each parameter in description should have the form: "...;name1:value1;name2:value2" */ - #[SettingsParameter(label: new TM("settings.ips.oemsecrets.parseParams"), description: new TM("settings.ips.oemsecrets.parseParams.help"), envVar: "bool:PROVIDER_OEMSECRETS_SET_PARAM")] + #[SettingsParameter(label: new TM("settings.ips.oemsecrets.parseParams"), description: new TM("settings.ips.oemsecrets.parseParams.help"), + envVar: "bool:PROVIDER_OEMSECRETS_SET_PARAM", envVarMode: EnvVarMode::OVERWRITE)] public bool $parseParams = true; #[SettingsParameter(label: new TM("settings.ips.oemsecrets.sortMode"), envVar: "PROVIDER_OEMSECRETS_SORT_CRITERIA", envVarMapper: [self::class, "mapSortModeEnvVar"])] diff --git a/src/Settings/InfoProviderSystem/OctopartSettings.php b/src/Settings/InfoProviderSystem/OctopartSettings.php index 905f337f..1b39d87a 100644 --- a/src/Settings/InfoProviderSystem/OctopartSettings.php +++ b/src/Settings/InfoProviderSystem/OctopartSettings.php @@ -24,6 +24,7 @@ declare(strict_types=1); namespace App\Settings\InfoProviderSystem; use App\Settings\SettingsIcon; +use Jbtronics\SettingsBundle\Metadata\EnvVarMode; use Jbtronics\SettingsBundle\Settings\Settings; use Jbtronics\SettingsBundle\Settings\SettingsParameter; use Jbtronics\SettingsBundle\Settings\SettingsTrait; @@ -41,30 +42,37 @@ class OctopartSettings #[SettingsParameter( label: new TM("settings.ips.digikey.client_id"), - envVar: "PROVIDER_OCTOPART_CLIENT_ID" + envVar: "PROVIDER_OCTOPART_CLIENT_ID", envVarMode: EnvVarMode::OVERWRITE )] public ?string $clientId = null; #[SettingsParameter( label: new TM("settings.ips.digikey.secret"), - envVar: "PROVIDER_OCTOPART_SECRET" + envVar: "PROVIDER_OCTOPART_SECRET", envVarMode: EnvVarMode::OVERWRITE )] public ?string $secret = null; - #[SettingsParameter(label: new TM("settings.ips.tme.currency"), formType: CurrencyType::class, formOptions: ["preferred_choices" => ["EUR", "USD", "CHF", "GBP"]], envVar: "PROVIDER_OCTOPART_CURRENCY")] + #[SettingsParameter(label: new TM("settings.ips.tme.currency"), formType: CurrencyType::class, + formOptions: ["preferred_choices" => ["EUR", "USD", "CHF", "GBP"]], + envVar: "PROVIDER_OCTOPART_CURRENCY", envVarMode: EnvVarMode::OVERWRITE)] #[Assert\Currency()] public string $currency = "EUR"; - #[SettingsParameter(label: new TM("settings.ips.tme.country"), formType: CountryType::class, envVar: "PROVIDER_OCTOPART_COUNTRY")] + #[SettingsParameter(label: new TM("settings.ips.tme.country"), formType: CountryType::class, + envVar: "PROVIDER_OCTOPART_COUNTRY", envVarMode: EnvVarMode::OVERWRITE)] #[Assert\Country] public string $country = "DE"; #[SettingsParameter(label: new TM("settings.ips.octopart.searchLimit"), description: new TM("settings.ips.octopart.searchLimit.help"), - formType: NumberType::class, formOptions: ["attr" => ["min" => 1, "max" => 100]], envVar: "PROVIDER_OCTOPART_SEARCH_LIMIT")] + formType: NumberType::class, formOptions: ["attr" => ["min" => 1, "max" => 100]], + envVar: "int:PROVIDER_OCTOPART_SEARCH_LIMIT", envVarMode: EnvVarMode::OVERWRITE)] #[Assert\Range(min: 1, max: 100)] public int $searchLimit = 10; - #[SettingsParameter(label: new TM("settings.ips.octopart.onlyAuthorizedSellers"), description: new TM("settings.ips.octopart.onlyAuthorizedSellers.help"))] + #[SettingsParameter(label: new TM("settings.ips.octopart.onlyAuthorizedSellers"), + description: new TM("settings.ips.octopart.onlyAuthorizedSellers.help"), + envVar: "bool:PROVIDER_OCTOPART_ONLY_AUTHORIZED_SELLERS", envVarMode: EnvVarMode::OVERWRITE + )] public bool $onlyAuthorizedSellers = true; } \ No newline at end of file diff --git a/src/Settings/InfoProviderSystem/PollinSettings.php b/src/Settings/InfoProviderSystem/PollinSettings.php index 8a7713c6..033d8b7e 100644 --- a/src/Settings/InfoProviderSystem/PollinSettings.php +++ b/src/Settings/InfoProviderSystem/PollinSettings.php @@ -24,6 +24,7 @@ declare(strict_types=1); namespace App\Settings\InfoProviderSystem; use App\Settings\SettingsIcon; +use Jbtronics\SettingsBundle\Metadata\EnvVarMode; use Jbtronics\SettingsBundle\Settings\Settings; use Jbtronics\SettingsBundle\Settings\SettingsParameter; use Symfony\Component\Translation\TranslatableMessage as TM; @@ -32,6 +33,7 @@ use Symfony\Component\Translation\TranslatableMessage as TM; #[SettingsIcon("fa-plug")] class PollinSettings { - #[SettingsParameter(label: new TM("settings.ips.lcsc.enabled"), envVar: "bool:PROVIDER_POLLIN_ENABLED")] + #[SettingsParameter(label: new TM("settings.ips.lcsc.enabled"), + envVar: "bool:PROVIDER_POLLIN_ENABLED", envVarMode: EnvVarMode::OVERWRITE)] public bool $enabled = false; } \ No newline at end of file diff --git a/src/Settings/InfoProviderSystem/ReicheltSettings.php b/src/Settings/InfoProviderSystem/ReicheltSettings.php index 8672ae69..588447de 100644 --- a/src/Settings/InfoProviderSystem/ReicheltSettings.php +++ b/src/Settings/InfoProviderSystem/ReicheltSettings.php @@ -24,6 +24,7 @@ declare(strict_types=1); namespace App\Settings\InfoProviderSystem; use App\Settings\SettingsIcon; +use Jbtronics\SettingsBundle\Metadata\EnvVarMode; use Jbtronics\SettingsBundle\Settings\Settings; use Jbtronics\SettingsBundle\Settings\SettingsParameter; use Jbtronics\SettingsBundle\Settings\SettingsTrait; @@ -41,22 +42,27 @@ class ReicheltSettings public const SUPPORTED_LANGUAGE = ["en", "de", "fr", "nl", "pl", "it", "es"]; - #[SettingsParameter(label: new TM("settings.ips.lcsc.enabled"), envVar: "bool:PROVIDER_REICHELT_ENABLED")] + #[SettingsParameter(label: new TM("settings.ips.lcsc.enabled"), + envVar: "bool:PROVIDER_REICHELT_ENABLED", envVarMode: EnvVarMode::OVERWRITE)] public bool $enabled = false; - #[SettingsParameter(label: new TM("settings.ips.tme.currency"), formType: CurrencyType::class, formOptions: ["preferred_choices" => ["EUR"]], envVar: "PROVIDER_REICHELT_CURRENCY")] + #[SettingsParameter(label: new TM("settings.ips.tme.currency"), formType: CurrencyType::class, formOptions: ["preferred_choices" => ["EUR"]], + envVar: "PROVIDER_REICHELT_CURRENCY", envVarMode: EnvVarMode::OVERWRITE)] public string $currency = "EUR"; - #[SettingsParameter(label: new TM("settings.ips.tme.language"), formType: LanguageType::class, formOptions: ["preferred_choices" => self::SUPPORTED_LANGUAGE], envVar: "PROVIDER_REICHELT_LANGUAGE")] + #[SettingsParameter(label: new TM("settings.ips.tme.language"), formType: LanguageType::class, formOptions: ["preferred_choices" => self::SUPPORTED_LANGUAGE], + envVar: "PROVIDER_REICHELT_LANGUAGE", envVarMode: EnvVarMode::OVERWRITE)] #[Assert\Language()] #[Assert\Choice(choices: self::SUPPORTED_LANGUAGE)] public string $language = "en"; - #[SettingsParameter(label: new TM("settings.ips.tme.country"), envVar: "PROVIDER_REICHELT_COUNTRY", formType: CountryType::class, formOptions: ["preferred_choices" => ["DE", "PL", "GB", "FR"]])] + #[SettingsParameter(label: new TM("settings.ips.tme.country"), formType: CountryType::class, formOptions: ["preferred_choices" => ["DE", "PL", "GB", "FR"]], + envVar: "PROVIDER_REICHELT_COUNTRY", envVarMode: EnvVarMode::OVERWRITE)] #[Assert\Country] public string $country = "DE"; - #[SettingsParameter(label: new TM("settings.ips.reichelt.include_vat"), envVar: "bool:PROVIDER_REICHELT_INCLUDE_VAT")] + #[SettingsParameter(label: new TM("settings.ips.reichelt.include_vat"), + envVar: "bool:PROVIDER_REICHELT_INCLUDE_VAT", envVarMode: EnvVarMode::OVERWRITE)] public bool $includeVAT = true; } \ No newline at end of file diff --git a/src/Settings/InfoProviderSystem/TMESettings.php b/src/Settings/InfoProviderSystem/TMESettings.php index f414e984..c7b57ae7 100644 --- a/src/Settings/InfoProviderSystem/TMESettings.php +++ b/src/Settings/InfoProviderSystem/TMESettings.php @@ -24,6 +24,7 @@ declare(strict_types=1); namespace App\Settings\InfoProviderSystem; use App\Settings\SettingsIcon; +use Jbtronics\SettingsBundle\Metadata\EnvVarMode; use Jbtronics\SettingsBundle\Settings\Settings; use Jbtronics\SettingsBundle\Settings\SettingsParameter; use Jbtronics\SettingsBundle\Settings\SettingsTrait; @@ -42,24 +43,30 @@ class TMESettings private const SUPPORTED_CURRENCIES = ["EUR", "USD", "PLN", "GBP"]; #[SettingsParameter(label: new TM("settings.ips.tme.token"), - description: new TM("settings.ips.tme.token.help"), formOptions: ["help_html" => true], envVar: "PROVIDER_TME_KEY")] + description: new TM("settings.ips.tme.token.help"), formOptions: ["help_html" => true], + envVar: "PROVIDER_TME_KEY", envVarMode: EnvVarMode::OVERWRITE)] public ?string $apiToken = null; - #[SettingsParameter(label: new TM("settings.ips.tme.secret"), envVar: "PROVIDER_TME_SECRET")] + #[SettingsParameter(label: new TM("settings.ips.tme.secret"), + envVar: "PROVIDER_TME_SECRET", envVarMode: EnvVarMode::OVERWRITE)] public ?string $apiSecret = null; - #[SettingsParameter(label: new TM("settings.ips.tme.currency"), formType: CurrencyType::class, formOptions: ["preferred_choices" => self::SUPPORTED_CURRENCIES], envVar: "PROVIDER_TME_CURRENCY")] + #[SettingsParameter(label: new TM("settings.ips.tme.currency"), formType: CurrencyType::class, formOptions: ["preferred_choices" => self::SUPPORTED_CURRENCIES], + envVar: "PROVIDER_TME_CURRENCY", envVarMode: EnvVarMode::OVERWRITE)] #[Assert\Choice(choices: self::SUPPORTED_CURRENCIES)] public string $currency = "EUR"; - #[SettingsParameter(label: new TM("settings.ips.tme.language"), formType: LanguageType::class, formOptions: ["preferred_choices" => ["en", "de", "fr", "pl"]], envVar: "PROVIDER_TME_LANGUAGE")] + #[SettingsParameter(label: new TM("settings.ips.tme.language"), formType: LanguageType::class, formOptions: ["preferred_choices" => ["en", "de", "fr", "pl"]], + envVar: "PROVIDER_TME_LANGUAGE", envVarMode: EnvVarMode::OVERWRITE)] #[Assert\Language] public string $language = "en"; - #[SettingsParameter(label: new TM("settings.ips.tme.country"), formType: CountryType::class, formOptions: ["preferred_choices" => ["DE", "PL", "GB", "FR"]], envVar: "PROVIDER_TME_COUNTRY")] + #[SettingsParameter(label: new TM("settings.ips.tme.country"), formType: CountryType::class, formOptions: ["preferred_choices" => ["DE", "PL", "GB", "FR"]], + envVar: "PROVIDER_TME_COUNTRY", envVarMode: EnvVarMode::OVERWRITE)] #[Assert\Country] public string $country = "DE"; - #[SettingsParameter(label: new TM("settings.ips.tme.grossPrices"), envVar: "bool:PROVIDER_TME_GET_GROSS_PRICES")] + #[SettingsParameter(label: new TM("settings.ips.tme.grossPrices"), + envVar: "bool:PROVIDER_TME_GET_GROSS_PRICES", envVarMode: EnvVarMode::OVERWRITE)] public bool $grossPrices = true; } \ No newline at end of file