diff --git a/src/Symfony/Component/Filesystem/Filesystem.php b/src/Symfony/Component/Filesystem/Filesystem.php
index 224fbc5a34..fa88fd0d05 100644
--- a/src/Symfony/Component/Filesystem/Filesystem.php
+++ b/src/Symfony/Component/Filesystem/Filesystem.php
@@ -751,7 +751,6 @@ class Filesystem
return $result;
} catch (\Throwable $e) {
- } catch (\Exception $e) {
}
\restore_error_handler();
diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php
index a1b81ed928..8b7b949cf4 100644
--- a/src/Symfony/Component/HttpKernel/Kernel.php
+++ b/src/Symfony/Component/HttpKernel/Kernel.php
@@ -494,7 +494,6 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
$fresh = true;
}
} catch (\Throwable $e) {
- } catch (\Exception $e) {
} finally {
error_reporting($errorLevel);
}
@@ -563,7 +562,6 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
try {
$oldContainer = include $cache->getPath();
} catch (\Throwable $e) {
- } catch (\Exception $e) {
} finally {
error_reporting($errorLevel);
}
diff --git a/src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php b/src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php
index 3c3ea1aa17..3a5c4f0c4b 100644
--- a/src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php
+++ b/src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php
@@ -48,8 +48,8 @@ abstract class BasePasswordEncoder implements PasswordEncoderInterface
/**
* Merges a password and a salt.
*
- * @param string $password The password to be used
- * @param string $salt The salt to be used
+ * @param string $password The password to be used
+ * @param string|null $salt The salt to be used
*
* @return string a merged password and salt
*
diff --git a/src/Symfony/Component/Security/Core/Encoder/PasswordEncoderInterface.php b/src/Symfony/Component/Security/Core/Encoder/PasswordEncoderInterface.php
index e0573051eb..03cdaca44a 100644
--- a/src/Symfony/Component/Security/Core/Encoder/PasswordEncoderInterface.php
+++ b/src/Symfony/Component/Security/Core/Encoder/PasswordEncoderInterface.php
@@ -23,8 +23,8 @@ interface PasswordEncoderInterface
/**
* Encodes the raw password.
*
- * @param string $raw The password to encode
- * @param string $salt The salt
+ * @param string $raw The password to encode
+ * @param string|null $salt The salt
*
* @return string The encoded password
*
@@ -36,9 +36,9 @@ interface PasswordEncoderInterface
/**
* Checks a raw password against an encoded password.
*
- * @param string $encoded An encoded password
- * @param string $raw A raw password
- * @param string $salt The salt
+ * @param string $encoded An encoded password
+ * @param string $raw A raw password
+ * @param string|null $salt The salt
*
* @return bool true if the password is valid, false otherwise
*
diff --git a/src/Symfony/Component/Translation/Command/XliffLintCommand.php b/src/Symfony/Component/Translation/Command/XliffLintCommand.php
index 9bea4d9499..3c2cc9efde 100644
--- a/src/Symfony/Component/Translation/Command/XliffLintCommand.php
+++ b/src/Symfony/Component/Translation/Command/XliffLintCommand.php
@@ -124,7 +124,9 @@ EOF
$normalizedLocale = preg_quote(str_replace('-', '_', $targetLanguage), '/');
// strict file names require translation files to be named '____.locale.xlf'
// otherwise, both '____.locale.xlf' and 'locale.____.xlf' are allowed
- $expectedFilenamePattern = $this->requireStrictFileNames ? sprintf('/^.*\.%s\.xlf/', $normalizedLocale) : sprintf('/^(.*\.%s\.xlf|%s\..*\.xlf)/', $normalizedLocale, $normalizedLocale);
+ // also, the regexp matching must be case-insensitive, as defined for 'target-language' values
+ // http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html#target-language
+ $expectedFilenamePattern = $this->requireStrictFileNames ? sprintf('/^.*\.(?i:%s)\.xlf/', $normalizedLocale) : sprintf('/^(.*\.(?i:%s)\.xlf|(?i:%s)\..*\.xlf)/', $normalizedLocale, $normalizedLocale);
if (0 === preg_match($expectedFilenamePattern, basename($file))) {
$errors[] = [
diff --git a/src/Symfony/Component/Translation/Tests/Command/XliffLintCommandTest.php b/src/Symfony/Component/Translation/Tests/Command/XliffLintCommandTest.php
index 516d98af53..df2e2f0951 100644
--- a/src/Symfony/Component/Translation/Tests/Command/XliffLintCommandTest.php
+++ b/src/Symfony/Component/Translation/Tests/Command/XliffLintCommandTest.php
@@ -94,6 +94,17 @@ class XliffLintCommandTest extends TestCase
$this->assertContains('There is a mismatch between the language included in the file name ("messages.en.xlf") and the "es" value used in the "target-language" attribute of the file.', trim($tester->getDisplay()));
}
+ public function testLintTargetLanguageIsCaseInsensitive()
+ {
+ $tester = $this->createCommandTester();
+ $filename = $this->createFile('note', 'zh-cn', 'messages.zh_CN.xlf');
+
+ $tester->execute(['filename' => $filename], ['decorated' => false]);
+
+ $this->assertEquals(0, $tester->getStatusCode());
+ $this->assertContains('[OK] All 1 XLIFF files contain valid syntax.', trim($tester->getDisplay()));
+ }
+
/**
* @expectedException \RuntimeException
*/
diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf
index 60f02435f5..ccc0c0135a 100644
--- a/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf
+++ b/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf
@@ -334,6 +334,34 @@
Ova vrijednost treba biti validan JSON.
+
+
+ Ova kolekcija treba sadržavati samo unikatne elemente.
+
+
+
+ Ova vrijednost treba biti pozitivna.
+
+
+
+ Ova vrijednost treba biti pozitivna ili jednaka nuli.
+
+
+
+ Ova vrijednost treba biti negativna.
+
+
+
+ Ova vrijednost treba biti negativna ili jednaka nuli.
+
+
+
+ Ova vrijednost nije validna vremenska zona.
+
+
+
+ Ova lozinka je procurila u nekom od sigurnosnih propusta, te je potrebno koristiti drugu lozinku.
+