Skip to content

Commit e4024e8

Browse files
Merge branch '5.1' into 5.x
* 5.1: Disable the PhpUnit bridge when testing it [PropertyInfo] Support for the mixed type. Don't unset the inflate resource on close as it might still be needed [HttpClient] Fix CurlHttpClient memory leak [Form] Add Bosnian (bs) validators translation [Form] Add missing Serbian (latn & cyrl) validators translation [Cache] skip igbinary < 3.1.6 [Ldap] Bypass the use of `ldap_control_paged_result` on PHP >= 7.3 [Form] [Validator] added pt_BR translations Estonian update Fix no collection in extract default value [PhpUnitBridge] fix running parallel tests with phpunit 9 [VarDumper] fix truncating big arrays
2 parents 177cd1a + a1616a7 commit e4024e8

File tree

24 files changed

+704
-52
lines changed

24 files changed

+704
-52
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ install:
225225
export SYMFONY_DEPRECATIONS_HELPER=weak &&
226226
cp composer.json composer.json.orig &&
227227
echo -e '{\n"require":{'"$(grep phpunit-bridge composer.json)"'"php":"*"},"minimum-stability":"dev"}' > composer.json &&
228-
php .github/build-packages.php HEAD^ $(find src/Symfony -mindepth 3 -type f -name composer.json -printf '%h\n' | sort) &&
228+
php .github/build-packages.php HEAD^ $(find src/Symfony -mindepth 2 -type f -name composer.json -printf '%h\n' | sort) &&
229229
mv composer.json composer.json.phpunit &&
230230
mv composer.json.orig composer.json
231231
fi
@@ -249,7 +249,7 @@ install:
249249
- |
250250
# Skip the phpunit-bridge on bugfix-only branches when $deps is empty
251251
if [[ ! $deps && ! $TRAVIS_BRANCH = *.x ]]; then
252-
export COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -not -wholename '*/Bridge/PhpUnit/*' -printf '%h\n' | sort)
252+
export COMPONENTS=$(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -not -wholename '*/Bridge/PhpUnit/*' -printf '%h\n' | sort)
253253
fi
254254
255255
- |

