[Web] Update composer libs, fixes PHPMailer security issue
This commit is contained in:
@@ -2,4 +2,4 @@ CHANGELOG
|
||||
=========
|
||||
|
||||
The changelog is maintained for all Symfony contracts at the following URL:
|
||||
https://github.com/symfony/contracts/blob/master/CHANGELOG.md
|
||||
https://github.com/symfony/contracts/blob/main/CHANGELOG.md
|
||||
|
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2018-2020 Fabien Potencier
|
||||
Copyright (c) 2018-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
|
||||
|
@@ -6,4 +6,4 @@ A set of abstractions extracted out of the Symfony components.
|
||||
Can be used to build on semantics that the Symfony components proved useful - and
|
||||
that already have battle tested implementations.
|
||||
|
||||
See https://github.com/symfony/contracts/blob/master/README.md for more information.
|
||||
See https://github.com/symfony/contracts/blob/main/README.md for more information.
|
||||
|
@@ -59,6 +59,8 @@ class TranslatorTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires extension intl
|
||||
*
|
||||
* @dataProvider getTransChoiceTests
|
||||
*/
|
||||
public function testTransChoiceWithDefaultLocale($expected, $id, $number)
|
||||
@@ -142,11 +144,11 @@ class TranslatorTest extends TestCase
|
||||
/**
|
||||
* @dataProvider getChooseTests
|
||||
*/
|
||||
public function testChoose($expected, $id, $number)
|
||||
public function testChoose($expected, $id, $number, $locale = null)
|
||||
{
|
||||
$translator = $this->getTranslator();
|
||||
|
||||
$this->assertEquals($expected, $translator->trans($id, ['%count%' => $number]));
|
||||
$this->assertEquals($expected, $translator->trans($id, ['%count%' => $number], null, $locale));
|
||||
}
|
||||
|
||||
public function testReturnMessageIfExactlyOneStandardRuleIsGiven()
|
||||
@@ -161,7 +163,7 @@ class TranslatorTest extends TestCase
|
||||
*/
|
||||
public function testThrowExceptionIfMatchingMessageCannotBeFound($id, $number)
|
||||
{
|
||||
$this->expectException('InvalidArgumentException');
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
$translator = $this->getTranslator();
|
||||
|
||||
$translator->trans($id, ['%count%' => $number]);
|
||||
@@ -255,6 +257,18 @@ class TranslatorTest extends TestCase
|
||||
['', '|', 1],
|
||||
// Empty plural set (3 plural forms) from a .PO file
|
||||
['', '||', 1],
|
||||
|
||||
// Floating values
|
||||
['1.5 liters', '%count% liter|%count% liters', 1.5],
|
||||
['1.5 litre', '%count% litre|%count% litres', 1.5, 'fr'],
|
||||
|
||||
// Negative values
|
||||
['-1 degree', '%count% degree|%count% degrees', -1],
|
||||
['-1 degré', '%count% degré|%count% degrés', -1],
|
||||
['-1.5 degrees', '%count% degree|%count% degrees', -1.5],
|
||||
['-1.5 degré', '%count% degré|%count% degrés', -1.5, 'fr'],
|
||||
['-2 degrees', '%count% degree|%count% degrees', -2],
|
||||
['-2 degrés', '%count% degré|%count% degrés', -2],
|
||||
];
|
||||
}
|
||||
|
||||
|
@@ -13,6 +13,8 @@ namespace Symfony\Contracts\Translation;
|
||||
|
||||
/**
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @method string getLocale() Returns the default locale
|
||||
*/
|
||||
interface TranslatorInterface
|
||||
{
|
||||
|
@@ -32,6 +32,8 @@ trait TranslatorTrait
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getLocale()
|
||||
{
|
||||
@@ -136,8 +138,10 @@ EOF;
|
||||
* which is subject to the new BSD license (http://framework.zend.com/license/new-bsd).
|
||||
* Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
*/
|
||||
private function getPluralizationRule(int $number, string $locale): int
|
||||
private function getPluralizationRule(float $number, string $locale): int
|
||||
{
|
||||
$number = abs($number);
|
||||
|
||||
switch ('pt_BR' !== $locale && \strlen($locale) > 3 ? substr($locale, 0, strrpos($locale, '_')) : $locale) {
|
||||
case 'af':
|
||||
case 'bn':
|
||||
@@ -205,7 +209,7 @@ EOF;
|
||||
case 'pt_BR':
|
||||
case 'ti':
|
||||
case 'wa':
|
||||
return ((0 == $number) || (1 == $number)) ? 0 : 1;
|
||||
return ($number < 2) ? 0 : 1;
|
||||
|
||||
case 'be':
|
||||
case 'bs':
|
||||
|
@@ -27,7 +27,7 @@
|
||||
"minimum-stability": "dev",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.3-dev"
|
||||
"dev-main": "2.4-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/contracts",
|
||||
|
Reference in New Issue
Block a user