Skip to content

Commit b049d09

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: Fixed expectedException annotations Security and validators messages translation to Latvian [Form] FormView->isRendered() remove dead code and simplify the flow
2 parents 732a363 + e4f498a commit b049d09

File tree

6 files changed

+466
-17
lines changed

6 files changed

+466
-17
lines changed

src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerNameParserTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function testMissingControllers($name)
9393

9494
try {
9595
$parser->parse($name);
96-
$this->fail('->parse() throws a \InvalidArgumentException if the string is in the valid format, but not matching class can be found');
96+
$this->fail('->parse() throws a \InvalidArgumentException if the class is found but does not exist');
9797
} catch (\Exception $e) {
9898
$this->assertInstanceOf('\InvalidArgumentException', $e, '->parse() throws a \InvalidArgumentException if the class is found but does not exist');
9999
}
@@ -108,7 +108,6 @@ public function getMissingControllersTest()
108108
}
109109

110110
/**
111-
* @expectedException
112111
* @dataProvider getInvalidBundleNameTests
113112
*/
114113
public function testInvalidBundleName($bundleName, $suggestedBundleName)
@@ -117,6 +116,7 @@ public function testInvalidBundleName($bundleName, $suggestedBundleName)
117116

118117
try {
119118
$parser->parse($bundleName);
119+
$this->fail('->parse() throws a \InvalidArgumentException if the bundle does not exist');
120120
} catch (\Exception $e) {
121121
$this->assertInstanceOf('\InvalidArgumentException', $e, '->parse() throws a \InvalidArgumentException if the bundle does not exist');
122122

src/Symfony/Component/Asset/Tests/UrlPackageTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
use Symfony\Component\Asset\UrlPackage;
1515
use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy;
1616
use Symfony\Component\Asset\VersionStrategy\EmptyVersionStrategy;
17-
use Symfony\Component\Asset\Exception\InvalidArgumentException;
18-
use Symfony\Component\Asset\Exception\LogicException;
1917

2018
class UrlPackageTest extends \PHPUnit_Framework_TestCase
2119
{
@@ -79,15 +77,15 @@ public function getContextConfigs()
7977
}
8078

8179
/**
82-
* @expectedException LogicException
80+
* @expectedException \Symfony\Component\Asset\Exception\LogicException
8381
*/
8482
public function testNoBaseUrls()
8583
{
8684
new UrlPackage(array(), new EmptyVersionStrategy());
8785
}
8886

8987
/**
90-
* @expectedException InvalidArgumentException
88+
* @expectedException \Symfony\Component\Asset\Exception\InvalidArgumentException
9189
*/
9290
public function testWrongBaseUrl()
9391
{

src/Symfony/Component/Form/FormView.php

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,23 +65,17 @@ public function __construct(FormView $parent = null)
6565
*/
6666
public function isRendered()
6767
{
68-
$hasChildren = 0 < count($this->children);
69-
70-
if (true === $this->rendered || !$hasChildren) {
68+
if (true === $this->rendered || 0 === count($this->children)) {
7169
return $this->rendered;
7270
}
7371

74-
if ($hasChildren) {
75-
foreach ($this->children as $child) {
76-
if (!$child->isRendered()) {
77-
return false;
78-
}
72+
foreach ($this->children as $child) {
73+
if (!$child->isRendered()) {
74+
return false;
7975
}
80-
81-
return $this->rendered = true;
8276
}
8377

84-
return false;
78+
return $this->rendered = true;
8579
}
8680

8781
/**
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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="1">
6+
<source>An authentication exception occurred.</source>
7+
<target>Radās autentifikācijas kļūda.</target>
8+
</trans-unit>
9+
<trans-unit id="2">
10+
<source>Authentication credentials could not be found.</source>
11+
<target>Autentifikācijas dati nav atrasti.</target>
12+
</trans-unit>
13+
<trans-unit id="3">
14+
<source>Authentication request could not be processed due to a system problem.</source>
15+
<target>Autentifikācijas pieprasījums nevar tikt apstrādāts sistēmas problēmas dēļ.</target>
16+
</trans-unit>
17+
<trans-unit id="4">
18+
<source>Invalid credentials.</source>
19+
<target>Nederīgi autentifikācijas dati.</target>
20+
</trans-unit>
21+
<trans-unit id="5">
22+
<source>Cookie has already been used by someone else.</source>
23+
<target>Kāds cits jau izmantoja sīkdatni.</target>
24+
</trans-unit>
25+
<trans-unit id="6">
26+
<source>Not privileged to request the resource.</source>
27+
<target>Nav tiesību ši resursa izsaukšanai.</target>
28+
</trans-unit>
29+
<trans-unit id="7">
30+
<source>Invalid CSRF token.</source>
31+
<target>Nederīgs CSRF talons.</target>
32+
</trans-unit>
33+
<trans-unit id="8">
34+
<source>Digest nonce has expired.</source>
35+
<target>Vienreiz lietojamās atslēgas darbības laiks ir beidzies.</target>
36+
</trans-unit>
37+
<trans-unit id="9">
38+
<source>No authentication provider found to support the authentication token.</source>
39+
<target>Nav atrasts, autentifikācijas talonu atbalstošs, autentifikācijas sniedzējs.</target>
40+
</trans-unit>
41+
<trans-unit id="10">
42+
<source>No session available, it either timed out or cookies are not enabled.</source>
43+
<target>Sesija nav pieejama - vai nu tā beidzās, vai nu sīkdatnes nav iespējotas.</target>
44+
</trans-unit>
45+
<trans-unit id="11">
46+
<source>No token could be found.</source>
47+
<target>Nevar atrast nevienu talonu.</target>
48+
</trans-unit>
49+
<trans-unit id="12">
50+
<source>Username could not be found.</source>
51+
<target>Nevar atrast lietotājvārdu.</target>
52+
</trans-unit>
53+
<trans-unit id="13">
54+
<source>Account has expired.</source>
55+
<target>Konta derīguma termiņš ir beidzies.</target>
56+
</trans-unit>
57+
<trans-unit id="14">
58+
<source>Credentials have expired.</source>
59+
<target>Autentifikācijas datu derīguma termiņš ir beidzies.</target>
60+
</trans-unit>
61+
<trans-unit id="15">
62+
<source>Account is disabled.</source>
63+
<target>Konts ir atspējots.</target>
64+
</trans-unit>
65+
<trans-unit id="16">
66+
<source>Account is locked.</source>
67+
<target>Konts ir slēgts.</target>
68+
</trans-unit>
69+
</body>
70+
</file>
71+
</xliff>
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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="1">
6+
<source>An authentication exception occurred.</source>
7+
<target>Radās autentifikācijas kļūda.</target>
8+
</trans-unit>
9+
<trans-unit id="2">
10+
<source>Authentication credentials could not be found.</source>
11+
<target>Autentifikācijas dati nav atrasti.</target>
12+
</trans-unit>
13+
<trans-unit id="3">
14+
<source>Authentication request could not be processed due to a system problem.</source>
15+
<target>Autentifikācijas pieprasījums nevar tikt apstrādāts sistēmas problēmas dēļ.</target>
16+
</trans-unit>
17+
<trans-unit id="4">
18+
<source>Invalid credentials.</source>
19+
<target>Nederīgi autentifikācijas dati.</target>
20+
</trans-unit>
21+
<trans-unit id="5">
22+
<source>Cookie has already been used by someone else.</source>
23+
<target>Kāds cits jau izmantoja sīkdatni.</target>
24+
</trans-unit>
25+
<trans-unit id="6">
26+
<source>Not privileged to request the resource.</source>
27+
<target>Nav tiesību ši resursa izsaukšanai.</target>
28+
</trans-unit>
29+
<trans-unit id="7">
30+
<source>Invalid CSRF token.</source>
31+
<target>Nederīgs CSRF talons.</target>
32+
</trans-unit>
33+
<trans-unit id="8">
34+
<source>Digest nonce has expired.</source>
35+
<target>Vienreiz lietojamās atslēgas darbības laiks ir beidzies.</target>
36+
</trans-unit>
37+
<trans-unit id="9">
38+
<source>No authentication provider found to support the authentication token.</source>
39+
<target>Nav atrasts, autentifikācijas talonu atbalstošs, autentifikācijas sniedzējs.</target>
40+
</trans-unit>
41+
<trans-unit id="10">
42+
<source>No session available, it either timed out or cookies are not enabled.</source>
43+
<target>Sesija nav pieejama - vai nu tā beidzās, vai nu sīkdatnes nav iespējotas.</target>
44+
</trans-unit>
45+
<trans-unit id="11">
46+
<source>No token could be found.</source>
47+
<target>Nevar atrast nevienu talonu.</target>
48+
</trans-unit>
49+
<trans-unit id="12">
50+
<source>Username could not be found.</source>
51+
<target>Nevar atrast lietotājvārdu.</target>
52+
</trans-unit>
53+
<trans-unit id="13">
54+
<source>Account has expired.</source>
55+
<target>Konta derīguma termiņš ir beidzies.</target>
56+
</trans-unit>
57+
<trans-unit id="14">
58+
<source>Credentials have expired.</source>
59+
<target>Autentifikācijas datu derīguma termiņš ir beidzies.</target>
60+
</trans-unit>
61+
<trans-unit id="15">
62+
<source>Account is disabled.</source>
63+
<target>Konts ir atspējots.</target>
64+
</trans-unit>
65+
<trans-unit id="16">
66+
<source>Account is locked.</source>
67+
<target>Konts ir slēgts.</target>
68+
</trans-unit>
69+
</body>
70+
</file>
71+
</xliff>

0 commit comments

Comments
 (0)