phpunit

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,8 @@ if (!getenv('SYMFONY_PHPUNIT_VERSION')) {
2424
if (!getenv('SYMFONY_PATCH_TYPE_DECLARATIONS')) {
2525
putenv('SYMFONY_PATCH_TYPE_DECLARATIONS=deprecations=1');
2626
}
27+
if (getcwd() === realpath(__DIR__.'/src/Symfony/Bridge/PhpUnit')) {
28+
putenv('SYMFONY_DEPRECATIONS_HELPER=disabled');
29+
}
2730
putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit');
2831
require __DIR__.'/vendor/symfony/phpunit-bridge/bin/simple-phpunit';

src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,11 @@ class SymfonyExcludeListPhpunit {}
271271
if (method_exists('PHPUnit\Util\ExcludeList', 'addDirectory')) {
272272
(new PHPUnit\Util\Excludelist())->getExcludedDirectories();
273273
PHPUnit\Util\ExcludeList::addDirectory(\dirname((new \ReflectionClass('SymfonyExcludeListPhpunit'))->getFileName()));
274-
PHPUnit\Util\ExcludeList::addDirectory(\dirname((new \ReflectionClass('SymfonyExcludeListSimplePhpunit'))->getFileName()));
274+
class_exists('SymfonyExcludeListSimplePhpunit', false) && PHPUnit\Util\ExcludeList::addDirectory(\dirname((new \ReflectionClass('SymfonyExcludeListSimplePhpunit'))->getFileName()));
275275
} elseif (method_exists('PHPUnit\Util\Blacklist', 'addDirectory')) {
276276
(new PHPUnit\Util\BlackList())->getBlacklistedDirectories();
277277
PHPUnit\Util\Blacklist::addDirectory(\dirname((new \ReflectionClass('SymfonyExcludeListPhpunit'))->getFileName()));
278-
PHPUnit\Util\Blacklist::addDirectory(\dirname((new \ReflectionClass('SymfonyExcludeListSimplePhpunit'))->getFileName()));
278+
class_exists('SymfonyExcludeListSimplePhpunit', false) && PHPUnit\Util\Blacklist::addDirectory(\dirname((new \ReflectionClass('SymfonyExcludeListSimplePhpunit'))->getFileName()));
279279
} else {
280280
PHPUnit\Util\Blacklist::$blacklistedClassNames['SymfonyExcludeListPhpunit'] = 1;
281281
PHPUnit\Util\Blacklist::$blacklistedClassNames['SymfonyExcludeListSimplePhpunit'] = 1;

src/Symfony/Component/Cache/Marshaller/DefaultMarshaller.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ class DefaultMarshaller implements MarshallerInterface
2525
public function __construct(bool $useIgbinarySerialize = null)
2626
{
2727
if (null === $useIgbinarySerialize) {
28-
$useIgbinarySerialize = \extension_loaded('igbinary') && (\PHP_VERSION_ID < 70400 || version_compare('3.1.0', phpversion('igbinary'), '<='));
29-
} elseif ($useIgbinarySerialize && (!\extension_loaded('igbinary') || (\PHP_VERSION_ID >= 70400 && version_compare('3.1.0', phpversion('igbinary'), '>')))) {
30-
throw new CacheException(\extension_loaded('igbinary') && \PHP_VERSION_ID >= 70400 ? 'Please upgrade the "igbinary" PHP extension to v3.1 or higher.' : 'The "igbinary" PHP extension is not loaded.');
28+
$useIgbinarySerialize = \extension_loaded('igbinary') && (\PHP_VERSION_ID < 70400 || version_compare('3.1.6', phpversion('igbinary'), '<='));
29+
} elseif ($useIgbinarySerialize && (!\extension_loaded('igbinary') || (\PHP_VERSION_ID >= 70400 && version_compare('3.1.6', phpversion('igbinary'), '>')))) {
30+
throw new CacheException(\extension_loaded('igbinary') && \PHP_VERSION_ID >= 70400 ? 'Please upgrade the "igbinary" PHP extension to v3.1.6 or higher.' : 'The "igbinary" PHP extension is not loaded.');
3131
}
3232
$this->useIgbinarySerialize = $useIgbinarySerialize;
3333
}
@@ -66,7 +66,7 @@ public function unmarshall(string $value)
6666
return null;
6767
}
6868
static $igbinaryNull;
69-
if ($value === ($igbinaryNull ?? $igbinaryNull = \extension_loaded('igbinary') && (\PHP_VERSION_ID < 70400 || version_compare('3.1.0', phpversion('igbinary'), '<=')) ? igbinary_serialize(null) : false)) {
69+
if ($value === ($igbinaryNull ?? $igbinaryNull = \extension_loaded('igbinary') ? igbinary_serialize(null) : false)) {
7070
return null;
7171
}
7272
$unserializeCallbackHandler = ini_set('unserialize_callback_func', __CLASS__.'::handleUnserializeCallback');

src/Symfony/Component/Cache/Tests/Marshaller/DefaultMarshallerTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function testSerialize()
2424
'b' => function () {},
2525
];
2626

27-
$expected = ['a' => \extension_loaded('igbinary') && (\PHP_VERSION_ID < 70400 || version_compare('3.1.0', phpversion('igbinary'), '<=')) ? igbinary_serialize(123) : serialize(123)];
27+
$expected = ['a' => \extension_loaded('igbinary') && (\PHP_VERSION_ID < 70400 || version_compare('3.1.6', phpversion('igbinary'), '<=')) ? igbinary_serialize(123) : serialize(123)];
2828
$this->assertSame($expected, $marshaller->marshall($values, $failed));
2929
$this->assertSame(['b'], $failed);
3030
}
@@ -43,7 +43,7 @@ public function testNativeUnserialize()
4343
*/
4444
public function testIgbinaryUnserialize()
4545
{
46-
if (\PHP_VERSION_ID >= 70400 && version_compare('3.1.0', phpversion('igbinary'), '>')) {
46+
if (\PHP_VERSION_ID >= 70400 && version_compare('3.1.6', phpversion('igbinary'), '>')) {
4747
$this->markTestSkipped('igbinary is not compatible with PHP 7.4.');
4848
}
4949

@@ -67,7 +67,7 @@ public function testNativeUnserializeNotFoundClass()
6767
*/
6868
public function testIgbinaryUnserializeNotFoundClass()
6969
{
70-
if (\PHP_VERSION_ID >= 70400 && version_compare('3.1.0', phpversion('igbinary'), '>')) {
70+
if (\PHP_VERSION_ID >= 70400 && version_compare('3.1.6', phpversion('igbinary'), '>')) {
7171
$this->markTestSkipped('igbinary is not compatible with PHP 7.4.');
7272
}
7373

@@ -95,7 +95,7 @@ public function testNativeUnserializeInvalid()
9595
*/
9696
public function testIgbinaryUnserializeInvalid()
9797
{
98-
if (\PHP_VERSION_ID >= 70400 && version_compare('3.1.0', phpversion('igbinary'), '>')) {
98+
if (\PHP_VERSION_ID >= 70400 && version_compare('3.1.6', phpversion('igbinary'), '>')) {
9999
$this->markTestSkipped('igbinary is not compatible with PHP 7.4.');
100100
}
101101

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
<?xml version="1.0"?>
2+
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
3+
<file source-language="en" datatype="plaintext" original="file.ext">
4+
<body>
5+
<trans-unit id="28">
6+
<source>This form should not contain extra fields.</source>
7+
<target>Ovaj obrazac ne bi trebalo da sadrži dodatna polja.</target>
8+
</trans-unit>
9+
<trans-unit id="29">
10+
<source>The uploaded file was too large. Please try to upload a smaller file.</source>
11+
<target>Prenijeta (uploaded) datoteka je prevelika. Molim pokušajte prenijeti manju datoteku.</target>
12+
</trans-unit>
13+
<trans-unit id="30">
14+
<source>The CSRF token is invalid. Please try to resubmit the form.</source>
15+
<target>CSRF vrijednost nije ispravna. Molim pokušajte ponovo da pošaljete obrazac.</target>
16+
</trans-unit>
17+
<trans-unit id="99">
18+
<source>This value is not a valid HTML5 color.</source>
19+
<target>Ova vrijednost nije ispravna HTML5 boja.</target>
20+
</trans-unit>
21+
<trans-unit id="100">
22+
<source>Please enter a valid birthdate.</source>
23+
<target>Molim upišite ispravan datum rođenja.</target>
24+
</trans-unit>
25+
<trans-unit id="101">
26+
<source>The selected choice is invalid.</source>
27+
<target>Odabrani izbor nije ispravan.</target>
28+
</trans-unit>
29+
<trans-unit id="102">
30+
<source>The collection is invalid.</source>
31+
<target>Ova kolekcija nije ispravna.</target>
32+
</trans-unit>
33+
<trans-unit id="103">
34+
<source>Please select a valid color.</source>
35+
<target>Molim izaberite ispravnu boju.</target>
36+
</trans-unit>
37+
<trans-unit id="104">
38+
<source>Please select a valid country.</source>
39+
<target>Molim izaberite ispravnu državu.</target>
40+
</trans-unit>
41+
<trans-unit id="105">
42+
<source>Please select a valid currency.</source>
43+
<target>Molim izaberite ispravnu valutu.</target>
44+
</trans-unit>
45+
<trans-unit id="106">
46+
<source>Please choose a valid date interval.</source>
47+
<target>Molim izaberite ispravan datumski interval.</target>
48+
</trans-unit>
49+
<trans-unit id="107">
50+
<source>Please enter a valid date and time.</source>
51+
<target>Molim upišite ispravan datum i vrijeme.</target>
52+
</trans-unit>
53+
<trans-unit id="108">
54+
<source>Please enter a valid date.</source>
55+
<target>Molim upišite ispravan datum.</target>
56+
</trans-unit>
57+
<trans-unit id="109">
58+
<source>Please select a valid file.</source>
59+
<target>Molim izaberite ispravnu datoteku.</target>
60+
</trans-unit>
61+
<trans-unit id="110">
62+
<source>The hidden field is invalid.</source>
63+
<target>Skriveno polje nije ispravno.</target>
64+
</trans-unit>
65+
<trans-unit id="111">
66+
<source>Please enter an integer.</source>
67+
<target>Molim upišite cijeli broj (integer).</target>
68+
</trans-unit>
69+
<trans-unit id="112">
70+
<source>Please select a valid language.</source>
71+
<target>Molim izaberite ispravan jezik.</target>
72+
</trans-unit>
73+
<trans-unit id="113">
74+
<source>Please select a valid locale.</source>
75+
<target>Molim izaberite ispravnu lokalizaciju.</target>
76+
</trans-unit>
77+
<trans-unit id="114">
78+
<source>Please enter a valid money amount.</source>
79+
<target>Molim upišite ispravnu količinu novca.</target>
80+
</trans-unit>
81+
<trans-unit id="115">
82+
<source>Please enter a number.</source>
83+
<target>Molim upišite broj.</target>
84+
</trans-unit>
85+
<trans-unit id="116">
86+
<source>The password is invalid.</source>
87+
<target>Ova lozinka nije ispravna.</target>
88+
</trans-unit>
89+
<trans-unit id="117">
90+
<source>Please enter a percentage value.</source>
91+
<target>Molim upišite procentualnu vrijednost.</target>
92+
</trans-unit>
93+
<trans-unit id="118">
94+
<source>The values do not match.</source>
95+
<target>Date vrijednosti se ne poklapaju.</target>
96+
</trans-unit>
97+
<trans-unit id="119">
98+
<source>Please enter a valid time.</source>
99+
<target>Molim upišite ispravno vrijeme.</target>
100+
</trans-unit>
101+
<trans-unit id="120">
102+
<source>Please select a valid timezone.</source>
103+
<target>Molim izaberite ispravnu vremensku zonu.</target>
104+
</trans-unit>
105+
<trans-unit id="121">
106+
<source>Please enter a valid URL.</source>
107+
<target>Molim upišite ispravan URL.</target>
108+
</trans-unit>
109+
<trans-unit id="122">
110+
<source>Please enter a valid search term.</source>
111+
<target>Molim upišite ispravan termin za pretragu.</target>
112+
</trans-unit>
113+
<trans-unit id="123">
114+
<source>Please provide a valid phone number.</source>
115+
<target>Molim navedite ispravan broj telefona.</target>
116+
</trans-unit>
117+
</body>
118+
</file>
119+
</xliff>

src/Symfony/Component/Form/Resources/translations/validators.pt_BR.xlf

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,106 @@
1414
<source>The CSRF token is invalid. Please try to resubmit the form.</source>
1515
<target>O token CSRF é inválido. Por favor, tente reenviar o formulário.</target>
1616
</trans-unit>
17+
<trans-unit id="99">
18+
<source>This value is not a valid HTML5 color.</source>
19+
<target>Este valor não é uma cor HTML5 válida.</target>
20+
</trans-unit>
21+
<trans-unit id="100">
22+
<source>Please enter a valid birthdate.</source>
23+
<target>Por favor, informe uma data de nascimento válida.</target>
24+
</trans-unit>
25+
<trans-unit id="101">
26+
<source>The selected choice is invalid.</source>
27+
<target>A escolha selecionada é inválida.</target>
28+
</trans-unit>
29+
<trans-unit id="102">
30+
<source>The collection is invalid.</source>
31+
<target>A coleção é inválida.</target>
32+
</trans-unit>
33+
<trans-unit id="103">
34+
<source>Please select a valid color.</source>
35+
<target>Por favor, selecione uma cor válida.</target>
36+
</trans-unit>
37+
<trans-unit id="104">
38+
<source>Please select a valid country.</source>
39+
<target>Por favor, selecione um país válido.</target>
40+
</trans-unit>
41+
<trans-unit id="105">
42+
<source>Please select a valid currency.</source>
43+
<target>Por favor, selecione uma moeda válida.</target>
44+
</trans-unit>
45+
<trans-unit id="106">
46+
<source>Please choose a valid date interval.</source>
47+
<target>Por favor, escolha um intervalo de datas válido.</target>
48+
</trans-unit>
49+
<trans-unit id="107">
50+
<source>Please enter a valid date and time.</source>
51+
<target>Por favor, informe uma data e horário válidos.</target>
52+
</trans-unit>
53+
<trans-unit id="108">
54+
<source>Please enter a valid date.</source>
55+
<target>Por favor, informe uma data válida.</target>
56+
</trans-unit>
57+
<trans-unit id="109">
58+
<source>Please select a valid file.</source>
59+
<target>Por favor, selecione um arquivo válido.</target>
60+
</trans-unit>
61+
<trans-unit id="110">
62+
<source>The hidden field is invalid.</source>
63+
<target>O campo oculto é inválido.</target>
64+
</trans-unit>
65+
<trans-unit id="111">
66+
<source>Please enter an integer.</source>
67+
<target>Por favor, informe um número inteiro.</target>
68+
</trans-unit>
69+
<trans-unit id="112">
70+
<source>Please select a valid language.</source>
71+
<target>Por favor, selecione um idioma válido.</target>
72+
</trans-unit>
73+
<trans-unit id="113">
74+
<source>Please select a valid locale.</source>
75+
<target>Por favor, selecione uma configuração de local válida.</target>
76+
</trans-unit>
77+
<trans-unit id="114">
78+
<source>Please enter a valid money amount.</source>
79+
<target>Por favor, informe um valor monetário válido.</target>
80+
</trans-unit>
81+
<trans-unit id="115">
82+
<source>Please enter a number.</source>
83+
<target>Por favor, informe um número.</target>
84+
</trans-unit>
85+
<trans-unit id="116">
86+
<source>The password is invalid.</source>
87+
<target>A senha é inválida.</target>
88+
</trans-unit>
89+
<trans-unit id="117">
90+
<source>Please enter a percentage value.</source>
91+
<target>Por favor, informe um valor percentual.</target>
92+
</trans-unit>
93+
<trans-unit id="118">
94+
<source>The values do not match.</source>
95+
<target>Os valores não conferem.</target>
96+
</trans-unit>
97+
<trans-unit id="119">
98+
<source>Please enter a valid time.</source>
99+
<target>Por favor, informe um horário válido.</target>
100+
</trans-unit>
101+
<trans-unit id="120">
102+
<source>Please select a valid timezone.</source>
103+
<target>Por favor, selecione um fuso horário válido.</target>
104+
</trans-unit>
105+
<trans-unit id="121">
106+
<source>Please enter a valid URL.</source>
107+
<target>Por favor, informe uma URL válida.</target>
108+
</trans-unit>
109+
<trans-unit id="122">
110+
<source>Please enter a valid search term.</source>
111+
<target>Por favor, informe um termo de busca válido.</target>
112+
</trans-unit>
113+
<trans-unit id="123">
114+
<source>Please provide a valid phone number.</source>
115+
<target>Por favor, informe um telefone válido.</target>
116+
</trans-unit>
17117
</body>
18118
</file>
19119
</xliff>

0 commit comments

Comments
 (0)