chore: Update copyright year from 2025 to 2026 across core files

- Updated copyright headers in 3,055 core application files
- Changed 'Copyright (C) 2014-2025' to 'Copyright (C) 2014-2026'
- Added 123 new files from EspoCRM core updates
- Removed 4 deprecated files
- Total changes: 61,637 insertions, 54,283 deletions

This is a routine maintenance update for the new year 2026.
This commit is contained in:
2026-02-07 16:05:21 +01:00
parent 6a8a4a2882
commit 127fa6503b
6468 changed files with 564781 additions and 31179 deletions

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
@@ -34,8 +34,10 @@ use RuntimeException;
class ConfigDataProvider
{
public function __construct(private Config $config)
{}
public function __construct(
private Config $config,
private InternalRatesProvider $internalRatesProvider,
) {}
/**
* Get decimal places.
@@ -66,7 +68,7 @@ class ConfigDataProvider
/**
* Get a list of available currencies.
*
* @return array<int, string>
* @return string[]
*/
public function getCurrencyList(): array
{
@@ -86,10 +88,10 @@ class ConfigDataProvider
*/
public function getCurrencyRate(string $currencyCode): float
{
$rates = $this->config->get('currencyRates') ?? [];
$rates = $this->internalRatesProvider->get($this->getBaseCurrency());
if (!$this->hasCurrency($currencyCode)) {
throw new RuntimeException("Can't get currency rate of '{$currencyCode}' currency.");
throw new RuntimeException("Can't get currency rate of '$currencyCode' currency.");
}
return $rates[$currencyCode] ?? 1.0;
@@ -100,7 +102,7 @@ class ConfigDataProvider
*/
public function getCurrencyRates(): Rates
{
$rates = $this->config->get('currencyRates') ?? [];
$rates = $this->internalRatesProvider->get($this->getBaseCurrency());
$rates[$this->getBaseCurrency()] = 1.0;