*/
use CarbonTypeConverter;
}
diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Factory.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Factory.php
index 25e14d86..8dbd488a 100644
--- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Factory.php
+++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Factory.php
@@ -52,6 +52,7 @@ use ReflectionMethod;
* will be 0.
* If one of the set values is not valid, an InvalidDateException
* will be thrown.
+ * @method CarbonInterface createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null) Create a new Carbon instance from a specific date and time using strict validation.
* @method Carbon disableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather use the ->settings() method.
* @method Carbon enableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
@@ -76,7 +77,7 @@ use ReflectionMethod;
* @method Closure|Carbon getTestNow() Get the Carbon instance (real or mock) to be returned when a "now"
* instance is created.
* @method string getTimeFormatByPrecision($unitPrecision) Return a format from H:i to H:i:s.u according to given unit precision.
- * @method string getTranslationMessageWith($translator, string $key, string $locale = null, string $default = null) Returns raw translation message for a given key.
+ * @method string getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null) Returns raw translation message for a given key.
* @method \Symfony\Component\Translation\TranslatorInterface getTranslator() Get the default translator instance in use.
* @method int getWeekEndsAt() Get the last day of week
* @method int getWeekStartsAt() Get the first day of week
diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/FactoryImmutable.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/FactoryImmutable.php
index c5525122..0cec0fdf 100644
--- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/FactoryImmutable.php
+++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/FactoryImmutable.php
@@ -51,6 +51,7 @@ use Closure;
* will be 0.
* If one of the set values is not valid, an InvalidDateException
* will be thrown.
+ * @method CarbonInterface createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null) Create a new Carbon instance from a specific date and time using strict validation.
* @method CarbonImmutable disableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather use the ->settings() method.
* @method CarbonImmutable enableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
@@ -75,7 +76,7 @@ use Closure;
* @method Closure|CarbonImmutable getTestNow() Get the Carbon instance (real or mock) to be returned when a "now"
* instance is created.
* @method string getTimeFormatByPrecision($unitPrecision) Return a format from H:i to H:i:s.u according to given unit precision.
- * @method string getTranslationMessageWith($translator, string $key, string $locale = null, string $default = null) Returns raw translation message for a given key.
+ * @method string getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null) Returns raw translation message for a given key.
* @method \Symfony\Component\Translation\TranslatorInterface getTranslator() Get the default translator instance in use.
* @method int getWeekEndsAt() Get the last day of week
* @method int getWeekStartsAt() Get the first day of week
diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/be.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/be.php
index 3554f670..6db1a922 100644
--- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/be.php
+++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/be.php
@@ -24,6 +24,7 @@ if (class_exists('Symfony\\Component\\Translation\\PluralizationRules')) {
* - Serhan Apaydın
* - JD Isaacks
* - AbadonnaAbbys
+ * - Siomkin Alexander
*/
return [
'year' => ':count год|:count гады|:count гадоў',
@@ -35,18 +36,18 @@ return [
'week' => ':count тыдзень|:count тыдні|:count тыдняў',
'a_week' => '{1}тыдзень|:count тыдзень|:count тыдні|:count тыдняў',
'w' => ':count тыдзень|:count тыдні|:count тыдняў',
- 'day' => ':count дзень|:count ні|:count дзён',
- 'a_day' => '{1}дзень|:count дзень|:count ні|:count дзён',
- 'd' => ':count дзень|:count ні|:count дзён',
+ 'day' => ':count дзень|:count дні|:count дзён',
+ 'a_day' => '{1}дзень|:count дзень|:count дні|:count дзён',
+ 'd' => ':count дн',
'hour' => ':count гадзіну|:count гадзіны|:count гадзін',
'a_hour' => '{1}гадзіна|:count гадзіна|:count гадзіны|:count гадзін',
'h' => ':count гадзіна|:count гадзіны|:count гадзін',
'minute' => ':count хвіліна|:count хвіліны|:count хвілін',
'a_minute' => '{1}хвіліна|:count хвіліна|:count хвіліны|:count хвілін',
- 'min' => ':count хвіліна|:count хвіліны|:count хвілін',
+ 'min' => ':count хв',
'second' => ':count секунда|:count секунды|:count секунд',
'a_second' => '{1}некалькі секунд|:count секунда|:count секунды|:count секунд',
- 's' => ':count секунда|:count секунды|:count секунд',
+ 's' => ':count сек',
'hour_ago' => ':count гадзіну|:count гадзіны|:count гадзін',
'a_hour_ago' => '{1}гадзіну|:count гадзіну|:count гадзіны|:count гадзін',
diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Converter.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Converter.php
index d6f914dd..38ffd193 100644
--- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Converter.php
+++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Converter.php
@@ -19,6 +19,7 @@ use Carbon\Exceptions\UnitException;
use Closure;
use DateTime;
use DateTimeImmutable;
+use ReturnTypeWillChange;
/**
* Trait Converter.
@@ -75,6 +76,7 @@ trait Converter
*
* @return string
*/
+ #[ReturnTypeWillChange]
public function format($format)
{
$function = $this->localFormatFunction ?: static::$formatFunction;
diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php
index a185611e..25ab6ec9 100644
--- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php
+++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php
@@ -21,6 +21,7 @@ use Closure;
use DateTimeInterface;
use DateTimeZone;
use Exception;
+use ReturnTypeWillChange;
/**
* Trait Creator.
@@ -477,6 +478,37 @@ trait Creator
return $instance;
}
+ /**
+ * Create a new Carbon instance from a specific date and time using strict validation.
+ *
+ * @see create()
+ *
+ * @param int|null $year
+ * @param int|null $month
+ * @param int|null $day
+ * @param int|null $hour
+ * @param int|null $minute
+ * @param int|null $second
+ * @param DateTimeZone|string|null $tz
+ *
+ * @throws InvalidFormatException
+ *
+ * @return static
+ */
+ public static function createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null): self
+ {
+ $initialStrictMode = static::isStrictModeEnabled();
+ static::useStrictMode(true);
+
+ try {
+ $date = static::create($year, $month, $day, $hour, $minute, $second, $tz);
+ } finally {
+ static::useStrictMode($initialStrictMode);
+ }
+
+ return $date;
+ }
+
/**
* Create a Carbon instance from just a date. The time portion is set to now.
*
@@ -657,6 +689,7 @@ trait Creator
*
* @return static|false
*/
+ #[ReturnTypeWillChange]
public static function createFromFormat($format, $time, $tz = null)
{
$function = static::$createFromFormatFunction;
@@ -899,6 +932,7 @@ trait Creator
/**
* {@inheritdoc}
*/
+ #[ReturnTypeWillChange]
public static function getLastErrors()
{
return static::$lastErrors;
diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Date.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Date.php
index f4b7c42b..a4b0fce2 100644
--- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Date.php
+++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Date.php
@@ -31,6 +31,7 @@ use DateTimeInterface;
use DateTimeZone;
use InvalidArgumentException;
use ReflectionException;
+use ReturnTypeWillChange;
use Throwable;
/**
@@ -631,6 +632,7 @@ trait Date
*
* @link http://php.net/manual/en/datetime.gettimezone.php
*/
+ #[ReturnTypeWillChange]
public function getTimezone()
{
return CarbonTimeZone::instance(parent::getTimezone());
@@ -737,6 +739,30 @@ trait Date
return $date instanceof self ? $date : static::instance($date);
}
+ /**
+ * Return the Carbon instance passed through, a now instance in UTC
+ * if null given or parse the input if string given (using current timezone
+ * then switching to UTC).
+ *
+ * @param Carbon|DateTimeInterface|string|null $date
+ *
+ * @return static
+ */
+ protected function resolveUTC($date = null): self
+ {
+ if (!$date) {
+ return static::now('UTC');
+ }
+
+ if (\is_string($date)) {
+ return static::parse($date, $this->getTimezone())->utc();
+ }
+
+ static::expectDateTime($date, ['null', 'string']);
+
+ return $date instanceof self ? $date : static::instance($date)->utc();
+ }
+
/**
* Return the Carbon instance passed through, a now instance in the same timezone
* if null given or parse the input if string given.
@@ -1398,6 +1424,7 @@ trait Date
*
* @return static
*/
+ #[ReturnTypeWillChange]
public function setDate($year, $month, $day)
{
return parent::setDate((int) $year, (int) $month, (int) $day);
@@ -1414,6 +1441,7 @@ trait Date
*
* @return static
*/
+ #[ReturnTypeWillChange]
public function setISODate($year, $week, $day = 1)
{
return parent::setISODate((int) $year, (int) $week, (int) $day);
@@ -1449,6 +1477,7 @@ trait Date
*
* @return static
*/
+ #[ReturnTypeWillChange]
public function setTime($hour, $minute, $second = 0, $microseconds = 0)
{
return parent::setTime((int) $hour, (int) $minute, (int) $second, (int) $microseconds);
@@ -1463,6 +1492,7 @@ trait Date
*
* @return static
*/
+ #[ReturnTypeWillChange]
public function setTimestamp($unixTimestamp)
{
[$timestamp, $microseconds] = self::getIntegerAndDecimalParts($unixTimestamp);
@@ -1521,6 +1551,7 @@ trait Date
*
* @return static
*/
+ #[ReturnTypeWillChange]
public function setTimezone($value)
{
return parent::setTimezone(static::safeCreateDateTimeZone($value));
diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Difference.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Difference.php
index eec4f204..335ad2be 100644
--- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Difference.php
+++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Difference.php
@@ -19,6 +19,7 @@ use Carbon\Translator;
use Closure;
use DateInterval;
use DateTimeInterface;
+use ReturnTypeWillChange;
/**
* Trait Difference.
@@ -117,6 +118,7 @@ trait Difference
*
* @return DateInterval
*/
+ #[ReturnTypeWillChange]
public function diff($date = null, $absolute = false)
{
return parent::diff($this->resolveCarbon($date), (bool) $absolute);
@@ -638,7 +640,7 @@ trait Difference
*/
public function floatDiffInRealDays($date = null, $absolute = true)
{
- $date = $this->resolveCarbon($date)->utc();
+ $date = $this->resolveUTC($date);
$utc = $this->copy()->utc();
$hoursDiff = $utc->floatDiffInRealHours($date, $absolute);
diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Modifiers.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Modifiers.php
index 5c28eec9..0b0ccc95 100644
--- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Modifiers.php
+++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Modifiers.php
@@ -11,6 +11,7 @@
namespace Carbon\Traits;
use Carbon\CarbonInterface;
+use ReturnTypeWillChange;
/**
* Trait Modifiers.
@@ -429,6 +430,7 @@ trait Modifiers
*
* @see https://php.net/manual/en/datetime.modify.php
*/
+ #[ReturnTypeWillChange]
public function modify($modify)
{
return parent::modify((string) $modify);
diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Serialization.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Serialization.php
index 6b8d660c..54ad447d 100644
--- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Serialization.php
+++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Serialization.php
@@ -11,6 +11,7 @@
namespace Carbon\Traits;
use Carbon\Exceptions\InvalidFormatException;
+use ReturnTypeWillChange;
/**
* Trait Serialization.
@@ -91,6 +92,7 @@ trait Serialization
*
* @return static
*/
+ #[ReturnTypeWillChange]
public static function __set_state($dump)
{
if (\is_string($dump)) {
@@ -125,6 +127,7 @@ trait Serialization
/**
* Set locale if specified on unserialize() called.
*/
+ #[ReturnTypeWillChange]
public function __wakeup()
{
if (get_parent_class() && method_exists(parent::class, '__wakeup')) {
diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Units.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Units.php
index 9d9f580c..c8cd108d 100644
--- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Units.php
+++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Units.php
@@ -16,6 +16,7 @@ use Carbon\CarbonInterval;
use Carbon\Exceptions\UnitException;
use Closure;
use DateInterval;
+use ReturnTypeWillChange;
/**
* Trait Units.
@@ -193,6 +194,7 @@ trait Units
*
* @return static
*/
+ #[ReturnTypeWillChange]
public function add($unit, $value = 1, $overflow = null)
{
if (\is_string($unit) && \func_num_args() === 1) {
@@ -352,6 +354,7 @@ trait Units
*
* @return static
*/
+ #[ReturnTypeWillChange]
public function sub($unit, $value = 1, $overflow = null)
{
if (\is_string($unit) && \func_num_args() === 1) {
diff --git a/data/web/inc/lib/vendor/phpmailer/phpmailer/SECURITY.md b/data/web/inc/lib/vendor/phpmailer/phpmailer/SECURITY.md
index 5a6a8f41..035a87f7 100644
--- a/data/web/inc/lib/vendor/phpmailer/phpmailer/SECURITY.md
+++ b/data/web/inc/lib/vendor/phpmailer/phpmailer/SECURITY.md
@@ -2,6 +2,11 @@
Please disclose any security issues or vulnerabilities found through [Tidelift's coordinated disclosure system](https://tidelift.com/security) or to the maintainers privately.
+PHPMailer 6.4.1 and earlier contain a vulnerability that can result in untrusted code being called (if such code is injected into the host project's scope by other means). If the `$patternselect` parameter to `validateAddress()` is set to `'php'` (the default, defined by `PHPMailer::$validator`), and the global namespace contains a function called `php`, it will be called in preference to the built-in validator of the same name. Mitigated in PHPMailer 6.5.0 by denying the use of simple strings as validator function names. Recorded as [CVE-2021-3603](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-3603). Reported by [Vikrant Singh Chauhan](mailto:vi@hackberry.xyz) via [huntr.dev](https://www.huntr.dev/).
+
+PHPMailer versions 6.4.1 and earlier contain a possible remote code execution vulnerability through the `$lang_path` parameter of the `setLanguage()` method. If the `$lang_path` parameter is passed unfiltered from user input, it can be set to [a UNC path](https://docs.microsoft.com/en-us/dotnet/standard/io/file-path-formats#unc-paths), and if an attacker is also able to persuade the server to load a file from that UNC path, a script file under their control may be executed. This vulnerability only applies to systems that resolve UNC paths, typically only Microsoft Windows.
+PHPMailer 6.5.0 mitigates this by no longer treating translation files as PHP code, but by parsing their text content directly. This approach avoids the possibility of executing unknown code while retaining backward compatibility. This isn't ideal, so the current translation format is deprecated and will be replaced in the next major release. Recorded as [CVE-2021-34551](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-34551). Reported by [Jilin Diting Information Technology Co., Ltd](https://listensec.com) via Tidelift.
+
PHPMailer versions between 6.1.8 and 6.4.0 contain a regression of the earlier CVE-2018-19296 object injection vulnerability as a result of [a fix for Windows UNC paths in 6.1.8](https://github.com/PHPMailer/PHPMailer/commit/e2e07a355ee8ff36aba21d0242c5950c56e4c6f9). Recorded as [CVE-2020-36326](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2020-36326). Reported by Fariskhi Vidyan via Tidelift. 6.4.1 fixes this issue, and also enforces stricter checks for URL schemes in local path contexts.
PHPMailer versions 6.1.5 and earlier contain an output escaping bug that occurs in `Content-Type` and `Content-Disposition` when filenames passed into `addAttachment` and other methods that accept attachment names contain double quote characters, in contravention of RFC822 3.4.1. No specific vulnerability has been found relating to this, but it could allow file attachments to bypass attachment filters that are based on matching filename extensions. Recorded as [CVE-2020-13625](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2020-13625). Reported by Elar Lang of Clarified Security.
diff --git a/data/web/inc/lib/vendor/phpmailer/phpmailer/VERSION b/data/web/inc/lib/vendor/phpmailer/phpmailer/VERSION
index 306894a1..4be2c727 100644
--- a/data/web/inc/lib/vendor/phpmailer/phpmailer/VERSION
+++ b/data/web/inc/lib/vendor/phpmailer/phpmailer/VERSION
@@ -1 +1 @@
-6.4.1
\ No newline at end of file
+6.5.0
\ No newline at end of file
diff --git a/data/web/inc/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ar.php b/data/web/inc/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ar.php
index 8ab485c4..f795580a 100644
--- a/data/web/inc/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ar.php
+++ b/data/web/inc/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ar.php
@@ -19,8 +19,7 @@ $PHPMAILER_LANG['instantiate'] = 'لا يمكن توفير خدمة ا
$PHPMAILER_LANG['invalid_address'] = 'الإرسال غير ممكن لأن عنوان البريد الإلكتروني غير صالح: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' برنامج الإرسال غير مدعوم.';
$PHPMAILER_LANG['provide_address'] = 'يجب توفير عنوان البريد الإلكتروني لمستلم واحد على الأقل.';
-$PHPMAILER_LANG['recipients_failed'] = 'خطأ SMTP: الأخطاء التالية ' .
- 'فشل في الارسال لكل من : ';
+$PHPMAILER_LANG['recipients_failed'] = 'خطأ SMTP: الأخطاء التالية فشل في الارسال لكل من : ';
$PHPMAILER_LANG['signing'] = 'خطأ في التوقيع: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() غير ممكن.';
$PHPMAILER_LANG['smtp_error'] = 'خطأ على مستوى الخادم SMTP: ';
diff --git a/data/web/inc/lib/vendor/phpmailer/phpmailer/src/PHPMailer.php b/data/web/inc/lib/vendor/phpmailer/phpmailer/src/PHPMailer.php
index 2d16116a..eb4b742b 100644
--- a/data/web/inc/lib/vendor/phpmailer/phpmailer/src/PHPMailer.php
+++ b/data/web/inc/lib/vendor/phpmailer/phpmailer/src/PHPMailer.php
@@ -428,9 +428,11 @@ class PHPMailer
public $Debugoutput = 'echo';
/**
- * Whether to keep SMTP connection open after each message.
- * If this is set to true then to close the connection
- * requires an explicit call to smtpClose().
+ * Whether to keep the SMTP connection open after each message.
+ * If this is set to true then the connection will remain open after a send,
+ * and closing the connection will require an explicit call to smtpClose().
+ * It's a good idea to use this if you are sending multiple messages as it reduces overhead.
+ * See the mailing list example for how to use it.
*
* @var bool
*/
@@ -748,7 +750,7 @@ class PHPMailer
*
* @var string
*/
- const VERSION = '6.4.1';
+ const VERSION = '6.5.0';
/**
* Error severity: message only, continue processing.
@@ -1335,7 +1337,8 @@ class PHPMailer
if (null === $patternselect) {
$patternselect = static::$validator;
}
- if (is_callable($patternselect)) {
+ //Don't allow strings as callables, see SECURITY.md and CVE-2021-3603
+ if (is_callable($patternselect) && !is_string($patternselect)) {
return call_user_func($patternselect, $address);
}
//Reject line breaks in addresses; it's valid RFC5322, but not RFC5321
@@ -2182,7 +2185,8 @@ class PHPMailer
* The default language is English.
*
* @param string $langcode ISO 639-1 2-character language code (e.g. French is "fr")
- * @param string $lang_path Path to the language file directory, with trailing separator (slash)
+ * @param string $lang_path Path to the language file directory, with trailing separator (slash).D
+ * Do not set this from user input!
*
* @return bool
*/
@@ -2244,14 +2248,32 @@ class PHPMailer
if (!static::fileIsAccessible($lang_file)) {
$foundlang = false;
} else {
- //Overwrite language-specific strings.
- //This way we'll never have missing translation keys.
- $foundlang = include $lang_file;
+ //$foundlang = include $lang_file;
+ $lines = file($lang_file);
+ foreach ($lines as $line) {
+ //Translation file lines look like this:
+ //$PHPMAILER_LANG['authenticate'] = 'SMTP-Fehler: Authentifizierung fehlgeschlagen.';
+ //These files are parsed as text and not PHP so as to avoid the possibility of code injection
+ //See https://blog.stevenlevithan.com/archives/match-quoted-string
+ $matches = [];
+ if (
+ preg_match(
+ '/^\$PHPMAILER_LANG\[\'([a-z\d_]+)\'\]\s*=\s*(["\'])(.+)*?\2;/',
+ $line,
+ $matches
+ ) &&
+ //Ignore unknown translation keys
+ array_key_exists($matches[1], $PHPMAILER_LANG)
+ ) {
+ //Overwrite language-specific strings so we'll never have missing translation keys.
+ $PHPMAILER_LANG[$matches[1]] = (string)$matches[3];
+ }
+ }
}
}
$this->language = $PHPMAILER_LANG;
- return (bool) $foundlang; //Returns false if language not found
+ return $foundlang; //Returns false if language not found
}
/**
diff --git a/data/web/inc/lib/vendor/phpmailer/phpmailer/src/POP3.php b/data/web/inc/lib/vendor/phpmailer/phpmailer/src/POP3.php
index a39f4803..b38964b1 100644
--- a/data/web/inc/lib/vendor/phpmailer/phpmailer/src/POP3.php
+++ b/data/web/inc/lib/vendor/phpmailer/phpmailer/src/POP3.php
@@ -46,7 +46,7 @@ class POP3
*
* @var string
*/
- const VERSION = '6.4.1';
+ const VERSION = '6.5.0';
/**
* Default POP3 port number.
diff --git a/data/web/inc/lib/vendor/phpmailer/phpmailer/src/SMTP.php b/data/web/inc/lib/vendor/phpmailer/phpmailer/src/SMTP.php
index 0e7f53df..a4a91ed0 100644
--- a/data/web/inc/lib/vendor/phpmailer/phpmailer/src/SMTP.php
+++ b/data/web/inc/lib/vendor/phpmailer/phpmailer/src/SMTP.php
@@ -35,7 +35,7 @@ class SMTP
*
* @var string
*/
- const VERSION = '6.4.1';
+ const VERSION = '6.5.0';
/**
* SMTP line break constant.
@@ -186,6 +186,7 @@ class SMTP
'Amazon_SES' => '/[\d]{3} Ok (.*)/',
'SendGrid' => '/[\d]{3} Ok: queued as (.*)/',
'CampaignMonitor' => '/[\d]{3} 2.0.0 OK:([a-zA-Z\d]{48})/',
+ 'Haraka' => '/[\d]{3} Message Queued \((.*)\)/',
];
/**
diff --git a/data/web/inc/lib/vendor/symfony/deprecation-contracts/.gitignore b/data/web/inc/lib/vendor/symfony/deprecation-contracts/.gitignore
new file mode 100644
index 00000000..c49a5d8d
--- /dev/null
+++ b/data/web/inc/lib/vendor/symfony/deprecation-contracts/.gitignore
@@ -0,0 +1,3 @@
+vendor/
+composer.lock
+phpunit.xml
diff --git a/data/web/inc/lib/vendor/symfony/deprecation-contracts/CHANGELOG.md b/data/web/inc/lib/vendor/symfony/deprecation-contracts/CHANGELOG.md
new file mode 100644
index 00000000..7932e261
--- /dev/null
+++ b/data/web/inc/lib/vendor/symfony/deprecation-contracts/CHANGELOG.md
@@ -0,0 +1,5 @@
+CHANGELOG
+=========
+
+The changelog is maintained for all Symfony contracts at the following URL:
+https://github.com/symfony/contracts/blob/main/CHANGELOG.md
diff --git a/data/web/inc/lib/vendor/symfony/deprecation-contracts/LICENSE b/data/web/inc/lib/vendor/symfony/deprecation-contracts/LICENSE
new file mode 100644
index 00000000..ad85e173
--- /dev/null
+++ b/data/web/inc/lib/vendor/symfony/deprecation-contracts/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2020-2021 Fabien Potencier
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/data/web/inc/lib/vendor/symfony/deprecation-contracts/README.md b/data/web/inc/lib/vendor/symfony/deprecation-contracts/README.md
new file mode 100644
index 00000000..4957933a
--- /dev/null
+++ b/data/web/inc/lib/vendor/symfony/deprecation-contracts/README.md
@@ -0,0 +1,26 @@
+Symfony Deprecation Contracts
+=============================
+
+A generic function and convention to trigger deprecation notices.
+
+This package provides a single global function named `trigger_deprecation()` that triggers silenced deprecation notices.
+
+By using a custom PHP error handler such as the one provided by the Symfony ErrorHandler component,
+the triggered deprecations can be caught and logged for later discovery, both on dev and prod environments.
+
+The function requires at least 3 arguments:
+ - the name of the Composer package that is triggering the deprecation
+ - the version of the package that introduced the deprecation
+ - the message of the deprecation
+ - more arguments can be provided: they will be inserted in the message using `printf()` formatting
+
+Example:
+```php
+trigger_deprecation('symfony/blockchain', '8.9', 'Using "%s" is deprecated, use "%s" instead.', 'bitcoin', 'fabcoin');
+```
+
+This will generate the following message:
+`Since symfony/blockchain 8.9: Using "bitcoin" is deprecated, use "fabcoin" instead.`
+
+While not necessarily recommended, the deprecation notices can be completely ignored by declaring an empty
+`function trigger_deprecation() {}` in your application.
diff --git a/data/web/inc/lib/vendor/symfony/deprecation-contracts/composer.json b/data/web/inc/lib/vendor/symfony/deprecation-contracts/composer.json
new file mode 100644
index 00000000..38848896
--- /dev/null
+++ b/data/web/inc/lib/vendor/symfony/deprecation-contracts/composer.json
@@ -0,0 +1,35 @@
+{
+ "name": "symfony/deprecation-contracts",
+ "type": "library",
+ "description": "A generic function and convention to trigger deprecation notices",
+ "homepage": "https://symfony.com",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "require": {
+ "php": ">=7.1"
+ },
+ "autoload": {
+ "files": [
+ "function.php"
+ ]
+ },
+ "minimum-stability": "dev",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "2.4-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
+ }
+ }
+}
diff --git a/data/web/inc/lib/vendor/symfony/deprecation-contracts/function.php b/data/web/inc/lib/vendor/symfony/deprecation-contracts/function.php
new file mode 100644
index 00000000..d4371504
--- /dev/null
+++ b/data/web/inc/lib/vendor/symfony/deprecation-contracts/function.php
@@ -0,0 +1,27 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+if (!function_exists('trigger_deprecation')) {
+ /**
+ * Triggers a silenced deprecation notice.
+ *
+ * @param string $package The name of the Composer package that is triggering the deprecation
+ * @param string $version The version of the package that introduced the deprecation
+ * @param string $message The message of the deprecation
+ * @param mixed ...$args Values to insert in the message using printf() formatting
+ *
+ * @author Nicolas Grekas
+ */
+ function trigger_deprecation(string $package, string $version, string $message, ...$args): void
+ {
+ @trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED);
+ }
+}
diff --git a/data/web/inc/lib/vendor/symfony/polyfill-mbstring/Mbstring.php b/data/web/inc/lib/vendor/symfony/polyfill-mbstring/Mbstring.php
index 8b3b7589..c31611fb 100644
--- a/data/web/inc/lib/vendor/symfony/polyfill-mbstring/Mbstring.php
+++ b/data/web/inc/lib/vendor/symfony/polyfill-mbstring/Mbstring.php
@@ -101,7 +101,7 @@ final class Mbstring
$fromEncoding = 'Windows-1252';
}
if ('UTF-8' !== $fromEncoding) {
- $s = iconv($fromEncoding, 'UTF-8//IGNORE', $s);
+ $s = \iconv($fromEncoding, 'UTF-8//IGNORE', $s);
}
return preg_replace_callback('/[\x80-\xFF]+/', [__CLASS__, 'html_encoding_callback'], $s);
@@ -112,7 +112,7 @@ final class Mbstring
$fromEncoding = 'UTF-8';
}
- return iconv($fromEncoding, $toEncoding.'//IGNORE', $s);
+ return \iconv($fromEncoding, $toEncoding.'//IGNORE', $s);
}
public static function mb_convert_variables($toEncoding, $fromEncoding, &...$vars)
@@ -129,7 +129,7 @@ final class Mbstring
public static function mb_decode_mimeheader($s)
{
- return iconv_mime_decode($s, 2, self::$internalEncoding);
+ return \iconv_mime_decode($s, 2, self::$internalEncoding);
}
public static function mb_encode_mimeheader($s, $charset = null, $transferEncoding = null, $linefeed = null, $indent = null)
@@ -165,10 +165,10 @@ final class Mbstring
if ('UTF-8' === $encoding) {
$encoding = null;
if (!preg_match('//u', $s)) {
- $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s);
+ $s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s);
}
} else {
- $s = iconv($encoding, 'UTF-8//IGNORE', $s);
+ $s = \iconv($encoding, 'UTF-8//IGNORE', $s);
}
$cnt = floor(\count($convmap) / 4) * 4;
@@ -194,7 +194,7 @@ final class Mbstring
return $s;
}
- return iconv('UTF-8', $encoding.'//IGNORE', $s);
+ return \iconv('UTF-8', $encoding.'//IGNORE', $s);
}
public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = false)
@@ -231,10 +231,10 @@ final class Mbstring
if ('UTF-8' === $encoding) {
$encoding = null;
if (!preg_match('//u', $s)) {
- $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s);
+ $s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s);
}
} else {
- $s = iconv($encoding, 'UTF-8//IGNORE', $s);
+ $s = \iconv($encoding, 'UTF-8//IGNORE', $s);
}
static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4];
@@ -264,7 +264,7 @@ final class Mbstring
return $result;
}
- return iconv('UTF-8', $encoding.'//IGNORE', $result);
+ return \iconv('UTF-8', $encoding.'//IGNORE', $result);
}
public static function mb_convert_case($s, $mode, $encoding = null)
@@ -279,10 +279,10 @@ final class Mbstring
if ('UTF-8' === $encoding) {
$encoding = null;
if (!preg_match('//u', $s)) {
- $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s);
+ $s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s);
}
} else {
- $s = iconv($encoding, 'UTF-8//IGNORE', $s);
+ $s = \iconv($encoding, 'UTF-8//IGNORE', $s);
}
if (\MB_CASE_TITLE == $mode) {
@@ -342,7 +342,7 @@ final class Mbstring
return $s;
}
- return iconv('UTF-8', $encoding.'//IGNORE', $s);
+ return \iconv('UTF-8', $encoding.'//IGNORE', $s);
}
public static function mb_internal_encoding($encoding = null)
@@ -353,7 +353,7 @@ final class Mbstring
$normalizedEncoding = self::getEncoding($encoding);
- if ('UTF-8' === $normalizedEncoding || false !== @iconv($normalizedEncoding, $normalizedEncoding, ' ')) {
+ if ('UTF-8' === $normalizedEncoding || false !== @\iconv($normalizedEncoding, $normalizedEncoding, ' ')) {
self::$internalEncoding = $normalizedEncoding;
return true;
@@ -412,7 +412,7 @@ final class Mbstring
$encoding = self::$internalEncoding;
}
- return self::mb_detect_encoding($var, [$encoding]) || false !== @iconv($encoding, $encoding, $var);
+ return self::mb_detect_encoding($var, [$encoding]) || false !== @\iconv($encoding, $encoding, $var);
}
public static function mb_detect_encoding($str, $encodingList = null, $strict = false)
@@ -487,7 +487,7 @@ final class Mbstring
return \strlen($s);
}
- return @iconv_strlen($s, $encoding);
+ return @\iconv_strlen($s, $encoding);
}
public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null)
@@ -508,7 +508,7 @@ final class Mbstring
return 0;
}
- return iconv_strpos($haystack, $needle, $offset, $encoding);
+ return \iconv_strpos($haystack, $needle, $offset, $encoding);
}
public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null)
@@ -532,7 +532,7 @@ final class Mbstring
}
$pos = '' !== $needle || 80000 > \PHP_VERSION_ID
- ? iconv_strrpos($haystack, $needle, $encoding)
+ ? \iconv_strrpos($haystack, $needle, $encoding)
: self::mb_strlen($haystack, $encoding);
return false !== $pos ? $offset + $pos : false;
@@ -613,7 +613,7 @@ final class Mbstring
}
if ($start < 0) {
- $start = iconv_strlen($s, $encoding) + $start;
+ $start = \iconv_strlen($s, $encoding) + $start;
if ($start < 0) {
$start = 0;
}
@@ -622,13 +622,13 @@ final class Mbstring
if (null === $length) {
$length = 2147483647;
} elseif ($length < 0) {
- $length = iconv_strlen($s, $encoding) + $length - $start;
+ $length = \iconv_strlen($s, $encoding) + $length - $start;
if ($length < 0) {
return '';
}
}
- return (string) iconv_substr($s, $start, $length, $encoding);
+ return (string) \iconv_substr($s, $start, $length, $encoding);
}
public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null)
@@ -653,7 +653,7 @@ final class Mbstring
$pos = strrpos($haystack, $needle);
} else {
$needle = self::mb_substr($needle, 0, 1, $encoding);
- $pos = iconv_strrpos($haystack, $needle, $encoding);
+ $pos = \iconv_strrpos($haystack, $needle, $encoding);
}
return self::getSubpart($pos, $part, $haystack, $encoding);
@@ -732,12 +732,12 @@ final class Mbstring
$encoding = self::getEncoding($encoding);
if ('UTF-8' !== $encoding) {
- $s = iconv($encoding, 'UTF-8//IGNORE', $s);
+ $s = \iconv($encoding, 'UTF-8//IGNORE', $s);
}
$s = preg_replace('/[\x{1100}-\x{115F}\x{2329}\x{232A}\x{2E80}-\x{303E}\x{3040}-\x{A4CF}\x{AC00}-\x{D7A3}\x{F900}-\x{FAFF}\x{FE10}-\x{FE19}\x{FE30}-\x{FE6F}\x{FF00}-\x{FF60}\x{FFE0}-\x{FFE6}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}]/u', '', $s, -1, $wide);
- return ($wide << 1) + iconv_strlen($s, 'UTF-8');
+ return ($wide << 1) + \iconv_strlen($s, 'UTF-8');
}
public static function mb_substr_count($haystack, $needle, $encoding = null)
diff --git a/data/web/inc/lib/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php b/data/web/inc/lib/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php
index a22eca57..fac60b08 100644
--- a/data/web/inc/lib/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php
+++ b/data/web/inc/lib/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php
@@ -81,7 +81,7 @@ return array (
'Ī' => 'ī',
'Ĭ' => 'ĭ',
'Į' => 'į',
- 'İ' => 'i',
+ 'İ' => 'i̇',
'IJ' => 'ij',
'Ĵ' => 'ĵ',
'Ķ' => 'ķ',
diff --git a/data/web/inc/lib/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php b/data/web/inc/lib/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php
index ecbc1589..56b9cb85 100644
--- a/data/web/inc/lib/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php
+++ b/data/web/inc/lib/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php
@@ -746,41 +746,41 @@ return array (
'ύ' => 'Ύ',
'ὼ' => 'Ὼ',
'ώ' => 'Ώ',
- 'ᾀ' => 'ᾈ',
- 'ᾁ' => 'ᾉ',
- 'ᾂ' => 'ᾊ',
- 'ᾃ' => 'ᾋ',
- 'ᾄ' => 'ᾌ',
- 'ᾅ' => 'ᾍ',
- 'ᾆ' => 'ᾎ',
- 'ᾇ' => 'ᾏ',
- 'ᾐ' => 'ᾘ',
- 'ᾑ' => 'ᾙ',
- 'ᾒ' => 'ᾚ',
- 'ᾓ' => 'ᾛ',
- 'ᾔ' => 'ᾜ',
- 'ᾕ' => 'ᾝ',
- 'ᾖ' => 'ᾞ',
- 'ᾗ' => 'ᾟ',
- 'ᾠ' => 'ᾨ',
- 'ᾡ' => 'ᾩ',
- 'ᾢ' => 'ᾪ',
- 'ᾣ' => 'ᾫ',
- 'ᾤ' => 'ᾬ',
- 'ᾥ' => 'ᾭ',
- 'ᾦ' => 'ᾮ',
- 'ᾧ' => 'ᾯ',
+ 'ᾀ' => 'ἈΙ',
+ 'ᾁ' => 'ἉΙ',
+ 'ᾂ' => 'ἊΙ',
+ 'ᾃ' => 'ἋΙ',
+ 'ᾄ' => 'ἌΙ',
+ 'ᾅ' => 'ἍΙ',
+ 'ᾆ' => 'ἎΙ',
+ 'ᾇ' => 'ἏΙ',
+ 'ᾐ' => 'ἨΙ',
+ 'ᾑ' => 'ἩΙ',
+ 'ᾒ' => 'ἪΙ',
+ 'ᾓ' => 'ἫΙ',
+ 'ᾔ' => 'ἬΙ',
+ 'ᾕ' => 'ἭΙ',
+ 'ᾖ' => 'ἮΙ',
+ 'ᾗ' => 'ἯΙ',
+ 'ᾠ' => 'ὨΙ',
+ 'ᾡ' => 'ὩΙ',
+ 'ᾢ' => 'ὪΙ',
+ 'ᾣ' => 'ὫΙ',
+ 'ᾤ' => 'ὬΙ',
+ 'ᾥ' => 'ὭΙ',
+ 'ᾦ' => 'ὮΙ',
+ 'ᾧ' => 'ὯΙ',
'ᾰ' => 'Ᾰ',
'ᾱ' => 'Ᾱ',
- 'ᾳ' => 'ᾼ',
+ 'ᾳ' => 'ΑΙ',
'ι' => 'Ι',
- 'ῃ' => 'ῌ',
+ 'ῃ' => 'ΗΙ',
'ῐ' => 'Ῐ',
'ῑ' => 'Ῑ',
'ῠ' => 'Ῠ',
'ῡ' => 'Ῡ',
'ῥ' => 'Ῥ',
- 'ῳ' => 'ῼ',
+ 'ῳ' => 'ΩΙ',
'ⅎ' => 'Ⅎ',
'ⅰ' => 'Ⅰ',
'ⅱ' => 'Ⅱ',
@@ -1411,4 +1411,79 @@ return array (
'𞥁' => '𞤟',
'𞥂' => '𞤠',
'𞥃' => '𞤡',
+ 'ß' => 'SS',
+ 'ff' => 'FF',
+ 'fi' => 'FI',
+ 'fl' => 'FL',
+ 'ffi' => 'FFI',
+ 'ffl' => 'FFL',
+ 'ſt' => 'ST',
+ 'st' => 'ST',
+ 'և' => 'ԵՒ',
+ 'ﬓ' => 'ՄՆ',
+ 'ﬔ' => 'ՄԵ',
+ 'ﬕ' => 'ՄԻ',
+ 'ﬖ' => 'ՎՆ',
+ 'ﬗ' => 'ՄԽ',
+ 'ʼn' => 'ʼN',
+ 'ΐ' => 'Ϊ́',
+ 'ΰ' => 'Ϋ́',
+ 'ǰ' => 'J̌',
+ 'ẖ' => 'H̱',
+ 'ẗ' => 'T̈',
+ 'ẘ' => 'W̊',
+ 'ẙ' => 'Y̊',
+ 'ẚ' => 'Aʾ',
+ 'ὐ' => 'Υ̓',
+ 'ὒ' => 'Υ̓̀',
+ 'ὔ' => 'Υ̓́',
+ 'ὖ' => 'Υ̓͂',
+ 'ᾶ' => 'Α͂',
+ 'ῆ' => 'Η͂',
+ 'ῒ' => 'Ϊ̀',
+ 'ΐ' => 'Ϊ́',
+ 'ῖ' => 'Ι͂',
+ 'ῗ' => 'Ϊ͂',
+ 'ῢ' => 'Ϋ̀',
+ 'ΰ' => 'Ϋ́',
+ 'ῤ' => 'Ρ̓',
+ 'ῦ' => 'Υ͂',
+ 'ῧ' => 'Ϋ͂',
+ 'ῶ' => 'Ω͂',
+ 'ᾈ' => 'ἈΙ',
+ 'ᾉ' => 'ἉΙ',
+ 'ᾊ' => 'ἊΙ',
+ 'ᾋ' => 'ἋΙ',
+ 'ᾌ' => 'ἌΙ',
+ 'ᾍ' => 'ἍΙ',
+ 'ᾎ' => 'ἎΙ',
+ 'ᾏ' => 'ἏΙ',
+ 'ᾘ' => 'ἨΙ',
+ 'ᾙ' => 'ἩΙ',
+ 'ᾚ' => 'ἪΙ',
+ 'ᾛ' => 'ἫΙ',
+ 'ᾜ' => 'ἬΙ',
+ 'ᾝ' => 'ἭΙ',
+ 'ᾞ' => 'ἮΙ',
+ 'ᾟ' => 'ἯΙ',
+ 'ᾨ' => 'ὨΙ',
+ 'ᾩ' => 'ὩΙ',
+ 'ᾪ' => 'ὪΙ',
+ 'ᾫ' => 'ὫΙ',
+ 'ᾬ' => 'ὬΙ',
+ 'ᾭ' => 'ὭΙ',
+ 'ᾮ' => 'ὮΙ',
+ 'ᾯ' => 'ὯΙ',
+ 'ᾼ' => 'ΑΙ',
+ 'ῌ' => 'ΗΙ',
+ 'ῼ' => 'ΩΙ',
+ 'ᾲ' => 'ᾺΙ',
+ 'ᾴ' => 'ΆΙ',
+ 'ῂ' => 'ῊΙ',
+ 'ῄ' => 'ΉΙ',
+ 'ῲ' => 'ῺΙ',
+ 'ῴ' => 'ΏΙ',
+ 'ᾷ' => 'Α͂Ι',
+ 'ῇ' => 'Η͂Ι',
+ 'ῷ' => 'Ω͂Ι',
);
diff --git a/data/web/inc/lib/vendor/symfony/polyfill-mbstring/bootstrap.php b/data/web/inc/lib/vendor/symfony/polyfill-mbstring/bootstrap.php
index c45624c9..1fedd1f7 100644
--- a/data/web/inc/lib/vendor/symfony/polyfill-mbstring/bootstrap.php
+++ b/data/web/inc/lib/vendor/symfony/polyfill-mbstring/bootstrap.php
@@ -55,7 +55,7 @@ if (!function_exists('mb_detect_order')) {
function mb_detect_order($encoding = null) { return p\Mbstring::mb_detect_order($encoding); }
}
if (!function_exists('mb_parse_str')) {
- function mb_parse_str($string, &$result = []) { parse_str($string, $result); }
+ function mb_parse_str($string, &$result = []) { parse_str($string, $result); return (bool) $result; }
}
if (!function_exists('mb_strlen')) {
function mb_strlen($string, $encoding = null) { return p\Mbstring::mb_strlen($string, $encoding); }
diff --git a/data/web/inc/lib/vendor/symfony/polyfill-mbstring/bootstrap80.php b/data/web/inc/lib/vendor/symfony/polyfill-mbstring/bootstrap80.php
index f404f5fe..82f5ac4d 100644
--- a/data/web/inc/lib/vendor/symfony/polyfill-mbstring/bootstrap80.php
+++ b/data/web/inc/lib/vendor/symfony/polyfill-mbstring/bootstrap80.php
@@ -48,10 +48,10 @@ if (!function_exists('mb_detect_encoding')) {
function mb_detect_encoding(?string $string, array|string|null $encodings = null, ?bool $strict = false): string|false { return p\Mbstring::mb_detect_encoding((string) $string, $encodings, (bool) $strict); }
}
if (!function_exists('mb_detect_order')) {
- function mb_detect_order(array|string|null $encoding = null): array|bool { return p\Mbstring::mb_detect_order((string) $encoding); }
+ function mb_detect_order(array|string|null $encoding = null): array|bool { return p\Mbstring::mb_detect_order($encoding); }
}
if (!function_exists('mb_parse_str')) {
- function mb_parse_str(?string $string, &$result = []): bool { parse_str((string) $string, $result); }
+ function mb_parse_str(?string $string, &$result = []): bool { parse_str((string) $string, $result); return (bool) $result; }
}
if (!function_exists('mb_strlen')) {
function mb_strlen(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strlen((string) $string, $encoding); }
@@ -78,7 +78,7 @@ if (!function_exists('mb_stristr')) {
function mb_stristr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_stristr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
}
if (!function_exists('mb_strrchr')) {
- function mb_strrchr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrchr((string) $haystack, (string) $needle, $before_needle, (bool) $encoding); }
+ function mb_strrchr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrchr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
}
if (!function_exists('mb_strrichr')) {
function mb_strrichr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrichr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
diff --git a/data/web/inc/lib/vendor/symfony/polyfill-mbstring/composer.json b/data/web/inc/lib/vendor/symfony/polyfill-mbstring/composer.json
index ca826385..2ed7a743 100644
--- a/data/web/inc/lib/vendor/symfony/polyfill-mbstring/composer.json
+++ b/data/web/inc/lib/vendor/symfony/polyfill-mbstring/composer.json
@@ -28,7 +28,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
- "dev-main": "1.22-dev"
+ "dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
diff --git a/data/web/inc/lib/vendor/symfony/polyfill-php80/composer.json b/data/web/inc/lib/vendor/symfony/polyfill-php80/composer.json
index a9e6813c..5fe679db 100644
--- a/data/web/inc/lib/vendor/symfony/polyfill-php80/composer.json
+++ b/data/web/inc/lib/vendor/symfony/polyfill-php80/composer.json
@@ -30,7 +30,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
- "dev-main": "1.22-dev"
+ "dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
diff --git a/data/web/inc/lib/vendor/symfony/translation/CHANGELOG.md b/data/web/inc/lib/vendor/symfony/translation/CHANGELOG.md
index b1eb2da0..3341328a 100644
--- a/data/web/inc/lib/vendor/symfony/translation/CHANGELOG.md
+++ b/data/web/inc/lib/vendor/symfony/translation/CHANGELOG.md
@@ -1,6 +1,13 @@
CHANGELOG
=========
+5.3
+---
+
+ * Add `translation:pull` and `translation:push` commands to manage translations with third-party providers
+ * Add `TranslatorBagInterface::getCatalogues` method
+ * Add support to load XLIFF string in `XliffFileLoader`
+
5.2.0
-----
diff --git a/data/web/inc/lib/vendor/symfony/translation/Catalogue/AbstractOperation.php b/data/web/inc/lib/vendor/symfony/translation/Catalogue/AbstractOperation.php
index 17c257fd..9869fbb8 100644
--- a/data/web/inc/lib/vendor/symfony/translation/Catalogue/AbstractOperation.php
+++ b/data/web/inc/lib/vendor/symfony/translation/Catalogue/AbstractOperation.php
@@ -26,6 +26,10 @@ use Symfony\Component\Translation\MessageCatalogueInterface;
*/
abstract class AbstractOperation implements OperationInterface
{
+ public const OBSOLETE_BATCH = 'obsolete';
+ public const NEW_BATCH = 'new';
+ public const ALL_BATCH = 'all';
+
protected $source;
protected $target;
protected $result;
@@ -94,11 +98,11 @@ abstract class AbstractOperation implements OperationInterface
throw new InvalidArgumentException(sprintf('Invalid domain: "%s".', $domain));
}
- if (!isset($this->messages[$domain]['all'])) {
+ if (!isset($this->messages[$domain][self::ALL_BATCH])) {
$this->processDomain($domain);
}
- return $this->messages[$domain]['all'];
+ return $this->messages[$domain][self::ALL_BATCH];
}
/**
@@ -110,11 +114,11 @@ abstract class AbstractOperation implements OperationInterface
throw new InvalidArgumentException(sprintf('Invalid domain: "%s".', $domain));
}
- if (!isset($this->messages[$domain]['new'])) {
+ if (!isset($this->messages[$domain][self::NEW_BATCH])) {
$this->processDomain($domain);
}
- return $this->messages[$domain]['new'];
+ return $this->messages[$domain][self::NEW_BATCH];
}
/**
@@ -126,11 +130,11 @@ abstract class AbstractOperation implements OperationInterface
throw new InvalidArgumentException(sprintf('Invalid domain: "%s".', $domain));
}
- if (!isset($this->messages[$domain]['obsolete'])) {
+ if (!isset($this->messages[$domain][self::OBSOLETE_BATCH])) {
$this->processDomain($domain);
}
- return $this->messages[$domain]['obsolete'];
+ return $this->messages[$domain][self::OBSOLETE_BATCH];
}
/**
@@ -147,6 +151,37 @@ abstract class AbstractOperation implements OperationInterface
return $this->result;
}
+ /**
+ * @param self::*_BATCH $batch
+ */
+ public function moveMessagesToIntlDomainsIfPossible(string $batch = self::ALL_BATCH): void
+ {
+ // If MessageFormatter class does not exists, intl domains are not supported.
+ if (!class_exists(\MessageFormatter::class)) {
+ return;
+ }
+
+ foreach ($this->getDomains() as $domain) {
+ $intlDomain = $domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX;
+ switch ($batch) {
+ case self::OBSOLETE_BATCH: $messages = $this->getObsoleteMessages($domain); break;
+ case self::NEW_BATCH: $messages = $this->getNewMessages($domain); break;
+ case self::ALL_BATCH: $messages = $this->getMessages($domain); break;
+ default: throw new \InvalidArgumentException(sprintf('$batch argument must be one of ["%s", "%s", "%s"].', self::ALL_BATCH, self::NEW_BATCH, self::OBSOLETE_BATCH));
+ }
+
+ if (!$messages || (!$this->source->all($intlDomain) && $this->source->all($domain))) {
+ continue;
+ }
+
+ $result = $this->getResult();
+ $allIntlMessages = $result->all($intlDomain);
+ $currentMessages = array_diff_key($messages, $result->all($domain));
+ $result->replace($currentMessages, $domain);
+ $result->replace($allIntlMessages + $messages, $intlDomain);
+ }
+ }
+
/**
* Performs operation on source and target catalogues for the given domain and
* stores the results.
diff --git a/data/web/inc/lib/vendor/symfony/translation/Command/TranslationPullCommand.php b/data/web/inc/lib/vendor/symfony/translation/Command/TranslationPullCommand.php
new file mode 100644
index 00000000..0ec02ca7
--- /dev/null
+++ b/data/web/inc/lib/vendor/symfony/translation/Command/TranslationPullCommand.php
@@ -0,0 +1,157 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Translation\Command;
+
+use Symfony\Component\Console\Command\Command;
+use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\InputOption;
+use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\Console\Style\SymfonyStyle;
+use Symfony\Component\Translation\Catalogue\TargetOperation;
+use Symfony\Component\Translation\MessageCatalogue;
+use Symfony\Component\Translation\Provider\TranslationProviderCollection;
+use Symfony\Component\Translation\Reader\TranslationReaderInterface;
+use Symfony\Component\Translation\Writer\TranslationWriterInterface;
+
+/**
+ * @author Mathieu Santostefano
+ *
+ * @experimental in 5.3
+ */
+final class TranslationPullCommand extends Command
+{
+ use TranslationTrait;
+
+ protected static $defaultName = 'translation:pull';
+ protected static $defaultDescription = 'Pull translations from a given provider.';
+
+ private $providerCollection;
+ private $writer;
+ private $reader;
+ private $defaultLocale;
+ private $transPaths;
+ private $enabledLocales;
+
+ public function __construct(TranslationProviderCollection $providerCollection, TranslationWriterInterface $writer, TranslationReaderInterface $reader, string $defaultLocale, array $transPaths = [], array $enabledLocales = [])
+ {
+ $this->providerCollection = $providerCollection;
+ $this->writer = $writer;
+ $this->reader = $reader;
+ $this->defaultLocale = $defaultLocale;
+ $this->transPaths = $transPaths;
+ $this->enabledLocales = $enabledLocales;
+
+ parent::__construct();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function configure()
+ {
+ $keys = $this->providerCollection->keys();
+ $defaultProvider = 1 === \count($keys) ? $keys[0] : null;
+
+ $this
+ ->setDefinition([
+ new InputArgument('provider', null !== $defaultProvider ? InputArgument::OPTIONAL : InputArgument::REQUIRED, 'The provider to pull translations from.', $defaultProvider),
+ new InputOption('force', null, InputOption::VALUE_NONE, 'Override existing translations with provider ones (it will delete not synchronized messages).'),
+ new InputOption('intl-icu', null, InputOption::VALUE_NONE, 'Associated to --force option, it will write messages in "%domain%+intl-icu.%locale%.xlf" files.'),
+ new InputOption('domains', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Specify the domains to pull.'),
+ new InputOption('locales', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Specify the locales to pull.'),
+ new InputOption('format', null, InputOption::VALUE_OPTIONAL, 'Override the default output format.', 'xlf12'),
+ ])
+ ->setHelp(<<<'EOF'
+The %command.name%> command pulls translations from the given provider. Only
+new translations are pulled, existing ones are not overwritten.
+
+You can overwrite existing translations (and remove the missing ones on local side) by using the --force> flag:
+
+ php %command.full_name% --force provider>
+
+Full example:
+
+ php %command.full_name% provider --force --domains=messages,validators --locales=en>
+
+This command pulls all translations associated with the messages> and validators> domains for the en> locale.
+Local translations for the specified domains and locale are deleted if they're not present on the provider and overwritten if it's the case.
+Local translations for others domains and locales are ignored.
+EOF
+ )
+ ;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function execute(InputInterface $input, OutputInterface $output): int
+ {
+ $io = new SymfonyStyle($input, $output);
+
+ $provider = $this->providerCollection->get($input->getArgument('provider'));
+ $force = $input->getOption('force');
+ $intlIcu = $input->getOption('intl-icu');
+ $locales = $input->getOption('locales') ?: $this->enabledLocales;
+ $domains = $input->getOption('domains');
+ $format = $input->getOption('format');
+ $xliffVersion = '1.2';
+
+ if ($intlIcu && !$force) {
+ $io->note('--intl-icu option only has an effect when used with --force. Here, it will be ignored.');
+ }
+
+ switch ($format) {
+ case 'xlf20': $xliffVersion = '2.0';
+ // no break
+ case 'xlf12': $format = 'xlf';
+ }
+
+ $writeOptions = [
+ 'path' => end($this->transPaths),
+ 'xliff_version' => $xliffVersion,
+ ];
+
+ if (!$domains) {
+ $domains = $provider->getDomains();
+ }
+
+ $providerTranslations = $provider->read($domains, $locales);
+
+ if ($force) {
+ foreach ($providerTranslations->getCatalogues() as $catalogue) {
+ $operation = new TargetOperation((new MessageCatalogue($catalogue->getLocale())), $catalogue);
+ if ($intlIcu) {
+ $operation->moveMessagesToIntlDomainsIfPossible();
+ }
+ $this->writer->write($operation->getResult(), $format, $writeOptions);
+ }
+
+ $io->success(sprintf('Local translations has been updated from "%s" (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains)));
+
+ return 0;
+ }
+
+ $localTranslations = $this->readLocalTranslations($locales, $domains, $this->transPaths);
+
+ // Append pulled translations to local ones.
+ $localTranslations->addBag($providerTranslations->diff($localTranslations));
+
+ foreach ($localTranslations->getCatalogues() as $catalogue) {
+ $this->writer->write($catalogue, $format, $writeOptions);
+ }
+
+ $io->success(sprintf('New translations from "%s" has been written locally (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains)));
+
+ return 0;
+ }
+}
diff --git a/data/web/inc/lib/vendor/symfony/translation/Command/TranslationPushCommand.php b/data/web/inc/lib/vendor/symfony/translation/Command/TranslationPushCommand.php
new file mode 100644
index 00000000..da265d6c
--- /dev/null
+++ b/data/web/inc/lib/vendor/symfony/translation/Command/TranslationPushCommand.php
@@ -0,0 +1,158 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Translation\Command;
+
+use Symfony\Component\Console\Command\Command;
+use Symfony\Component\Console\Exception\InvalidArgumentException;
+use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\InputOption;
+use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\Console\Style\SymfonyStyle;
+use Symfony\Component\Translation\Provider\TranslationProviderCollection;
+use Symfony\Component\Translation\Reader\TranslationReaderInterface;
+use Symfony\Component\Translation\TranslatorBag;
+
+/**
+ * @author Mathieu Santostefano
+ *
+ * @experimental in 5.3
+ */
+final class TranslationPushCommand extends Command
+{
+ use TranslationTrait;
+
+ protected static $defaultName = 'translation:push';
+ protected static $defaultDescription = 'Push translations to a given provider.';
+
+ private $providers;
+ private $reader;
+ private $transPaths;
+ private $enabledLocales;
+
+ public function __construct(TranslationProviderCollection $providers, TranslationReaderInterface $reader, array $transPaths = [], array $enabledLocales = [])
+ {
+ $this->providers = $providers;
+ $this->reader = $reader;
+ $this->transPaths = $transPaths;
+ $this->enabledLocales = $enabledLocales;
+
+ parent::__construct();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function configure()
+ {
+ $keys = $this->providers->keys();
+ $defaultProvider = 1 === \count($keys) ? $keys[0] : null;
+
+ $this
+ ->setDefinition([
+ new InputArgument('provider', null !== $defaultProvider ? InputArgument::OPTIONAL : InputArgument::REQUIRED, 'The provider to push translations to.', $defaultProvider),
+ new InputOption('force', null, InputOption::VALUE_NONE, 'Override existing translations with local ones (it will delete not synchronized messages).'),
+ new InputOption('delete-missing', null, InputOption::VALUE_NONE, 'Delete translations available on provider but not locally.'),
+ new InputOption('domains', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Specify the domains to push.'),
+ new InputOption('locales', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Specify the locales to push.', $this->enabledLocales),
+ ])
+ ->setHelp(<<<'EOF'
+The %command.name%> command pushes translations to the given provider. Only new
+translations are pushed, existing ones are not overwritten.
+
+You can overwrite existing translations by using the --force> flag:
+
+ php %command.full_name% --force provider>
+
+You can delete provider translations which are not present locally by using the --delete-missing> flag:
+
+ php %command.full_name% --delete-missing provider>
+
+Full example:
+
+ php %command.full_name% provider --force --delete-missing --domains=messages,validators --locales=en>
+
+This command pushes all translations associated with the messages> and validators> domains for the en> locale.
+Provider translations for the specified domains and locale are deleted if they're not present locally and overwritten if it's the case.
+Provider translations for others domains and locales are ignored.
+EOF
+ )
+ ;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function execute(InputInterface $input, OutputInterface $output): int
+ {
+ if (!$this->enabledLocales) {
+ throw new InvalidArgumentException('You must define "framework.translator.enabled_locales" or "framework.translator.providers.%s.locales" config key in order to work with translation providers.');
+ }
+
+ $io = new SymfonyStyle($input, $output);
+
+ $provider = $this->providers->get($input->getArgument('provider'));
+ $domains = $input->getOption('domains');
+ $locales = $input->getOption('locales');
+ $force = $input->getOption('force');
+ $deleteMissing = $input->getOption('delete-missing');
+
+ $localTranslations = $this->readLocalTranslations($locales, $domains, $this->transPaths);
+
+ if (!$domains) {
+ $domains = $this->getDomainsFromTranslatorBag($localTranslations);
+ }
+
+ if (!$deleteMissing && $force) {
+ $provider->write($localTranslations);
+
+ $io->success(sprintf('All local translations has been sent to "%s" (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains)));
+
+ return 0;
+ }
+
+ $providerTranslations = $provider->read($domains, $locales);
+
+ if ($deleteMissing) {
+ $provider->delete($providerTranslations->diff($localTranslations));
+
+ $io->success(sprintf('Missing translations on "%s" has been deleted (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains)));
+
+ // Read provider translations again, after missing translations deletion,
+ // to avoid push freshly deleted translations.
+ $providerTranslations = $provider->read($domains, $locales);
+ }
+
+ $translationsToWrite = $localTranslations->diff($providerTranslations);
+
+ if ($force) {
+ $translationsToWrite->addBag($localTranslations->intersect($providerTranslations));
+ }
+
+ $provider->write($translationsToWrite);
+
+ $io->success(sprintf('%s local translations has been sent to "%s" (for "%s" locale(s), and "%s" domain(s)).', $force ? 'All' : 'New', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains)));
+
+ return 0;
+ }
+
+ private function getDomainsFromTranslatorBag(TranslatorBag $translatorBag): array
+ {
+ $domains = [];
+
+ foreach ($translatorBag->getCatalogues() as $catalogue) {
+ $domains += $catalogue->getDomains();
+ }
+
+ return array_unique($domains);
+ }
+}
diff --git a/data/web/inc/lib/vendor/symfony/translation/Command/TranslationTrait.php b/data/web/inc/lib/vendor/symfony/translation/Command/TranslationTrait.php
new file mode 100644
index 00000000..6a2b1ba8
--- /dev/null
+++ b/data/web/inc/lib/vendor/symfony/translation/Command/TranslationTrait.php
@@ -0,0 +1,78 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Translation\Command;
+
+use Symfony\Component\Translation\MessageCatalogue;
+use Symfony\Component\Translation\MessageCatalogueInterface;
+use Symfony\Component\Translation\TranslatorBag;
+
+/**
+ * @internal
+ */
+trait TranslationTrait
+{
+ private function readLocalTranslations(array $locales, array $domains, array $transPaths): TranslatorBag
+ {
+ $bag = new TranslatorBag();
+
+ foreach ($locales as $locale) {
+ $catalogue = new MessageCatalogue($locale);
+ foreach ($transPaths as $path) {
+ $this->reader->read($path, $catalogue);
+ }
+
+ if ($domains) {
+ foreach ($domains as $domain) {
+ $catalogue = $this->filterCatalogue($catalogue, $domain);
+ $bag->addCatalogue($catalogue);
+ }
+ } else {
+ $bag->addCatalogue($catalogue);
+ }
+ }
+
+ return $bag;
+ }
+
+ private function filterCatalogue(MessageCatalogue $catalogue, string $domain): MessageCatalogue
+ {
+ $filteredCatalogue = new MessageCatalogue($catalogue->getLocale());
+
+ // extract intl-icu messages only
+ $intlDomain = $domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX;
+ if ($intlMessages = $catalogue->all($intlDomain)) {
+ $filteredCatalogue->add($intlMessages, $intlDomain);
+ }
+
+ // extract all messages and subtract intl-icu messages
+ if ($messages = array_diff($catalogue->all($domain), $intlMessages)) {
+ $filteredCatalogue->add($messages, $domain);
+ }
+ foreach ($catalogue->getResources() as $resource) {
+ $filteredCatalogue->addResource($resource);
+ }
+
+ if ($metadata = $catalogue->getMetadata('', $intlDomain)) {
+ foreach ($metadata as $k => $v) {
+ $filteredCatalogue->setMetadata($k, $v, $intlDomain);
+ }
+ }
+
+ if ($metadata = $catalogue->getMetadata('', $domain)) {
+ foreach ($metadata as $k => $v) {
+ $filteredCatalogue->setMetadata($k, $v, $domain);
+ }
+ }
+
+ return $filteredCatalogue;
+ }
+}
diff --git a/data/web/inc/lib/vendor/symfony/translation/Command/XliffLintCommand.php b/data/web/inc/lib/vendor/symfony/translation/Command/XliffLintCommand.php
index 122f859b..4117d87c 100644
--- a/data/web/inc/lib/vendor/symfony/translation/Command/XliffLintCommand.php
+++ b/data/web/inc/lib/vendor/symfony/translation/Command/XliffLintCommand.php
@@ -31,6 +31,7 @@ use Symfony\Component\Translation\Util\XliffUtils;
class XliffLintCommand extends Command
{
protected static $defaultName = 'lint:xliff';
+ protected static $defaultDescription = 'Lint an XLIFF file and outputs encountered errors';
private $format;
private $displayCorrectFiles;
@@ -53,7 +54,7 @@ class XliffLintCommand extends Command
protected function configure()
{
$this
- ->setDescription('Lint an XLIFF file and outputs encountered errors')
+ ->setDescription(self::$defaultDescription)
->addArgument('filename', InputArgument::IS_ARRAY, 'A file, a directory or "-" for reading from STDIN')
->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format', 'txt')
->setHelp(<<translator->getCatalogue($locale);
}
+ /**
+ * {@inheritdoc}
+ */
+ public function getCatalogues(): array
+ {
+ return $this->translator->getCatalogues();
+ }
+
/**
* {@inheritdoc}
*
diff --git a/data/web/inc/lib/vendor/symfony/translation/DependencyInjection/TranslationDumperPass.php b/data/web/inc/lib/vendor/symfony/translation/DependencyInjection/TranslationDumperPass.php
index 930f36d7..6d78342b 100644
--- a/data/web/inc/lib/vendor/symfony/translation/DependencyInjection/TranslationDumperPass.php
+++ b/data/web/inc/lib/vendor/symfony/translation/DependencyInjection/TranslationDumperPass.php
@@ -25,6 +25,10 @@ class TranslationDumperPass implements CompilerPassInterface
public function __construct(string $writerServiceId = 'translation.writer', string $dumperTag = 'translation.dumper')
{
+ if (1 < \func_num_args()) {
+ trigger_deprecation('symfony/translation', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
+ }
+
$this->writerServiceId = $writerServiceId;
$this->dumperTag = $dumperTag;
}
diff --git a/data/web/inc/lib/vendor/symfony/translation/DependencyInjection/TranslationExtractorPass.php b/data/web/inc/lib/vendor/symfony/translation/DependencyInjection/TranslationExtractorPass.php
index d08b2ba5..fab6b20a 100644
--- a/data/web/inc/lib/vendor/symfony/translation/DependencyInjection/TranslationExtractorPass.php
+++ b/data/web/inc/lib/vendor/symfony/translation/DependencyInjection/TranslationExtractorPass.php
@@ -26,6 +26,10 @@ class TranslationExtractorPass implements CompilerPassInterface
public function __construct(string $extractorServiceId = 'translation.extractor', string $extractorTag = 'translation.extractor')
{
+ if (0 < \func_num_args()) {
+ trigger_deprecation('symfony/translation', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
+ }
+
$this->extractorServiceId = $extractorServiceId;
$this->extractorTag = $extractorTag;
}
diff --git a/data/web/inc/lib/vendor/symfony/translation/DependencyInjection/TranslatorPass.php b/data/web/inc/lib/vendor/symfony/translation/DependencyInjection/TranslatorPass.php
index 27315f61..c6a1306e 100644
--- a/data/web/inc/lib/vendor/symfony/translation/DependencyInjection/TranslatorPass.php
+++ b/data/web/inc/lib/vendor/symfony/translation/DependencyInjection/TranslatorPass.php
@@ -26,6 +26,10 @@ class TranslatorPass implements CompilerPassInterface
public function __construct(string $translatorServiceId = 'translator.default', string $readerServiceId = 'translation.reader', string $loaderTag = 'translation.loader', string $debugCommandServiceId = 'console.command.translation_debug', string $updateCommandServiceId = 'console.command.translation_update')
{
+ if (0 < \func_num_args()) {
+ trigger_deprecation('symfony/translation', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
+ }
+
$this->translatorServiceId = $translatorServiceId;
$this->readerServiceId = $readerServiceId;
$this->loaderTag = $loaderTag;
diff --git a/data/web/inc/lib/vendor/symfony/translation/DependencyInjection/TranslatorPathsPass.php b/data/web/inc/lib/vendor/symfony/translation/DependencyInjection/TranslatorPathsPass.php
index 80071eee..18c02488 100644
--- a/data/web/inc/lib/vendor/symfony/translation/DependencyInjection/TranslatorPathsPass.php
+++ b/data/web/inc/lib/vendor/symfony/translation/DependencyInjection/TranslatorPathsPass.php
@@ -33,6 +33,10 @@ class TranslatorPathsPass extends AbstractRecursivePass
public function __construct(string $translatorServiceId = 'translator', string $debugCommandServiceId = 'console.command.translation_debug', string $updateCommandServiceId = 'console.command.translation_update', string $resolverServiceId = 'argument_resolver.service')
{
+ if (0 < \func_num_args()) {
+ trigger_deprecation('symfony/translation', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
+ }
+
$this->translatorServiceId = $translatorServiceId;
$this->debugCommandServiceId = $debugCommandServiceId;
$this->updateCommandServiceId = $updateCommandServiceId;
diff --git a/data/web/inc/lib/vendor/symfony/translation/Exception/IncompleteDsnException.php b/data/web/inc/lib/vendor/symfony/translation/Exception/IncompleteDsnException.php
new file mode 100644
index 00000000..192de3c6
--- /dev/null
+++ b/data/web/inc/lib/vendor/symfony/translation/Exception/IncompleteDsnException.php
@@ -0,0 +1,24 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Translation\Exception;
+
+class IncompleteDsnException extends InvalidArgumentException
+{
+ public function __construct(string $message, string $dsn = null, ?\Throwable $previous = null)
+ {
+ if ($dsn) {
+ $message = sprintf('Invalid "%s" provider DSN: ', $dsn).$message;
+ }
+
+ parent::__construct($message, 0, $previous);
+ }
+}
diff --git a/data/web/inc/lib/vendor/symfony/translation/Exception/MissingRequiredOptionException.php b/data/web/inc/lib/vendor/symfony/translation/Exception/MissingRequiredOptionException.php
new file mode 100644
index 00000000..e17283dc
--- /dev/null
+++ b/data/web/inc/lib/vendor/symfony/translation/Exception/MissingRequiredOptionException.php
@@ -0,0 +1,25 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Translation\Exception;
+
+/**
+ * @author Oskar Stark
+ */
+class MissingRequiredOptionException extends IncompleteDsnException
+{
+ public function __construct(string $option, string $dsn = null, ?\Throwable $previous = null)
+ {
+ $message = sprintf('The option "%s" is required but missing.', $option);
+
+ parent::__construct($message, $dsn, $previous);
+ }
+}
diff --git a/data/web/inc/lib/vendor/symfony/translation/Exception/ProviderException.php b/data/web/inc/lib/vendor/symfony/translation/Exception/ProviderException.php
new file mode 100644
index 00000000..659c6d77
--- /dev/null
+++ b/data/web/inc/lib/vendor/symfony/translation/Exception/ProviderException.php
@@ -0,0 +1,43 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Translation\Exception;
+
+use Symfony\Contracts\HttpClient\ResponseInterface;
+
+/**
+ * @author Fabien Potencier
+ *
+ * @experimental in 5.3
+ */
+class ProviderException extends RuntimeException implements ProviderExceptionInterface
+{
+ private $response;
+ private $debug;
+
+ public function __construct(string $message, ResponseInterface $response, int $code = 0, \Exception $previous = null)
+ {
+ $this->response = $response;
+ $this->debug .= $response->getInfo('debug') ?? '';
+
+ parent::__construct($message, $code, $previous);
+ }
+
+ public function getResponse(): ResponseInterface
+ {
+ return $this->response;
+ }
+
+ public function getDebug(): string
+ {
+ return $this->debug;
+ }
+}
diff --git a/data/web/inc/lib/vendor/symfony/translation/Exception/ProviderExceptionInterface.php b/data/web/inc/lib/vendor/symfony/translation/Exception/ProviderExceptionInterface.php
new file mode 100644
index 00000000..8cf1c51c
--- /dev/null
+++ b/data/web/inc/lib/vendor/symfony/translation/Exception/ProviderExceptionInterface.php
@@ -0,0 +1,25 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Translation\Exception;
+
+/**
+ * @author Fabien Potencier
+ *
+ * @experimental in 5.3
+ */
+interface ProviderExceptionInterface extends ExceptionInterface
+{
+ /*
+ * Returns debug info coming from the Symfony\Contracts\HttpClient\ResponseInterface
+ */
+ public function getDebug(): string;
+}
diff --git a/data/web/inc/lib/vendor/symfony/translation/Exception/UnsupportedSchemeException.php b/data/web/inc/lib/vendor/symfony/translation/Exception/UnsupportedSchemeException.php
new file mode 100644
index 00000000..7fbaa8f0
--- /dev/null
+++ b/data/web/inc/lib/vendor/symfony/translation/Exception/UnsupportedSchemeException.php
@@ -0,0 +1,54 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Translation\Exception;
+
+use Symfony\Component\Translation\Bridge;
+use Symfony\Component\Translation\Provider\Dsn;
+
+class UnsupportedSchemeException extends LogicException
+{
+ private const SCHEME_TO_PACKAGE_MAP = [
+ 'crowdin' => [
+ 'class' => Bridge\Crowdin\CrowdinProviderFactory::class,
+ 'package' => 'symfony/crowdin-translation-provider',
+ ],
+ 'loco' => [
+ 'class' => Bridge\Loco\LocoProviderFactory::class,
+ 'package' => 'symfony/loco-translation-provider',
+ ],
+ 'lokalise' => [
+ 'class' => Bridge\Lokalise\LokaliseProviderFactory::class,
+ 'package' => 'symfony/lokalise-translation-provider',
+ ],
+ ];
+
+ public function __construct(Dsn $dsn, string $name = null, array $supported = [])
+ {
+ $provider = $dsn->getScheme();
+ if (false !== $pos = strpos($provider, '+')) {
+ $provider = substr($provider, 0, $pos);
+ }
+ $package = self::SCHEME_TO_PACKAGE_MAP[$provider] ?? null;
+ if ($package && !class_exists($package['class'])) {
+ parent::__construct(sprintf('Unable to synchronize translations via "%s" as the provider is not installed; try running "composer require %s".', $provider, $package['package']));
+
+ return;
+ }
+
+ $message = sprintf('The "%s" scheme is not supported', $dsn->getScheme());
+ if ($name && $supported) {
+ $message .= sprintf('; supported schemes for translation provider "%s" are: "%s"', $name, implode('", "', $supported));
+ }
+
+ parent::__construct($message.'.');
+ }
+}
diff --git a/data/web/inc/lib/vendor/symfony/translation/Extractor/ExtractorInterface.php b/data/web/inc/lib/vendor/symfony/translation/Extractor/ExtractorInterface.php
index 39cc006c..718858ee 100644
--- a/data/web/inc/lib/vendor/symfony/translation/Extractor/ExtractorInterface.php
+++ b/data/web/inc/lib/vendor/symfony/translation/Extractor/ExtractorInterface.php
@@ -24,7 +24,7 @@ interface ExtractorInterface
/**
* Extracts translation messages from files, a file or a directory to the catalogue.
*
- * @param string|array $resource Files, a file or a directory
+ * @param string|string[] $resource Files, a file or a directory
*/
public function extract($resource, MessageCatalogue $catalogue);
diff --git a/data/web/inc/lib/vendor/symfony/translation/Loader/XliffFileLoader.php b/data/web/inc/lib/vendor/symfony/translation/Loader/XliffFileLoader.php
index 73e35cd5..7c0ac8ae 100644
--- a/data/web/inc/lib/vendor/symfony/translation/Loader/XliffFileLoader.php
+++ b/data/web/inc/lib/vendor/symfony/translation/Loader/XliffFileLoader.php
@@ -12,6 +12,8 @@
namespace Symfony\Component\Translation\Loader;
use Symfony\Component\Config\Resource\FileResource;
+use Symfony\Component\Config\Util\Exception\InvalidXmlException;
+use Symfony\Component\Config\Util\Exception\XmlParsingException;
use Symfony\Component\Config\Util\XmlUtils;
use Symfony\Component\Translation\Exception\InvalidResourceException;
use Symfony\Component\Translation\Exception\NotFoundResourceException;
@@ -35,36 +37,47 @@ class XliffFileLoader implements LoaderInterface
throw new RuntimeException('Loading translations from the Xliff format requires the Symfony Config component.');
}
- if (!stream_is_local($resource)) {
- throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource));
+ if (!$this->isXmlString($resource)) {
+ if (!stream_is_local($resource)) {
+ throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource));
+ }
+
+ if (!file_exists($resource)) {
+ throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource));
+ }
+
+ if (!is_file($resource)) {
+ throw new InvalidResourceException(sprintf('This is neither a file nor an XLIFF string "%s".', $resource));
+ }
}
- if (!file_exists($resource)) {
- throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource));
+ try {
+ if ($this->isXmlString($resource)) {
+ $dom = XmlUtils::parse($resource);
+ } else {
+ $dom = XmlUtils::loadFile($resource);
+ }
+ } catch (\InvalidArgumentException | XmlParsingException | InvalidXmlException $e) {
+ throw new InvalidResourceException(sprintf('Unable to load "%s": ', $resource).$e->getMessage(), $e->getCode(), $e);
+ }
+
+ if ($errors = XliffUtils::validateSchema($dom)) {
+ throw new InvalidResourceException(sprintf('Invalid resource provided: "%s"; Errors: ', $resource).XliffUtils::getErrorsAsString($errors));
}
$catalogue = new MessageCatalogue($locale);
- $this->extract($resource, $catalogue, $domain);
+ $this->extract($dom, $catalogue, $domain);
- if (class_exists(FileResource::class)) {
+ if (is_file($resource) && class_exists(FileResource::class)) {
$catalogue->addResource(new FileResource($resource));
}
return $catalogue;
}
- private function extract($resource, MessageCatalogue $catalogue, string $domain)
+ private function extract($dom, MessageCatalogue $catalogue, string $domain)
{
- try {
- $dom = XmlUtils::loadFile($resource);
- } catch (\InvalidArgumentException $e) {
- throw new InvalidResourceException(sprintf('Unable to load "%s": ', $resource).$e->getMessage(), $e->getCode(), $e);
- }
-
$xliffVersion = XliffUtils::getVersionNumber($dom);
- if ($errors = XliffUtils::validateSchema($dom)) {
- throw new InvalidResourceException(sprintf('Invalid resource provided: "%s"; Errors: ', $resource).XliffUtils::getErrorsAsString($errors));
- }
if ('1.2' === $xliffVersion) {
$this->extractXliff1($dom, $catalogue, $domain);
@@ -81,7 +94,7 @@ class XliffFileLoader implements LoaderInterface
private function extractXliff1(\DOMDocument $dom, MessageCatalogue $catalogue, string $domain)
{
$xml = simplexml_import_dom($dom);
- $encoding = strtoupper($dom->encoding);
+ $encoding = $dom->encoding ? strtoupper($dom->encoding) : null;
$namespace = 'urn:oasis:names:tc:xliff:document:1.2';
$xml->registerXPathNamespace('xliff', $namespace);
@@ -211,4 +224,9 @@ class XliffFileLoader implements LoaderInterface
return $notes;
}
+
+ private function isXmlString(string $resource): bool
+ {
+ return 0 === strpos($resource, 'translator->getCatalogue($locale);
}
+ /**
+ * {@inheritdoc}
+ */
+ public function getCatalogues(): array
+ {
+ return $this->translator->getCatalogues();
+ }
+
/**
* Gets the fallback locales.
*
diff --git a/data/web/inc/lib/vendor/symfony/translation/Provider/AbstractProviderFactory.php b/data/web/inc/lib/vendor/symfony/translation/Provider/AbstractProviderFactory.php
new file mode 100644
index 00000000..17442fde
--- /dev/null
+++ b/data/web/inc/lib/vendor/symfony/translation/Provider/AbstractProviderFactory.php
@@ -0,0 +1,45 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Translation\Provider;
+
+use Symfony\Component\Translation\Exception\IncompleteDsnException;
+
+abstract class AbstractProviderFactory implements ProviderFactoryInterface
+{
+ public function supports(Dsn $dsn): bool
+ {
+ return \in_array($dsn->getScheme(), $this->getSupportedSchemes(), true);
+ }
+
+ /**
+ * @return string[]
+ */
+ abstract protected function getSupportedSchemes(): array;
+
+ protected function getUser(Dsn $dsn): string
+ {
+ if (null === $user = $dsn->getUser()) {
+ throw new IncompleteDsnException('User is not set.', $dsn->getOriginalDsn());
+ }
+
+ return $user;
+ }
+
+ protected function getPassword(Dsn $dsn): string
+ {
+ if (null === $password = $dsn->getPassword()) {
+ throw new IncompleteDsnException('Password is not set.', $dsn->getOriginalDsn());
+ }
+
+ return $password;
+ }
+}
diff --git a/data/web/inc/lib/vendor/symfony/translation/Provider/Dsn.php b/data/web/inc/lib/vendor/symfony/translation/Provider/Dsn.php
new file mode 100644
index 00000000..820cabfb
--- /dev/null
+++ b/data/web/inc/lib/vendor/symfony/translation/Provider/Dsn.php
@@ -0,0 +1,110 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Translation\Provider;
+
+use Symfony\Component\Translation\Exception\InvalidArgumentException;
+use Symfony\Component\Translation\Exception\MissingRequiredOptionException;
+
+/**
+ * @author Fabien Potencier
+ * @author Oskar Stark
+ */
+final class Dsn
+{
+ private $scheme;
+ private $host;
+ private $user;
+ private $password;
+ private $port;
+ private $path;
+ private $options;
+ private $originalDsn;
+
+ public function __construct(string $dsn)
+ {
+ $this->originalDsn = $dsn;
+
+ if (false === $parsedDsn = parse_url($dsn)) {
+ throw new InvalidArgumentException(sprintf('The "%s" translation provider DSN is invalid.', $dsn));
+ }
+
+ if (!isset($parsedDsn['scheme'])) {
+ throw new InvalidArgumentException(sprintf('The "%s" translation provider DSN must contain a scheme.', $dsn));
+ }
+ $this->scheme = $parsedDsn['scheme'];
+
+ if (!isset($parsedDsn['host'])) {
+ throw new InvalidArgumentException(sprintf('The "%s" translation provider DSN must contain a host (use "default" by default).', $dsn));
+ }
+ $this->host = $parsedDsn['host'];
+
+ $this->user = '' !== ($parsedDsn['user'] ?? '') ? urldecode($parsedDsn['user']) : null;
+ $this->password = '' !== ($parsedDsn['pass'] ?? '') ? urldecode($parsedDsn['pass']) : null;
+ $this->port = $parsedDsn['port'] ?? null;
+ $this->path = $parsedDsn['path'] ?? null;
+ parse_str($parsedDsn['query'] ?? '', $this->options);
+ }
+
+ public function getScheme(): string
+ {
+ return $this->scheme;
+ }
+
+ public function getHost(): string
+ {
+ return $this->host;
+ }
+
+ public function getUser(): ?string
+ {
+ return $this->user;
+ }
+
+ public function getPassword(): ?string
+ {
+ return $this->password;
+ }
+
+ public function getPort(int $default = null): ?int
+ {
+ return $this->port ?? $default;
+ }
+
+ public function getOption(string $key, $default = null)
+ {
+ return $this->options[$key] ?? $default;
+ }
+
+ public function getRequiredOption(string $key)
+ {
+ if (!\array_key_exists($key, $this->options) || '' === trim($this->options[$key])) {
+ throw new MissingRequiredOptionException($key);
+ }
+
+ return $this->options[$key];
+ }
+
+ public function getOptions(): array
+ {
+ return $this->options;
+ }
+
+ public function getPath(): ?string
+ {
+ return $this->path;
+ }
+
+ public function getOriginalDsn(): string
+ {
+ return $this->originalDsn;
+ }
+}
diff --git a/data/web/inc/lib/vendor/symfony/translation/Provider/FilteringProvider.php b/data/web/inc/lib/vendor/symfony/translation/Provider/FilteringProvider.php
new file mode 100644
index 00000000..0307cdac
--- /dev/null
+++ b/data/web/inc/lib/vendor/symfony/translation/Provider/FilteringProvider.php
@@ -0,0 +1,67 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Translation\Provider;
+
+use Symfony\Component\Translation\TranslatorBag;
+use Symfony\Component\Translation\TranslatorBagInterface;
+
+/**
+ * Filters domains and locales between the Translator config values and those specific to each provider.
+ *
+ * @author Mathieu Santostefano
+ *
+ * @experimental in 5.3
+ */
+class FilteringProvider implements ProviderInterface
+{
+ private $provider;
+ private $locales;
+ private $domains;
+
+ public function __construct(ProviderInterface $provider, array $locales, array $domains = [])
+ {
+ $this->provider = $provider;
+ $this->locales = $locales;
+ $this->domains = $domains;
+ }
+
+ public function __toString(): string
+ {
+ return (string) $this->provider;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function write(TranslatorBagInterface $translatorBag): void
+ {
+ $this->provider->write($translatorBag);
+ }
+
+ public function read(array $domains, array $locales): TranslatorBag
+ {
+ $domains = !$this->domains ? $domains : array_intersect($this->domains, $domains);
+ $locales = array_intersect($this->locales, $locales);
+
+ return $this->provider->read($domains, $locales);
+ }
+
+ public function delete(TranslatorBagInterface $translatorBag): void
+ {
+ $this->provider->delete($translatorBag);
+ }
+
+ public function getDomains(): array
+ {
+ return $this->domains;
+ }
+}
diff --git a/data/web/inc/lib/vendor/symfony/translation/Provider/NullProvider.php b/data/web/inc/lib/vendor/symfony/translation/Provider/NullProvider.php
new file mode 100644
index 00000000..785fcaa6
--- /dev/null
+++ b/data/web/inc/lib/vendor/symfony/translation/Provider/NullProvider.php
@@ -0,0 +1,41 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Translation\Provider;
+
+use Symfony\Component\Translation\TranslatorBag;
+use Symfony\Component\Translation\TranslatorBagInterface;
+
+/**
+ * @author Mathieu Santostefano
+ *
+ * @experimental in 5.3
+ */
+class NullProvider implements ProviderInterface
+{
+ public function __toString(): string
+ {
+ return 'null';
+ }
+
+ public function write(TranslatorBagInterface $translatorBag, bool $override = false): void
+ {
+ }
+
+ public function read(array $domains, array $locales): TranslatorBag
+ {
+ return new TranslatorBag();
+ }
+
+ public function delete(TranslatorBagInterface $translatorBag): void
+ {
+ }
+}
diff --git a/data/web/inc/lib/vendor/symfony/translation/Provider/NullProviderFactory.php b/data/web/inc/lib/vendor/symfony/translation/Provider/NullProviderFactory.php
new file mode 100644
index 00000000..6ddbd857
--- /dev/null
+++ b/data/web/inc/lib/vendor/symfony/translation/Provider/NullProviderFactory.php
@@ -0,0 +1,36 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Translation\Provider;
+
+use Symfony\Component\Translation\Exception\UnsupportedSchemeException;
+
+/**
+ * @author Mathieu Santostefano
+ *
+ * @experimental in 5.3
+ */
+final class NullProviderFactory extends AbstractProviderFactory
+{
+ public function create(Dsn $dsn): ProviderInterface
+ {
+ if ('null' === $dsn->getScheme()) {
+ return new NullProvider();
+ }
+
+ throw new UnsupportedSchemeException($dsn, 'null', $this->getSupportedSchemes());
+ }
+
+ protected function getSupportedSchemes(): array
+ {
+ return ['null'];
+ }
+}
diff --git a/data/web/inc/lib/vendor/symfony/translation/Provider/ProviderFactoryInterface.php b/data/web/inc/lib/vendor/symfony/translation/Provider/ProviderFactoryInterface.php
new file mode 100644
index 00000000..3fd4494b
--- /dev/null
+++ b/data/web/inc/lib/vendor/symfony/translation/Provider/ProviderFactoryInterface.php
@@ -0,0 +1,26 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Translation\Provider;
+
+use Symfony\Component\Translation\Exception\IncompleteDsnException;
+use Symfony\Component\Translation\Exception\UnsupportedSchemeException;
+
+interface ProviderFactoryInterface
+{
+ /**
+ * @throws UnsupportedSchemeException
+ * @throws IncompleteDsnException
+ */
+ public function create(Dsn $dsn): ProviderInterface;
+
+ public function supports(Dsn $dsn): bool;
+}
diff --git a/data/web/inc/lib/vendor/symfony/translation/Provider/ProviderInterface.php b/data/web/inc/lib/vendor/symfony/translation/Provider/ProviderInterface.php
new file mode 100644
index 00000000..a32193f2
--- /dev/null
+++ b/data/web/inc/lib/vendor/symfony/translation/Provider/ProviderInterface.php
@@ -0,0 +1,32 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Translation\Provider;
+
+use Symfony\Component\Translation\TranslatorBag;
+use Symfony\Component\Translation\TranslatorBagInterface;
+
+interface ProviderInterface
+{
+ public function __toString(): string;
+
+ /**
+ * Translations available in the TranslatorBag only must be created.
+ * Translations available in both the TranslatorBag and on the provider
+ * must be overwritten.
+ * Translations available on the provider only must be kept.
+ */
+ public function write(TranslatorBagInterface $translatorBag): void;
+
+ public function read(array $domains, array $locales): TranslatorBag;
+
+ public function delete(TranslatorBagInterface $translatorBag): void;
+}
diff --git a/data/web/inc/lib/vendor/symfony/translation/Provider/TranslationProviderCollection.php b/data/web/inc/lib/vendor/symfony/translation/Provider/TranslationProviderCollection.php
new file mode 100644
index 00000000..9963cb9f
--- /dev/null
+++ b/data/web/inc/lib/vendor/symfony/translation/Provider/TranslationProviderCollection.php
@@ -0,0 +1,59 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Translation\Provider;
+
+use Symfony\Component\Translation\Exception\InvalidArgumentException;
+
+/**
+ * @author Mathieu Santostefano
+ *
+ * @experimental in 5.3
+ */
+final class TranslationProviderCollection
+{
+ private $providers;
+
+ /**
+ * @param array $providers
+ */
+ public function __construct(iterable $providers)
+ {
+ $this->providers = [];
+ foreach ($providers as $name => $provider) {
+ $this->providers[$name] = $provider;
+ }
+ }
+
+ public function __toString(): string
+ {
+ return '['.implode(',', array_keys($this->providers)).']';
+ }
+
+ public function has(string $name): bool
+ {
+ return isset($this->providers[$name]);
+ }
+
+ public function get(string $name): ProviderInterface
+ {
+ if (!$this->has($name)) {
+ throw new InvalidArgumentException(sprintf('Provider "%s" not found. Available: "%s".', $name, (string) $this));
+ }
+
+ return $this->providers[$name];
+ }
+
+ public function keys(): array
+ {
+ return array_keys($this->providers);
+ }
+}
diff --git a/data/web/inc/lib/vendor/symfony/translation/Provider/TranslationProviderCollectionFactory.php b/data/web/inc/lib/vendor/symfony/translation/Provider/TranslationProviderCollectionFactory.php
new file mode 100644
index 00000000..43f4a344
--- /dev/null
+++ b/data/web/inc/lib/vendor/symfony/translation/Provider/TranslationProviderCollectionFactory.php
@@ -0,0 +1,59 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Translation\Provider;
+
+use Symfony\Component\Translation\Exception\UnsupportedSchemeException;
+
+/**
+ * @author Mathieu Santostefano
+ *
+ * @experimental in 5.3
+ */
+class TranslationProviderCollectionFactory
+{
+ private $factories;
+ private $enabledLocales;
+
+ /**
+ * @param ProviderFactoryInterface[] $factories
+ */
+ public function __construct(iterable $factories, array $enabledLocales)
+ {
+ $this->factories = $factories;
+ $this->enabledLocales = $enabledLocales;
+ }
+
+ public function fromConfig(array $config): TranslationProviderCollection
+ {
+ $providers = [];
+ foreach ($config as $name => $currentConfig) {
+ $providers[$name] = $this->fromDsnObject(
+ new Dsn($currentConfig['dsn']),
+ !$currentConfig['locales'] ? $this->enabledLocales : $currentConfig['locales'],
+ !$currentConfig['domains'] ? [] : $currentConfig['domains']
+ );
+ }
+
+ return new TranslationProviderCollection($providers);
+ }
+
+ public function fromDsnObject(Dsn $dsn, array $locales, array $domains = []): ProviderInterface
+ {
+ foreach ($this->factories as $factory) {
+ if ($factory->supports($dsn)) {
+ return new FilteringProvider($factory->create($dsn), $locales, $domains);
+ }
+ }
+
+ throw new UnsupportedSchemeException($dsn);
+ }
+}
diff --git a/data/web/inc/lib/vendor/symfony/translation/PseudoLocalizationTranslator.php b/data/web/inc/lib/vendor/symfony/translation/PseudoLocalizationTranslator.php
index 01f8314f..49f122eb 100644
--- a/data/web/inc/lib/vendor/symfony/translation/PseudoLocalizationTranslator.php
+++ b/data/web/inc/lib/vendor/symfony/translation/PseudoLocalizationTranslator.php
@@ -108,6 +108,11 @@ final class PseudoLocalizationTranslator implements TranslatorInterface
return $trans;
}
+ public function getLocale(): string
+ {
+ return $this->translator->getLocale();
+ }
+
private function getParts(string $originalTrans): array
{
if (!$this->parseHTML) {
diff --git a/data/web/inc/lib/vendor/symfony/translation/README.md b/data/web/inc/lib/vendor/symfony/translation/README.md
index dc090df5..720bee3b 100644
--- a/data/web/inc/lib/vendor/symfony/translation/README.md
+++ b/data/web/inc/lib/vendor/symfony/translation/README.md
@@ -26,8 +26,8 @@ echo $translator->trans('Hello World!'); // outputs « Bonjour ! »
Resources
---------
- * [Documentation](https://symfony.com/doc/current/translation.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/translation.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/data/web/inc/lib/vendor/symfony/translation/Resources/data/parents.json b/data/web/inc/lib/vendor/symfony/translation/Resources/data/parents.json
index d334b298..a67458a1 100644
--- a/data/web/inc/lib/vendor/symfony/translation/Resources/data/parents.json
+++ b/data/web/inc/lib/vendor/symfony/translation/Resources/data/parents.json
@@ -118,6 +118,8 @@
"es_UY": "es_419",
"es_VE": "es_419",
"ff_Adlm": "root",
+ "nb": "no",
+ "nn": "no",
"pa_Arab": "root",
"pt_AO": "pt_PT",
"pt_CH": "pt_PT",
diff --git a/data/web/inc/lib/vendor/symfony/translation/Test/ProviderFactoryTestCase.php b/data/web/inc/lib/vendor/symfony/translation/Test/ProviderFactoryTestCase.php
new file mode 100644
index 00000000..6d5f4b7b
--- /dev/null
+++ b/data/web/inc/lib/vendor/symfony/translation/Test/ProviderFactoryTestCase.php
@@ -0,0 +1,147 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Translation\Test;
+
+use PHPUnit\Framework\TestCase;
+use Psr\Log\LoggerInterface;
+use Symfony\Component\HttpClient\MockHttpClient;
+use Symfony\Component\Translation\Dumper\XliffFileDumper;
+use Symfony\Component\Translation\Exception\IncompleteDsnException;
+use Symfony\Component\Translation\Exception\UnsupportedSchemeException;
+use Symfony\Component\Translation\Loader\LoaderInterface;
+use Symfony\Component\Translation\Provider\Dsn;
+use Symfony\Component\Translation\Provider\ProviderFactoryInterface;
+use Symfony\Contracts\HttpClient\HttpClientInterface;
+
+/**
+ * A test case to ease testing a translation provider factory.
+ *
+ * @author Mathieu Santostefano
+ *
+ * @internal
+ */
+abstract class ProviderFactoryTestCase extends TestCase
+{
+ protected $client;
+ protected $logger;
+ protected $defaultLocale;
+ protected $loader;
+ protected $xliffFileDumper;
+
+ abstract public function createFactory(): ProviderFactoryInterface;
+
+ /**
+ * @return iterable
+ */
+ abstract public function supportsProvider(): iterable;
+
+ /**
+ * @return iterable
+ */
+ abstract public function createProvider(): iterable;
+
+ /**
+ * @return iterable
+ */
+ public function unsupportedSchemeProvider(): iterable
+ {
+ return [];
+ }
+
+ /**
+ * @return iterable
+ */
+ public function incompleteDsnProvider(): iterable
+ {
+ return [];
+ }
+
+ /**
+ * @dataProvider supportsProvider
+ */
+ public function testSupports(bool $expected, string $dsn)
+ {
+ $factory = $this->createFactory();
+
+ $this->assertSame($expected, $factory->supports(new Dsn($dsn)));
+ }
+
+ /**
+ * @dataProvider createProvider
+ */
+ public function testCreate(string $expected, string $dsn)
+ {
+ $factory = $this->createFactory();
+ $provider = $factory->create(new Dsn($dsn));
+
+ $this->assertSame($expected, (string) $provider);
+ }
+
+ /**
+ * @dataProvider unsupportedSchemeProvider
+ */
+ public function testUnsupportedSchemeException(string $dsn, string $message = null)
+ {
+ $factory = $this->createFactory();
+
+ $dsn = new Dsn($dsn);
+
+ $this->expectException(UnsupportedSchemeException::class);
+ if (null !== $message) {
+ $this->expectExceptionMessage($message);
+ }
+
+ $factory->create($dsn);
+ }
+
+ /**
+ * @dataProvider incompleteDsnProvider
+ */
+ public function testIncompleteDsnException(string $dsn, string $message = null)
+ {
+ $factory = $this->createFactory();
+
+ $dsn = new Dsn($dsn);
+
+ $this->expectException(IncompleteDsnException::class);
+ if (null !== $message) {
+ $this->expectExceptionMessage($message);
+ }
+
+ $factory->create($dsn);
+ }
+
+ protected function getClient(): HttpClientInterface
+ {
+ return $this->client ?? $this->client = new MockHttpClient();
+ }
+
+ protected function getLogger(): LoggerInterface
+ {
+ return $this->logger ?? $this->logger = $this->createMock(LoggerInterface::class);
+ }
+
+ protected function getDefaultLocale(): string
+ {
+ return $this->defaultLocale ?? $this->defaultLocale = 'en';
+ }
+
+ protected function getLoader(): LoaderInterface
+ {
+ return $this->loader ?? $this->loader = $this->createMock(LoaderInterface::class);
+ }
+
+ protected function getXliffFileDumper(): XliffFileDumper
+ {
+ return $this->xliffFileDumper ?? $this->xliffFileDumper = $this->createMock(XliffFileDumper::class);
+ }
+}
diff --git a/data/web/inc/lib/vendor/symfony/translation/Test/ProviderTestCase.php b/data/web/inc/lib/vendor/symfony/translation/Test/ProviderTestCase.php
new file mode 100644
index 00000000..238fd967
--- /dev/null
+++ b/data/web/inc/lib/vendor/symfony/translation/Test/ProviderTestCase.php
@@ -0,0 +1,86 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Translation\Test;
+
+use PHPUnit\Framework\MockObject\MockObject;
+use PHPUnit\Framework\TestCase;
+use Psr\Log\LoggerInterface;
+use Symfony\Component\HttpClient\MockHttpClient;
+use Symfony\Component\Translation\Dumper\XliffFileDumper;
+use Symfony\Component\Translation\Loader\LoaderInterface;
+use Symfony\Component\Translation\Provider\ProviderInterface;
+use Symfony\Contracts\HttpClient\HttpClientInterface;
+
+/**
+ * A test case to ease testing a translation provider.
+ *
+ * @author Mathieu Santostefano
+ *
+ * @internal
+ */
+abstract class ProviderTestCase extends TestCase
+{
+ protected $client;
+ protected $logger;
+ protected $defaultLocale;
+ protected $loader;
+ protected $xliffFileDumper;
+
+ abstract public function createProvider(HttpClientInterface $client, LoaderInterface $loader, LoggerInterface $logger, string $defaultLocale, string $endpoint): ProviderInterface;
+
+ /**
+ * @return iterable
+ */
+ abstract public function toStringProvider(): iterable;
+
+ /**
+ * @dataProvider toStringProvider
+ */
+ public function testToString(ProviderInterface $provider, string $expected)
+ {
+ $this->assertSame($expected, (string) $provider);
+ }
+
+ protected function getClient(): MockHttpClient
+ {
+ return $this->client ?? $this->client = new MockHttpClient();
+ }
+
+ /**
+ * @return LoaderInterface&MockObject
+ */
+ protected function getLoader(): LoaderInterface
+ {
+ return $this->loader ?? $this->loader = $this->createMock(LoaderInterface::class);
+ }
+
+ /**
+ * @return LoaderInterface&MockObject
+ */
+ protected function getLogger(): LoggerInterface
+ {
+ return $this->logger ?? $this->logger = $this->createMock(LoggerInterface::class);
+ }
+
+ protected function getDefaultLocale(): string
+ {
+ return $this->defaultLocale ?? $this->defaultLocale = 'en';
+ }
+
+ /**
+ * @return LoaderInterface&MockObject
+ */
+ protected function getXliffFileDumper(): XliffFileDumper
+ {
+ return $this->xliffFileDumper ?? $this->xliffFileDumper = $this->createMock(XliffFileDumper::class);
+ }
+}
diff --git a/data/web/inc/lib/vendor/symfony/translation/Translator.php b/data/web/inc/lib/vendor/symfony/translation/Translator.php
index 6b11cca6..b4954dae 100644
--- a/data/web/inc/lib/vendor/symfony/translation/Translator.php
+++ b/data/web/inc/lib/vendor/symfony/translation/Translator.php
@@ -243,6 +243,14 @@ class Translator implements TranslatorInterface, TranslatorBagInterface, LocaleA
return $this->catalogues[$locale];
}
+ /**
+ * {@inheritdoc}
+ */
+ public function getCatalogues(): array
+ {
+ return array_values($this->catalogues);
+ }
+
/**
* Gets the loaders.
*
diff --git a/data/web/inc/lib/vendor/symfony/translation/TranslatorBag.php b/data/web/inc/lib/vendor/symfony/translation/TranslatorBag.php
new file mode 100644
index 00000000..c6555782
--- /dev/null
+++ b/data/web/inc/lib/vendor/symfony/translation/TranslatorBag.php
@@ -0,0 +1,105 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Translation;
+
+use Symfony\Component\Translation\Catalogue\AbstractOperation;
+use Symfony\Component\Translation\Catalogue\TargetOperation;
+
+final class TranslatorBag implements TranslatorBagInterface
+{
+ /** @var MessageCatalogue[] */
+ private $catalogues = [];
+
+ public function addCatalogue(MessageCatalogue $catalogue): void
+ {
+ if (null !== $existingCatalogue = $this->getCatalogue($catalogue->getLocale())) {
+ $catalogue->addCatalogue($existingCatalogue);
+ }
+
+ $this->catalogues[$catalogue->getLocale()] = $catalogue;
+ }
+
+ public function addBag(TranslatorBagInterface $bag): void
+ {
+ foreach ($bag->getCatalogues() as $catalogue) {
+ $this->addCatalogue($catalogue);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getCatalogue(string $locale = null)
+ {
+ if (null === $locale || !isset($this->catalogues[$locale])) {
+ $this->catalogues[$locale] = new MessageCatalogue($locale);
+ }
+
+ return $this->catalogues[$locale];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getCatalogues(): array
+ {
+ return array_values($this->catalogues);
+ }
+
+ public function diff(TranslatorBagInterface $diffBag): self
+ {
+ $diff = new self();
+
+ foreach ($this->catalogues as $locale => $catalogue) {
+ if (null === $diffCatalogue = $diffBag->getCatalogue($locale)) {
+ $diff->addCatalogue($catalogue);
+
+ continue;
+ }
+
+ $operation = new TargetOperation($diffCatalogue, $catalogue);
+ $operation->moveMessagesToIntlDomainsIfPossible(AbstractOperation::NEW_BATCH);
+ $newCatalogue = new MessageCatalogue($locale);
+
+ foreach ($operation->getDomains() as $domain) {
+ $newCatalogue->add($operation->getNewMessages($domain), $domain);
+ }
+
+ $diff->addCatalogue($newCatalogue);
+ }
+
+ return $diff;
+ }
+
+ public function intersect(TranslatorBagInterface $intersectBag): self
+ {
+ $diff = new self();
+
+ foreach ($this->catalogues as $locale => $catalogue) {
+ if (null === $intersectCatalogue = $intersectBag->getCatalogue($locale)) {
+ continue;
+ }
+
+ $operation = new TargetOperation($catalogue, $intersectCatalogue);
+ $operation->moveMessagesToIntlDomainsIfPossible(AbstractOperation::OBSOLETE_BATCH);
+ $obsoleteCatalogue = new MessageCatalogue($locale);
+
+ foreach ($operation->getDomains() as $domain) {
+ $obsoleteCatalogue->add($operation->getObsoleteMessages($domain), $domain);
+ }
+
+ $diff->addCatalogue($obsoleteCatalogue);
+ }
+
+ return $diff;
+ }
+}
diff --git a/data/web/inc/lib/vendor/symfony/translation/TranslatorBagInterface.php b/data/web/inc/lib/vendor/symfony/translation/TranslatorBagInterface.php
index e40ca8a2..42289773 100644
--- a/data/web/inc/lib/vendor/symfony/translation/TranslatorBagInterface.php
+++ b/data/web/inc/lib/vendor/symfony/translation/TranslatorBagInterface.php
@@ -16,6 +16,8 @@ use Symfony\Component\Translation\Exception\InvalidArgumentException;
/**
* TranslatorBagInterface.
*
+ * @method MessageCatalogueInterface[] getCatalogues() Returns all catalogues of the instance
+ *
* @author Abdellatif Ait boudad
*/
interface TranslatorBagInterface
diff --git a/data/web/inc/lib/vendor/symfony/translation/composer.json b/data/web/inc/lib/vendor/symfony/translation/composer.json
index 56d81e84..01c05bd7 100644
--- a/data/web/inc/lib/vendor/symfony/translation/composer.json
+++ b/data/web/inc/lib/vendor/symfony/translation/composer.json
@@ -17,6 +17,7 @@
],
"require": {
"php": ">=7.2.5",
+ "symfony/deprecation-contracts": "^2.1",
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php80": "^1.15",
"symfony/translation-contracts": "^2.3"
@@ -27,6 +28,7 @@
"symfony/dependency-injection": "^5.0",
"symfony/http-kernel": "^5.0",
"symfony/intl": "^4.4|^5.0",
+ "symfony/polyfill-intl-icu": "^1.21",
"symfony/service-contracts": "^1.1.2|^2",
"symfony/yaml": "^4.4|^5.0",
"symfony/finder": "^4.4|^5.0",
diff --git a/data/web/inc/lib/vendor/symfony/var-dumper/Command/Descriptor/CliDescriptor.php b/data/web/inc/lib/vendor/symfony/var-dumper/Command/Descriptor/CliDescriptor.php
index dc77d03e..7d9ec0e7 100644
--- a/data/web/inc/lib/vendor/symfony/var-dumper/Command/Descriptor/CliDescriptor.php
+++ b/data/web/inc/lib/vendor/symfony/var-dumper/Command/Descriptor/CliDescriptor.php
@@ -42,7 +42,7 @@ class CliDescriptor implements DumpDescriptorInterface
$io = $output instanceof SymfonyStyle ? $output : new SymfonyStyle(new ArrayInput([]), $output);
$this->dumper->setColors($output->isDecorated());
- $rows = [['date', date('r', $context['timestamp'])]];
+ $rows = [['date', date('r', (int) $context['timestamp'])]];
$lastIdentifier = $this->lastIdentifier;
$this->lastIdentifier = $clientId;
diff --git a/data/web/inc/lib/vendor/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php b/data/web/inc/lib/vendor/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php
index 35a203b0..636b6182 100644
--- a/data/web/inc/lib/vendor/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php
+++ b/data/web/inc/lib/vendor/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php
@@ -94,7 +94,7 @@ HTML
private function extractDate(array $context, string $format = 'r'): string
{
- return date($format, $context['timestamp']);
+ return date($format, (int) $context['timestamp']);
}
private function renderTags(array $tags): string
diff --git a/data/web/inc/lib/vendor/symfony/var-dumper/Command/ServerDumpCommand.php b/data/web/inc/lib/vendor/symfony/var-dumper/Command/ServerDumpCommand.php
index b66301b5..ead9d5bd 100644
--- a/data/web/inc/lib/vendor/symfony/var-dumper/Command/ServerDumpCommand.php
+++ b/data/web/inc/lib/vendor/symfony/var-dumper/Command/ServerDumpCommand.php
@@ -35,6 +35,7 @@ use Symfony\Component\VarDumper\Server\DumpServer;
class ServerDumpCommand extends Command
{
protected static $defaultName = 'server:dump';
+ protected static $defaultDescription = 'Start a dump server that collects and displays dumps in a single place';
private $server;
@@ -58,7 +59,7 @@ class ServerDumpCommand extends Command
$this
->addOption('format', null, InputOption::VALUE_REQUIRED, sprintf('The output format (%s)', $availableFormats), 'cli')
- ->setDescription('Start a dump server that collects and displays dumps in a single place')
+ ->setDescription(self::$defaultDescription)
->setHelp(<<<'EOF'
%command.name% starts a dump server that collects and displays
dumps in a single place for debugging you application:
diff --git a/data/web/inc/lib/vendor/symfony/var-dumper/README.md b/data/web/inc/lib/vendor/symfony/var-dumper/README.md
index 339f73eb..bdac2447 100644
--- a/data/web/inc/lib/vendor/symfony/var-dumper/README.md
+++ b/data/web/inc/lib/vendor/symfony/var-dumper/README.md
@@ -8,8 +8,8 @@ of `var_dump`.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/var_dumper/introduction.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/var_dumper/introduction.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/data/web/inc/lib/vendor/symfony/var-dumper/VarDumper.php b/data/web/inc/lib/vendor/symfony/var-dumper/VarDumper.php
index 470a24fe..b223e065 100644
--- a/data/web/inc/lib/vendor/symfony/var-dumper/VarDumper.php
+++ b/data/web/inc/lib/vendor/symfony/var-dumper/VarDumper.php
@@ -71,7 +71,7 @@ class VarDumper
$dumper = new CliDumper();
break;
case 'server' === $format:
- case 'tcp' === parse_url($format, \PHP_URL_SCHEME):
+ case $format && 'tcp' === parse_url($format, \PHP_URL_SCHEME):
$host = 'server' === $format ? $_SERVER['VAR_DUMPER_SERVER'] ?? '127.0.0.1:9912' : $format;
$dumper = \in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) ? new CliDumper() : new HtmlDumper();
$dumper = new ServerDumper($host, $dumper, self::getDefaultContextProviders());