-
EOTXT;
ob_start();
@@ -96,7 +95,7 @@ public function testCollectHtml()
$output = preg_replace('#<(script|style).*?\1>#s', '', $output);
$output = preg_replace('/sf-dump-\d+/', 'sf-dump', $output);
- $this->assertSame($xOutput, $output);
+ $this->assertSame($xOutput, trim($output));
$this->assertSame(1, $collector->getDumpsCount());
$collector->serialize();
}
diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/ValidateRequestListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/ValidateRequestListenerTest.php
index 842a3869cba79..b9d8f06f00848 100644
--- a/src/Symfony/Component/HttpKernel/Tests/EventListener/ValidateRequestListenerTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/ValidateRequestListenerTest.php
@@ -21,7 +21,7 @@
class ValidateRequestListenerTest extends \PHPUnit_Framework_TestCase
{
/**
- * @expectedException Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException
+ * @expectedException \Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException
*/
public function testListenerThrowsWhenMasterRequestHasInconsistentClientIps()
{
diff --git a/src/Symfony/Component/HttpKernel/Tests/Fixtures/Controller/NullableController.php b/src/Symfony/Component/HttpKernel/Tests/Fixtures/Controller/NullableController.php
new file mode 100644
index 0000000000000..9db4df7b4c173
--- /dev/null
+++ b/src/Symfony/Component/HttpKernel/Tests/Fixtures/Controller/NullableController.php
@@ -0,0 +1,19 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\HttpKernel\Tests\Fixtures\Controller;
+
+class NullableController
+{
+ public function action(?string $foo, ?\stdClass $bar, ?string $baz = 'value', $mandatory)
+ {
+ }
+}
diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php b/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php
index 8587aa3aae621..ee3d999361f8c 100644
--- a/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php
@@ -303,7 +303,7 @@ public function testVerifyRequestStackPushPopDuringHandle()
}
/**
- * @expectedException Symfony\Component\HttpKernel\Exception\BadRequestHttpException
+ * @expectedException \Symfony\Component\HttpKernel\Exception\BadRequestHttpException
*/
public function testInconsistentClientIpsOnMasterRequests()
{
diff --git a/src/Symfony/Component/HttpKernel/UriSigner.php b/src/Symfony/Component/HttpKernel/UriSigner.php
index c2d0d79664c42..fa84899064e88 100644
--- a/src/Symfony/Component/HttpKernel/UriSigner.php
+++ b/src/Symfony/Component/HttpKernel/UriSigner.php
@@ -98,7 +98,7 @@ private function buildUrl(array $url, array $params = array())
$host = isset($url['host']) ? $url['host'] : '';
$port = isset($url['port']) ? ':'.$url['port'] : '';
$user = isset($url['user']) ? $url['user'] : '';
- $pass = isset($url['pass']) ? ':'.$url['pass'] : '';
+ $pass = isset($url['pass']) ? ':'.$url['pass'] : '';
$pass = ($user || $pass) ? "$pass@" : '';
$path = isset($url['path']) ? $url['path'] : '';
$query = isset($url['query']) && $url['query'] ? '?'.$url['query'] : '';
diff --git a/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php b/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php
index 592969475ec4e..e689638573235 100644
--- a/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php
+++ b/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php
@@ -550,7 +550,7 @@ public function setTimeZoneId($timeZoneId)
try {
$this->dateTimeZone = new \DateTimeZone($timeZoneId);
if ('GMT' !== $timeZoneId && $this->dateTimeZone->getName() !== $timeZoneId) {
- $timeZoneId = $timeZone = $this->getTimeZoneId();
+ $timeZone = $this->getTimeZoneId();
}
} catch (\Exception $e) {
$timeZoneId = $timeZone = $this->getTimeZoneId();
diff --git a/src/Symfony/Component/Intl/ResourceBundle/LanguageBundle.php b/src/Symfony/Component/Intl/ResourceBundle/LanguageBundle.php
index cfe82ca3c3135..d12b892a10dcb 100644
--- a/src/Symfony/Component/Intl/ResourceBundle/LanguageBundle.php
+++ b/src/Symfony/Component/Intl/ResourceBundle/LanguageBundle.php
@@ -42,6 +42,7 @@ class LanguageBundle extends LanguageDataProvider implements LanguageBundleInter
* @param string $path
* @param BundleEntryReaderInterface $reader
* @param LocaleDataProvider $localeProvider
+ * @param ScriptDataProvider $scriptProvider
*/
public function __construct($path, BundleEntryReaderInterface $reader, LocaleDataProvider $localeProvider, ScriptDataProvider $scriptProvider)
{
diff --git a/src/Symfony/Component/Ldap/Adapter/ExtLdap/Collection.php b/src/Symfony/Component/Ldap/Adapter/ExtLdap/Collection.php
index 07eff73907f1b..d9b2dd4f5d4ea 100644
--- a/src/Symfony/Component/Ldap/Adapter/ExtLdap/Collection.php
+++ b/src/Symfony/Component/Ldap/Adapter/ExtLdap/Collection.php
@@ -24,11 +24,10 @@ class Collection implements CollectionInterface
private $search;
private $entries;
- public function __construct(Connection $connection, Query $search, array $entries = array())
+ public function __construct(Connection $connection, Query $search)
{
$this->connection = $connection;
$this->search = $search;
- $this->entries = array();
}
/**
@@ -36,78 +35,91 @@ public function __construct(Connection $connection, Query $search, array $entrie
*/
public function toArray()
{
- $this->initialize();
+ if (null === $this->entries) {
+ $this->entries = iterator_to_array($this->getIterator(), false);
+ }
return $this->entries;
}
public function count()
{
- $this->initialize();
+ if (false !== $count = ldap_count_entries($this->connection->getResource(), $this->search->getResource())) {
+ return $count;
+ }
- return count($this->entries);
+ throw new LdapException(sprintf('Error while retrieving entry count: %s', ldap_error($this->connection->getResource())));
}
public function getIterator()
{
- return new ResultIterator($this->connection, $this->search);
+ $con = $this->connection->getResource();
+ $search = $this->search->getResource();
+ $current = ldap_first_entry($con, $search);
+
+ if (0 === $this->count()) {
+ return;
+ }
+
+ if (false === $current) {
+ throw new LdapException(sprintf('Could not rewind entries array: %s', ldap_error($con)));
+ }
+
+ yield $this->getSingleEntry($con, $current);
+
+ while (false !== $current = ldap_next_entry($con, $current)) {
+ yield $this->getSingleEntry($con, $current);
+ }
}
public function offsetExists($offset)
{
- $this->initialize();
+ $this->toArray();
return isset($this->entries[$offset]);
}
public function offsetGet($offset)
{
+ $this->toArray();
+
return isset($this->entries[$offset]) ? $this->entries[$offset] : null;
}
public function offsetSet($offset, $value)
{
- $this->initialize();
+ $this->toArray();
$this->entries[$offset] = $value;
}
public function offsetUnset($offset)
{
- $this->initialize();
+ $this->toArray();
unset($this->entries[$offset]);
}
- private function initialize()
+ private function getSingleEntry($con, $current)
{
- if (null === $this->entries) {
- return;
- }
+ $attributes = ldap_get_attributes($con, $current);
- $con = $this->connection->getResource();
-
- $entries = ldap_get_entries($con, $this->search->getResource());
-
- if (false === $entries) {
- throw new LdapException(sprintf('Could not load entries: %s', ldap_error($con)));
+ if (false === $attributes) {
+ throw new LdapException(sprintf('Could not fetch attributes: %s', ldap_error($con)));
}
- if (0 === $entries['count']) {
- return array();
- }
+ $attributes = $this->cleanupAttributes($attributes);
- unset($entries['count']);
+ $dn = ldap_get_dn($con, $current);
- $this->entries = array_map(function (array $entry) {
- $dn = $entry['dn'];
- $attributes = $this->cleanupAttributes($entry);
+ if (false === $dn) {
+ throw new LdapException(sprintf('Could not fetch DN: %s', ldap_error($con)));
+ }
- return new Entry($dn, $attributes);
- }, $entries);
+ return new Entry($dn, $attributes);
}
- private function cleanupAttributes(array $entry = array())
+ private function cleanupAttributes(array $entry)
{
$attributes = array_diff_key($entry, array_flip(range(0, $entry['count'] - 1)) + array(
'count' => null,
diff --git a/src/Symfony/Component/Ldap/Adapter/ExtLdap/ResultIterator.php b/src/Symfony/Component/Ldap/Adapter/ExtLdap/ResultIterator.php
deleted file mode 100644
index 2527069c5b0a1..0000000000000
--- a/src/Symfony/Component/Ldap/Adapter/ExtLdap/ResultIterator.php
+++ /dev/null
@@ -1,81 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Ldap\Adapter\ExtLdap;
-
-use Symfony\Component\Ldap\Entry;
-use Symfony\Component\Ldap\Exception\LdapException;
-
-/**
- * @author Charles Sarrazin
- *
- * @internal
- */
-class ResultIterator implements \Iterator
-{
- private $connection;
- private $search;
- private $current;
- private $key;
-
- public function __construct(Connection $connection, Query $search)
- {
- $this->connection = $connection->getResource();
- $this->search = $search->getResource();
- }
-
- /**
- * Fetches the current entry.
- *
- * @return Entry
- */
- public function current()
- {
- $attributes = ldap_get_attributes($this->connection, $this->current);
-
- if (false === $attributes) {
- throw new LdapException(sprintf('Could not fetch attributes: %s', ldap_error($this->connection)));
- }
-
- $dn = ldap_get_dn($this->connection, $this->current);
-
- if (false === $dn) {
- throw new LdapException(sprintf('Could not fetch DN: %s', ldap_error($this->connection)));
- }
-
- return new Entry($dn, $attributes);
- }
-
- public function next()
- {
- $this->current = ldap_next_entry($this->connection, $this->current);
- ++$this->key;
- }
-
- public function key()
- {
- return $this->key;
- }
-
- public function valid()
- {
- return false !== $this->current;
- }
-
- public function rewind()
- {
- $this->current = ldap_first_entry($this->connection, $this->search);
-
- if (false === $this->current) {
- throw new LdapException(sprintf('Could not rewind entries array: %s', ldap_error($this->connection)));
- }
- }
-}
diff --git a/src/Symfony/Component/Ldap/LdapClient.php b/src/Symfony/Component/Ldap/LdapClient.php
index 2bd32f6ac1066..0a68c05875b78 100644
--- a/src/Symfony/Component/Ldap/LdapClient.php
+++ b/src/Symfony/Component/Ldap/LdapClient.php
@@ -64,24 +64,34 @@ public function find($dn, $query, $filter = '*')
$query = $this->ldap->query($dn, $query, array('filter' => $filter));
$entries = $query->execute();
- $result = array();
+ $result = array(
+ 'count' => 0,
+ );
foreach ($entries as $entry) {
$resultEntry = array();
foreach ($entry->getAttributes() as $attribute => $values) {
- $resultAttribute = $values;
+ $resultAttribute = array(
+ 'count' => count($values),
+ );
+
+ foreach ($values as $val) {
+ $resultAttribute[] = $val;
+ }
+ $attributeName = strtolower($attribute);
$resultAttribute['count'] = count($values);
- $resultEntry[] = $resultAttribute;
- $resultEntry[$attribute] = $resultAttribute;
+ $resultEntry[$attributeName] = $resultAttribute;
+ $resultEntry[] = $attributeName;
}
$resultEntry['count'] = count($resultEntry) / 2;
+ $resultEntry['dn'] = $entry->getDn();
$result[] = $resultEntry;
}
- $result['count'] = count($result);
+ $result['count'] = count($result) - 1;
return $result;
}
diff --git a/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/AdapterTest.php b/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/AdapterTest.php
index df30ec85a2ac6..f25d181896d35 100644
--- a/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/AdapterTest.php
+++ b/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/AdapterTest.php
@@ -47,4 +47,22 @@ public function testLdapQuery()
$this->assertEquals(array('Fabien Potencier'), $entry->getAttribute('cn'));
$this->assertEquals(array('fabpot@symfony.com', 'fabien@potencier.com'), $entry->getAttribute('mail'));
}
+
+ /**
+ * @group functional
+ */
+ public function testLdapQueryIterator()
+ {
+ $ldap = new Adapter($this->getLdapConfig());
+
+ $ldap->getConnection()->bind('cn=admin,dc=symfony,dc=com', 'symfony');
+ $query = $ldap->createQuery('dc=symfony,dc=com', '(&(objectclass=person)(ou=Maintainers))', array());
+ $result = $query->execute();
+ $iterator = $result->getIterator();
+ $iterator->rewind();
+ $entry = $iterator->current();
+ $this->assertInstanceOf(Entry::class, $entry);
+ $this->assertEquals(array('Fabien Potencier'), $entry->getAttribute('cn'));
+ $this->assertEquals(array('fabpot@symfony.com', 'fabien@potencier.com'), $entry->getAttribute('mail'));
+ }
}
diff --git a/src/Symfony/Component/Ldap/Tests/LdapClientTest.php b/src/Symfony/Component/Ldap/Tests/LdapClientTest.php
index 60cdf27a1231f..30c5adfd40b1f 100644
--- a/src/Symfony/Component/Ldap/Tests/LdapClientTest.php
+++ b/src/Symfony/Component/Ldap/Tests/LdapClientTest.php
@@ -20,7 +20,7 @@
/**
* @group legacy
*/
-class LdapClientTest extends \PHPUnit_Framework_TestCase
+class LdapClientTest extends LdapTestCase
{
/** @var LdapClient */
private $client;
@@ -72,13 +72,11 @@ public function testLdapFind()
->method('getIterator')
->will($this->returnValue(new \ArrayIterator(array(
new Entry('cn=qux,dc=foo,dc=com', array(
- 'dn' => array('cn=qux,dc=foo,dc=com'),
'cn' => array('qux'),
'dc' => array('com', 'foo'),
'givenName' => array('Qux'),
)),
new Entry('cn=baz,dc=foo,dc=com', array(
- 'dn' => array('cn=baz,dc=foo,dc=com'),
'cn' => array('baz'),
'dc' => array('com', 'foo'),
'givenName' => array('Baz'),
@@ -101,78 +99,44 @@ public function testLdapFind()
$expected = array(
'count' => 2,
0 => array(
- 'count' => 4,
- 0 => array(
- 'count' => 1,
- 0 => 'cn=qux,dc=foo,dc=com',
- ),
- 'dn' => array(
- 'count' => 1,
- 0 => 'cn=qux,dc=foo,dc=com',
- ),
- 1 => array(
- 'count' => 1,
- 0 => 'qux',
- ),
+ 'count' => 3,
+ 0 => 'cn',
'cn' => array(
'count' => 1,
0 => 'qux',
),
- 2 => array(
- 'count' => 2,
- 0 => 'com',
- 1 => 'foo',
- ),
+ 1 => 'dc',
'dc' => array(
'count' => 2,
0 => 'com',
1 => 'foo',
),
- 3 => array(
- 'count' => 1,
- 0 => 'Qux',
- ),
- 'givenName' => array(
+ 2 => 'givenname',
+ 'givenname' => array(
'count' => 1,
0 => 'Qux',
),
+ 'dn' => 'cn=qux,dc=foo,dc=com',
),
1 => array(
- 'count' => 4,
- 0 => array(
- 'count' => 1,
- 0 => 'cn=baz,dc=foo,dc=com',
- ),
- 'dn' => array(
- 'count' => 1,
- 0 => 'cn=baz,dc=foo,dc=com',
- ),
- 1 => array(
- 'count' => 1,
- 0 => 'baz',
- ),
+ 'count' => 3,
+ 0 => 'cn',
'cn' => array(
'count' => 1,
0 => 'baz',
),
- 2 => array(
- 'count' => 2,
- 0 => 'com',
- 1 => 'foo',
- ),
+ 1 => 'dc',
'dc' => array(
'count' => 2,
0 => 'com',
1 => 'foo',
),
- 3 => array(
- 'count' => 1,
- 0 => 'Baz',
- ),
- 'givenName' => array(
+ 2 => 'givenname',
+ 'givenname' => array(
'count' => 1,
0 => 'Baz',
),
+ 'dn' => 'cn=baz,dc=foo,dc=com',
),
);
$this->assertEquals($expected, $this->client->find('dc=foo,dc=com', 'bar', 'baz'));
@@ -190,6 +154,25 @@ public function testLdapClientConfig($args, $expected)
$this->assertEquals($expected, call_user_func_array(array($reflMethod, 'invoke'), $args));
}
+ /**
+ * @group functional
+ * @requires extension ldap
+ */
+ public function testLdapClientFunctional()
+ {
+ $config = $this->getLdapConfig();
+ $ldap = new LdapClient($config['host'], $config['port']);
+ $ldap->bind('cn=admin,dc=symfony,dc=com', 'symfony');
+ $result = $ldap->find('dc=symfony,dc=com', '(&(objectclass=person)(ou=Maintainers))');
+
+ $con = @ldap_connect($config['host'], $config['port']);
+ @ldap_bind($con, 'cn=admin,dc=symfony,dc=com', 'symfony');
+ $search = @ldap_search($con, 'dc=symfony,dc=com', '(&(objectclass=person)(ou=Maintainers))', array('*'));
+ $expected = @ldap_get_entries($con, $search);
+
+ $this->assertSame($expected, $result);
+ }
+
public function provideConfig()
{
return array(
diff --git a/src/Symfony/Component/Process/ExecutableFinder.php b/src/Symfony/Component/Process/ExecutableFinder.php
index 3bf711149dfab..824457ce2a122 100644
--- a/src/Symfony/Component/Process/ExecutableFinder.php
+++ b/src/Symfony/Component/Process/ExecutableFinder.php
@@ -79,7 +79,7 @@ public function find($name, $default = null, array $extraDirs = array())
}
foreach ($suffixes as $suffix) {
foreach ($dirs as $dir) {
- if (is_file($file = $dir.DIRECTORY_SEPARATOR.$name.$suffix) && ('\\' === DIRECTORY_SEPARATOR || is_executable($file))) {
+ if (@is_file($file = $dir.DIRECTORY_SEPARATOR.$name.$suffix) && ('\\' === DIRECTORY_SEPARATOR || is_executable($file))) {
return $file;
}
}
diff --git a/src/Symfony/Component/Process/Tests/ProcessTest.php b/src/Symfony/Component/Process/Tests/ProcessTest.php
index 317b5ef69f0f1..cd57f3a8c32df 100644
--- a/src/Symfony/Component/Process/Tests/ProcessTest.php
+++ b/src/Symfony/Component/Process/Tests/ProcessTest.php
@@ -939,7 +939,7 @@ public function provideMethodsThatNeedARunningProcess()
/**
* @dataProvider provideMethodsThatNeedATerminatedProcess
- * @expectedException Symfony\Component\Process\Exception\LogicException
+ * @expectedException \Symfony\Component\Process\Exception\LogicException
* @expectedExceptionMessage Process must be terminated before calling
*/
public function testMethodsThatNeedATerminatedProcess($method)
diff --git a/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php b/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php
index 63454a5b45319..1d3d3a2083ca8 100644
--- a/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php
+++ b/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php
@@ -231,7 +231,7 @@ private function extractFromAccessor($class, $property)
*/
private function extractFromReflectionType(\ReflectionType $reflectionType)
{
- $phpTypeOrClass = (string) $reflectionType;
+ $phpTypeOrClass = method_exists($reflectionType, 'getName') ? $reflectionType->getName() : (string) $reflectionType;
$nullable = $reflectionType->allowsNull();
if ($reflectionType->isBuiltin()) {
diff --git a/src/Symfony/Component/PropertyInfo/Tests/Extractors/ReflectionExtractorTest.php b/src/Symfony/Component/PropertyInfo/Tests/Extractors/ReflectionExtractorTest.php
index dfc13c025eb41..10b056220d539 100644
--- a/src/Symfony/Component/PropertyInfo/Tests/Extractors/ReflectionExtractorTest.php
+++ b/src/Symfony/Component/PropertyInfo/Tests/Extractors/ReflectionExtractorTest.php
@@ -94,6 +94,25 @@ public function php7TypesProvider()
);
}
+ /**
+ * @dataProvider php71TypesProvider
+ * @requires PHP 7.1
+ */
+ public function testExtractPhp71Type($property, array $type = null)
+ {
+ $this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Php71Dummy', $property, array()));
+ }
+
+ public function php71TypesProvider()
+ {
+ return array(
+ array('foo', array(new Type(Type::BUILTIN_TYPE_ARRAY, true, null, true))),
+ array('bar', array(new Type(Type::BUILTIN_TYPE_INT, true))),
+ array('baz', array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_STRING)))),
+ array('donotexist', null),
+ );
+ }
+
public function testIsReadable()
{
$this->assertFalse($this->extractor->isReadable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'bar', array()));
diff --git a/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Php71Dummy.php b/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Php71Dummy.php
new file mode 100644
index 0000000000000..d93c67a3d38bd
--- /dev/null
+++ b/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Php71Dummy.php
@@ -0,0 +1,30 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\PropertyInfo\Tests\Fixtures;
+
+/**
+ * @author Teoh Han Hui
+ */
+class Php71Dummy
+{
+ public function getFoo(): ?array
+ {
+ }
+
+ public function setBar(?int $bar)
+ {
+ }
+
+ public function addBaz(string $baz)
+ {
+ }
+}
diff --git a/src/Symfony/Component/Security/Core/Authorization/Voter/Voter.php b/src/Symfony/Component/Security/Core/Authorization/Voter/Voter.php
index ba4d6af5a8b56..0641486b7a13b 100644
--- a/src/Symfony/Component/Security/Core/Authorization/Voter/Voter.php
+++ b/src/Symfony/Component/Security/Core/Authorization/Voter/Voter.php
@@ -58,6 +58,7 @@ abstract protected function supports($attribute, $subject);
/**
* Perform a single access check operation on a given attribute, subject and token.
+ * It is safe to assume that $attribute and $subject already passed the "supports()" method check.
*
* @param string $attribute
* @param mixed $subject
diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.lv.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.lv.xlf
new file mode 100644
index 0000000000000..33c48c617461c
--- /dev/null
+++ b/src/Symfony/Component/Security/Core/Resources/translations/security.lv.xlf
@@ -0,0 +1,71 @@
+
+
+
+
+
+ An authentication exception occurred.
+ Radās autentifikācijas kļūda.
+
+
+ Authentication credentials could not be found.
+ Autentifikācijas dati nav atrasti.
+
+
+ Authentication request could not be processed due to a system problem.
+ Autentifikācijas pieprasījums nevar tikt apstrādāts sistēmas problēmas dēļ.
+
+
+ Invalid credentials.
+ Nederīgi autentifikācijas dati.
+
+
+ Cookie has already been used by someone else.
+ Kāds cits jau izmantoja sīkdatni.
+
+
+ Not privileged to request the resource.
+ Nav tiesību ši resursa izsaukšanai.
+
+
+ Invalid CSRF token.
+ Nederīgs CSRF talons.
+
+
+ Digest nonce has expired.
+ Vienreiz lietojamās atslēgas darbības laiks ir beidzies.
+
+
+ No authentication provider found to support the authentication token.
+ Nav atrasts, autentifikācijas talonu atbalstošs, autentifikācijas sniedzējs.
+
+
+ No session available, it either timed out or cookies are not enabled.
+ Sesija nav pieejama - vai nu tā beidzās, vai nu sīkdatnes nav iespējotas.
+
+
+ No token could be found.
+ Nevar atrast nevienu talonu.
+
+
+ Username could not be found.
+ Nevar atrast lietotājvārdu.
+
+
+ Account has expired.
+ Konta derīguma termiņš ir beidzies.
+
+
+ Credentials have expired.
+ Autentifikācijas datu derīguma termiņš ir beidzies.
+
+
+ Account is disabled.
+ Konts ir atspējots.
+
+
+ Account is locked.
+ Konts ir slēgts.
+
+
+
+
\ No newline at end of file
diff --git a/src/Symfony/Component/Security/Core/Role/RoleHierarchy.php b/src/Symfony/Component/Security/Core/Role/RoleHierarchy.php
index 793007e7f5420..95e76ee279316 100644
--- a/src/Symfony/Component/Security/Core/Role/RoleHierarchy.php
+++ b/src/Symfony/Component/Security/Core/Role/RoleHierarchy.php
@@ -65,9 +65,17 @@ protected function buildRoleMap()
}
$visited[] = $role;
- $this->map[$main] = array_unique(array_merge($this->map[$main], $this->hierarchy[$role]));
- $additionalRoles = array_merge($additionalRoles, array_diff($this->hierarchy[$role], $visited));
+
+ foreach ($this->hierarchy[$role] as $roleToAdd) {
+ $this->map[$main][] = $roleToAdd;
+ }
+
+ foreach (array_diff($this->hierarchy[$role], $visited) as $additionalRole) {
+ $additionalRoles[] = $additionalRole;
+ }
}
+
+ $this->map[$main] = array_unique($this->map[$main]);
}
}
}
diff --git a/src/Symfony/Component/Security/Http/Tests/Firewall/RememberMeListenerTest.php b/src/Symfony/Component/Security/Http/Tests/Firewall/RememberMeListenerTest.php
index 7309042d4764b..cd2f1b8735b86 100644
--- a/src/Symfony/Component/Security/Http/Tests/Firewall/RememberMeListenerTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Firewall/RememberMeListenerTest.php
@@ -101,7 +101,7 @@ public function testOnCoreSecurityIgnoresAuthenticationExceptionThrownByAuthenti
}
/**
- * @expectedException Symfony\Component\Security\Core\Exception\AuthenticationException
+ * @expectedException \Symfony\Component\Security\Core\Exception\AuthenticationException
* @expectedExceptionMessage Authentication failed.
*/
public function testOnCoreSecurityIgnoresAuthenticationOptionallyRethrowsExceptionThrownAuthenticationManagerImplementation()
diff --git a/src/Symfony/Component/Security/Resources/translations/security.lv.xlf b/src/Symfony/Component/Security/Resources/translations/security.lv.xlf
new file mode 100644
index 0000000000000..33c48c617461c
--- /dev/null
+++ b/src/Symfony/Component/Security/Resources/translations/security.lv.xlf
@@ -0,0 +1,71 @@
+
+
+
+
+
+ An authentication exception occurred.
+ Radās autentifikācijas kļūda.
+
+
+ Authentication credentials could not be found.
+ Autentifikācijas dati nav atrasti.
+
+
+ Authentication request could not be processed due to a system problem.
+ Autentifikācijas pieprasījums nevar tikt apstrādāts sistēmas problēmas dēļ.
+
+
+ Invalid credentials.
+ Nederīgi autentifikācijas dati.
+
+
+ Cookie has already been used by someone else.
+ Kāds cits jau izmantoja sīkdatni.
+
+
+ Not privileged to request the resource.
+ Nav tiesību ši resursa izsaukšanai.
+
+
+ Invalid CSRF token.
+ Nederīgs CSRF talons.
+
+
+ Digest nonce has expired.
+ Vienreiz lietojamās atslēgas darbības laiks ir beidzies.
+
+
+ No authentication provider found to support the authentication token.
+ Nav atrasts, autentifikācijas talonu atbalstošs, autentifikācijas sniedzējs.
+
+
+ No session available, it either timed out or cookies are not enabled.
+ Sesija nav pieejama - vai nu tā beidzās, vai nu sīkdatnes nav iespējotas.
+
+
+ No token could be found.
+ Nevar atrast nevienu talonu.
+
+
+ Username could not be found.
+ Nevar atrast lietotājvārdu.
+
+
+ Account has expired.
+ Konta derīguma termiņš ir beidzies.
+
+
+ Credentials have expired.
+ Autentifikācijas datu derīguma termiņš ir beidzies.
+
+
+ Account is disabled.
+ Konts ir atspējots.
+
+
+ Account is locked.
+ Konts ir slēgts.
+
+
+
+
\ No newline at end of file
diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/ChainDecoderTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/ChainDecoderTest.php
index 7f7392e6a45b1..a6d3f40f2366d 100644
--- a/src/Symfony/Component/Serializer/Tests/Encoder/ChainDecoderTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Encoder/ChainDecoderTest.php
@@ -68,7 +68,7 @@ public function testDecode()
}
/**
- * @expectedException Symfony\Component\Serializer\Exception\RuntimeException
+ * @expectedException \Symfony\Component\Serializer\Exception\RuntimeException
*/
public function testDecodeUnsupportedFormat()
{
diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/ChainEncoderTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/ChainEncoderTest.php
index 6d3436b33d753..4fc6b25f9b47f 100644
--- a/src/Symfony/Component/Serializer/Tests/Encoder/ChainEncoderTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Encoder/ChainEncoderTest.php
@@ -69,7 +69,7 @@ public function testEncode()
}
/**
- * @expectedException Symfony\Component\Serializer\Exception\RuntimeException
+ * @expectedException \Symfony\Component\Serializer\Exception\RuntimeException
*/
public function testEncodeUnsupportedFormat()
{
diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php
index 97930115748d2..c87ab21b510a2 100644
--- a/src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php
@@ -57,7 +57,7 @@ public function decodeProvider()
/**
* @requires function json_last_error_msg
* @dataProvider decodeProviderException
- * @expectedException Symfony\Component\Serializer\Exception\UnexpectedValueException
+ * @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException
*/
public function testDecodeWithException($value)
{
diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncodeTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncodeTest.php
index 3e6fb7b6ec34e..d255b21d22e7f 100644
--- a/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncodeTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncodeTest.php
@@ -50,7 +50,7 @@ public function encodeProvider()
/**
* @requires function json_last_error_msg
- * @expectedException Symfony\Component\Serializer\Exception\UnexpectedValueException
+ * @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException
*/
public function testEncodeWithError()
{
diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php
index ca1c4e0f59f82..1b3548ed56947 100644
--- a/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php
@@ -15,7 +15,6 @@
use Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor;
use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor;
use Symfony\Component\PropertyInfo\PropertyInfoExtractor;
-use Symfony\Component\Serializer\Exception\UnexpectedValueException;
use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter;
use Symfony\Component\Serializer\Normalizer\ArrayDenormalizer;
use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
@@ -546,7 +545,7 @@ public function testDenomalizeRecursive()
}
/**
- * @expectedException UnexpectedValueException
+ * @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException
* @expectedExceptionMessage The type of the "date" attribute for class "Symfony\Component\Serializer\Tests\Normalizer\ObjectOuter" must be one of "DateTimeInterface" ("string" given).
*/
public function testRejectInvalidType()
@@ -558,7 +557,7 @@ public function testRejectInvalidType()
}
/**
- * @expectedException UnexpectedValueException
+ * @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException
* @expectedExceptionMessage The type of the key "a" must be "int" ("string" given).
*/
public function testRejectInvalidKey()
diff --git a/src/Symfony/Component/Templating/PhpEngine.php b/src/Symfony/Component/Templating/PhpEngine.php
index 0d34d9d384a6c..41b7daef4e18d 100644
--- a/src/Symfony/Component/Templating/PhpEngine.php
+++ b/src/Symfony/Component/Templating/PhpEngine.php
@@ -142,6 +142,7 @@ protected function evaluate(Storage $template, array $parameters = array())
throw new \InvalidArgumentException('Invalid parameter (view)');
}
+ // the view variable is exposed to the require file below
$view = $this;
if ($this->evalTemplate instanceof FileStorage) {
extract($this->evalParameters, EXTR_SKIP);
diff --git a/src/Symfony/Component/Translation/Dumper/MoFileDumper.php b/src/Symfony/Component/Translation/Dumper/MoFileDumper.php
index f9aae42d8c810..00a33d253a9a9 100644
--- a/src/Symfony/Component/Translation/Dumper/MoFileDumper.php
+++ b/src/Symfony/Component/Translation/Dumper/MoFileDumper.php
@@ -26,7 +26,7 @@ class MoFileDumper extends FileDumper
*/
public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array())
{
- $output = $sources = $targets = $sourceOffsets = $targetOffsets = '';
+ $sources = $targets = $sourceOffsets = $targetOffsets = '';
$offsets = array();
$size = 0;
diff --git a/src/Symfony/Component/Translation/Loader/MoFileLoader.php b/src/Symfony/Component/Translation/Loader/MoFileLoader.php
index 2fcada28477a7..025fcd89cc12c 100644
--- a/src/Symfony/Component/Translation/Loader/MoFileLoader.php
+++ b/src/Symfony/Component/Translation/Loader/MoFileLoader.php
@@ -80,7 +80,7 @@ protected function loadResource($resource)
$messages = array();
for ($i = 0; $i < $count; ++$i) {
- $singularId = $pluralId = null;
+ $pluralId = null;
$translated = null;
fseek($stream, $offsetId + $i * 8);
diff --git a/src/Symfony/Component/Validator/Constraint.php b/src/Symfony/Component/Validator/Constraint.php
index 4d6ab3eaac1db..fc5288d13bee7 100644
--- a/src/Symfony/Component/Validator/Constraint.php
+++ b/src/Symfony/Component/Validator/Constraint.php
@@ -129,6 +129,9 @@ public function __construct($options = null)
unset($options['value']);
}
+ if (is_array($options)) {
+ reset($options);
+ }
if (is_array($options) && count($options) > 0 && is_string(key($options))) {
foreach ($options as $option => $value) {
if (array_key_exists($option, $knownOptions)) {
diff --git a/src/Symfony/Component/Validator/Constraints/GroupSequence.php b/src/Symfony/Component/Validator/Constraints/GroupSequence.php
index 8a9627b016f96..7e85e2a07b36d 100644
--- a/src/Symfony/Component/Validator/Constraints/GroupSequence.php
+++ b/src/Symfony/Component/Validator/Constraints/GroupSequence.php
@@ -17,7 +17,7 @@
* When validating a group sequence, each group will only be validated if all
* of the previous groups in the sequence succeeded. For example:
*
- * $validator->validate($address, null, new GroupSequence('Basic', 'Strict'));
+ * $validator->validate($address, null, new GroupSequence(array('Basic', 'Strict')));
*
* In the first step, all constraints that belong to the group "Basic" will be
* validated. If none of the constraints fail, the validator will then validate
diff --git a/src/Symfony/Component/Validator/Constraints/UrlValidator.php b/src/Symfony/Component/Validator/Constraints/UrlValidator.php
index 9e6ce84644d64..7c998f530dab2 100644
--- a/src/Symfony/Component/Validator/Constraints/UrlValidator.php
+++ b/src/Symfony/Component/Validator/Constraints/UrlValidator.php
@@ -24,13 +24,13 @@ class UrlValidator extends ConstraintValidator
(%s):// # protocol
(([\pL\pN-]+:)?([\pL\pN-]+)@)? # basic auth
(
- ([\pL\pN\pS-\.])+(\.?([\pL]|xn\-\-[\pL\pN-]+)+\.?) # a domain name
- | # or
- \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} # a IP address
- | # or
+ ([\pL\pN\pS-\.])+(\.?([\pL\pN]|xn\-\-[\pL\pN-]+)+\.?) # a domain name
+ | # or
+ \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} # an IP address
+ | # or
\[
(?:(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-f]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,1}(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,2}(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,3}(?:(?:[0-9a-f]{1,4})))?::(?:(?:[0-9a-f]{1,4})):)(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,4}(?:(?:[0-9a-f]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,5}(?:(?:[0-9a-f]{1,4})))?::)(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,6}(?:(?:[0-9a-f]{1,4})))?::))))
- \] # a IPv6 address
+ \] # an IPv6 address
)
(:[0-9]+)? # a port (optional)
(/?|/\S+|\?\S*|\#\S*) # a /, nothing, a / with something, a query or a fragment
diff --git a/src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php b/src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php
index 20fe358678a34..f5894f49b093a 100644
--- a/src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php
+++ b/src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php
@@ -114,9 +114,27 @@ public function getMetadataFor($value)
$metadata->mergeConstraints($this->getMetadataFor($parent->name));
}
- // Include constraints from all implemented interfaces that have not been processed via parent class yet
- foreach ($metadata->getReflectionClass()->getInterfaces() as $interface) {
- if ('Symfony\Component\Validator\GroupSequenceProviderInterface' === $interface->name || ($parent && $parent->implementsInterface($interface->name))) {
+ $interfaces = $metadata->getReflectionClass()->getInterfaces();
+
+ $interfaces = array_filter($interfaces, function ($interface) use ($parent, $interfaces) {
+ $interfaceName = $interface->getName();
+
+ if ($parent && $parent->implementsInterface($interfaceName)) {
+ return false;
+ }
+
+ foreach ($interfaces as $i) {
+ if ($i !== $interface && $i->implementsInterface($interfaceName)) {
+ return false;
+ }
+ }
+
+ return true;
+ });
+
+ // Include constraints from all directly implemented interfaces
+ foreach ($interfaces as $interface) {
+ if ('Symfony\Component\Validator\GroupSequenceProviderInterface' === $interface->name) {
continue;
}
$metadata->mergeConstraints($this->getMetadataFor($interface->name));
diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf
new file mode 100644
index 0000000000000..2ad19cd283c18
--- /dev/null
+++ b/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf
@@ -0,0 +1,315 @@
+
+
+
+
+
+ This value should be false.
+ Šai vērtībai ir jābūt nepatiesai.
+
+
+ This value should be true.
+ Šai vērtībai ir jābūt patiesai.
+
+
+ This value should be of type {{ type }}.
+ Šīs vērtības tipam ir jābūt {{ type }}.
+
+
+ This value should be blank.
+ Šai vērtībai ir jābūt tukšai.
+
+
+ The value you selected is not a valid choice.
+ Vērtība, kuru jūs izvēlējāties nav derīga izvēle.
+
+
+ You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.
+ Jums nav jāveic izvēle.|Jums ir jāveic vismaz {{ limit }} izvēle.|Jums ir jāveic vismaz {{ limit }} izvēles.
+
+
+ You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.
+ Jums nav jāveic izvēle.|Jums ir jāveic ne vairāk kā {{ limit }} izvēle.|Jums ir jāveic ne vairāk kā {{ limit }} izvēles.
+
+
+ One or more of the given values is invalid.
+ Viena vai vairākas no dotajām vērtībām ir nederīgas.
+
+
+ This field was not expected.
+ Šis lauks netika gaidīts.
+
+
+ This field is missing.
+ Šis lauks ir pazudis.
+
+
+ This value is not a valid date.
+ Šī vērtība ir nederīgs datums.
+
+
+ This value is not a valid datetime.
+ Šī vērtība ir nederīgs datums un laiks
+
+
+ This value is not a valid email address.
+ Šī vērtība ir nederīga e-pasta adrese.
+
+
+ The file could not be found.
+ Fails nav atrasts.
+
+
+ The file is not readable.
+ Fails nav lasāms.
+
+
+ The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.
+ Fails ir pārāk liels ({{ size }} {{ suffix }}). Atļautais maksimālais izmērs ir {{ limit }} {{ suffix }}.
+
+
+ The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.
+ Faila mime tips nav derīgs ({{ type }}). Atļautie mime tipi ir {{ types }}.
+
+
+ This value should be {{ limit }} or less.
+ Šai vērtībai ir jābūt ne vairāk kā {{ limit }}.
+
+
+ This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.
+ Šīs vērtības garums ir 0 rakstzīmju.|Šī vērtība ir pārāk gara. Tai būtu jābūt ne vairāk kā {{ limit }} rakstzīmei.|Šī vērtība ir pārāk gara. Tai būtu jābūt ne vairāk kā {{ limit }} rakstzīmēm.
+
+
+ This value should be {{ limit }} or more.
+ Šai vērtībai ir jābūt ne mazāk kā {{ limit }}.
+
+
+ This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.
+ Šīs vērtības garums ir 0 rakstzīmju.|Šī vērtība ir pārāk īsa. Tai būtu jābūt ne mazāk kā {{ limit }} rakstzīmei.|Šī vērtība ir pārāk īsa. Tai būtu jābūt ne mazāk kā {{ limit }} rakstzīmēm.
+
+
+ This value should not be blank.
+ Šai vērtībai nav jābūt tukšai.
+
+
+ This value should not be null.
+ Šai vērtībai nav jābūt null.
+
+
+ This value should be null.
+ Šai vērtībai ir jābūt null.
+
+
+ This value is not valid.
+ Šī vērtība ir nederīga.
+
+
+ This value is not a valid time.
+ Šī vērtība ir nederīgs laiks.
+
+
+ This value is not a valid URL.
+ Šī vērtība ir nederīgs URL.
+
+
+ The two values should be equal.
+ Abām vērtībām jābūt vienādam.
+
+
+ The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.
+ Fails ir pārāk liels. Atļautais maksimālais izmērs ir {{ limit }} {{ suffix }}.
+
+
+ The file is too large.
+ Fails ir pārāk liels.
+
+
+ The file could not be uploaded.
+ Failu nevarēja augšupielādēt.
+
+
+ This value should be a valid number.
+ Šai vērtībai ir jābūt derīgam skaitlim.
+
+
+ This file is not a valid image.
+ Šis fails nav derīgs attēls.
+
+
+ This is not a valid IP address.
+ Šī nav derīga IP adrese.
+
+
+ This value is not a valid language.
+ Šī vērtība nav derīga valoda.
+
+
+ This value is not a valid locale.
+ Šī vērtība nav derīga lokalizācija.
+
+
+ This value is not a valid country.
+ Šī vērtība nav derīga valsts.
+
+
+ This value is already used.
+ Šī vērtība jau tiek izmantota.
+
+
+ The size of the image could not be detected.
+ Nevar noteikt attēla izmēru.
+
+
+ The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.
+ Attēla platums ir pārāk liels ({{ width }}px). Atļautais maksimālais platums ir {{ max_width }}px.
+
+
+ The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.
+ Attēla platums ir pārāk mazs ({{ width }}px). Minimālais sagaidāmais platums ir {{ min_width }}px.
+
+
+ The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.
+ Attēla augstums ir pārāk liels ({{ height }}px). Atļautais maksimālais augstums ir {{ max_height }}px.
+
+
+ The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.
+ Attēla augstums ir pārāk mazs ({{ height }}px). Minimālais sagaidāmais augstums ir {{ min_height }}px.
+
+
+ This value should be the user's current password.
+ Šai vērtībai ir jābūt lietotāja pašreizējai parolei.
+
+
+ This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.
+ Šīs vērtības garums ir 0 rakstzīmju.|Šai vērtībai ir jābūt tieši {{ limit }} rakstzīmei.|Šai vērtībai ir jābūt tieši {{ limit }} rakstzīmēm.
+
+
+ The file was only partially uploaded.
+ Fails bija tikai daļēji augšupielādēts.
+
+
+ No file was uploaded.
+ Fails netika augšupielādēts.
+
+
+ No temporary folder was configured in php.ini.
+ Pagaidu mape php.ini failā nav nokonfigurēta.
+
+
+ Cannot write temporary file to disk.
+ Nevar ierakstīt pagaidu failu uz diska.
+
+
+ A PHP extension caused the upload to fail.
+ PHP paplašinājums izraisīja augšupielādes neizdošanos.
+
+
+ This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.
+ Šis krājums satur 0 elementu.|Šim krājumam jāsatur vismaz {{ limit }} elementu.|Šim krājumam jāsatur vismaz {{ limit }} elementus.
+
+
+ This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.
+ Šis krājums satur 0 elementu.|Šim krājumam jāsatur ne vairāk kā {{ limit }} elementu.|Šim krājumam jāsatur ne vairāk kā {{ limit }} elementus.
+
+
+ This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.
+ Šis krājums satur 0 elementu.|Šim krājumam jāsatur tieši {{ limit }} elementu.|Šim krājumam jāsatur tieši {{ limit }} elementus.
+
+
+ Invalid card number.
+ Nederīgs kartes numurs.
+
+
+ Unsupported card type or invalid card number.
+ Neatbalstīts kartes tips vai nederīgs kartes numurs.
+
+
+ This is not a valid International Bank Account Number (IBAN).
+ Šis nav derīgs starptautisks banku konta numurs (IBAN).
+
+
+ This value is not a valid ISBN-10.
+ Šī vērtība nav derīgs ISBN-10 numurs.
+
+
+ This value is not a valid ISBN-13.
+ Šī vērtība nav derīgs ISBN-13 numurs
+
+
+ This value is neither a valid ISBN-10 nor a valid ISBN-13.
+ Šī vērtība neatbilst ne derīgam ISBN-10 numuram, ne derīgm ISBN-13 numuram.
+
+
+ This value is not a valid ISSN.
+ Šī vērtība nav derīgs ISSN numurs
+
+
+ This value is not a valid currency.
+ Šī vērtība nav derīga valūta
+
+
+ This value should be equal to {{ compared_value }}.
+ Šai vērtībai ir jābūt vienādai ar {{ compared_value }}.
+
+
+ This value should be greater than {{ compared_value }}.
+ Šai vērtībai ir jābūt lielākai par {{ compared_value }}.
+
+
+ This value should be greater than or equal to {{ compared_value }}.
+ Šai vērtībai ir jābūt lielākai vai vienādai ar {{ compared_value }}.
+
+
+ This value should be identical to {{ compared_value_type }} {{ compared_value }}.
+ Šai vērtībai ir jābūt identiskai ar {{ compared_value_type }} {{ compared_value }}.
+
+
+ This value should be less than {{ compared_value }}.
+ Šai vērtībai ir jābūt mazākai par {{ compared_value }}.
+
+
+ This value should be less than or equal to {{ compared_value }}.
+ TŠai vērtībai ir jābūt mazākai vai vienādai ar {{ compared_value }}.
+
+
+ This value should not be equal to {{ compared_value }}.
+ Šai vērtībai ir jābūt vienādai ar {{ compared_value }}.
+
+
+ This value should not be identical to {{ compared_value_type }} {{ compared_value }}.
+ Šai vērtībai nav jābūt identiskai ar {{ compared_value_type }} {{ compared_value }}.
+
+
+ The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.
+ Attēla attiecība ir pārāk liela ({{ ratio }}). Atļautā maksimālā attiecība ir {{ max_ratio }}.
+
+
+ The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.
+ Attēla attiecība ir pārāk maza ({{ ratio }}). Minimālā sagaidāmā attiecība ir {{ min_ratio }}.
+
+
+ The image is square ({{ width }}x{{ height }}px). Square images are not allowed.
+ Šis attēls ir kvadrāts ({{ width }}x{{ height }}px). Kvadrātveida attēli nav atļauti.
+
+
+ The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.
+ Attēls ir orientēts kā ainava ({{ width }}x{{ height }}px). Attēli, kas ir orientēti kā ainavas nav atļauti.
+
+
+ The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.
+ Attēls ir orientēts kā portrets ({{ width }}x{{ height }}px). Attēli, kas ir orientēti kā portreti nav atļauti.
+
+
+ An empty file is not allowed.
+ Tukšs fails nav atļauts.
+
+
+ The host could not be resolved.
+ Resursdatora nosaukumu nevar atrisināt.
+
+
+ This value does not match the expected {{ charset }} charset.
+ Šī vērtība neatbilst sagaidāmajai rakstzīmju kopai {{ charset }}.
+
+
+
+
diff --git a/src/Symfony/Component/Validator/Tests/ConstraintTest.php b/src/Symfony/Component/Validator/Tests/ConstraintTest.php
index f63570c5d2944..d473f14f651ac 100644
--- a/src/Symfony/Component/Validator/Tests/ConstraintTest.php
+++ b/src/Symfony/Component/Validator/Tests/ConstraintTest.php
@@ -206,4 +206,35 @@ public function testGetErrorNameForUnknownCode()
{
Constraint::getErrorName(1);
}
+
+ public function testOptionsAsDefaultOption()
+ {
+ $constraint = new ConstraintA($options = array('value1'));
+
+ $this->assertEquals($options, $constraint->property2);
+
+ $constraint = new ConstraintA($options = array('value1', 'property1' => 'value2'));
+
+ $this->assertEquals($options, $constraint->property2);
+ }
+
+ /**
+ * @expectedException \Symfony\Component\Validator\Exception\InvalidOptionsException
+ * @expectedExceptionMessage The options "0", "5" do not exist
+ */
+ public function testInvalidOptions()
+ {
+ new ConstraintA(array('property2' => 'foo', 'bar', 5 => 'baz'));
+ }
+
+ public function testOptionsWithInvalidInternalPointer()
+ {
+ $options = array('property1' => 'foo');
+ next($options);
+ next($options);
+
+ $constraint = new ConstraintA($options);
+
+ $this->assertEquals('foo', $constraint->property1);
+ }
}
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/IpValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/IpValidatorTest.php
index 22f440cfa502b..0d43d6ce26c0a 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/IpValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/IpValidatorTest.php
@@ -215,7 +215,7 @@ public function getInvalidReservedIpsV4()
{
return array(
array('0.0.0.0'),
- array('224.0.0.1'),
+ array('240.0.0.1'),
array('255.255.255.255'),
);
}
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php
index 1a8c9d52c93ad..041aeedb49f47 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php
@@ -84,6 +84,7 @@ public function getValidUrls()
array('http://www.symfony.com/doc/current/book/validation.html#supported-constraints'),
array('http://very.long.domain.name.com/'),
array('http://localhost/'),
+ array('http://myhost123/'),
array('http://127.0.0.1/'),
array('http://127.0.0.1:80/'),
array('http://[::1]/'),
diff --git a/src/Symfony/Component/Validator/Tests/Fixtures/Entity.php b/src/Symfony/Component/Validator/Tests/Fixtures/Entity.php
index cbe563bfebf8d..b93146b06d159 100644
--- a/src/Symfony/Component/Validator/Tests/Fixtures/Entity.php
+++ b/src/Symfony/Component/Validator/Tests/Fixtures/Entity.php
@@ -19,7 +19,7 @@
* @Assert\GroupSequence({"Foo", "Entity"})
* @Assert\Callback({"Symfony\Component\Validator\Tests\Fixtures\CallbackClass", "callback"})
*/
-class Entity extends EntityParent
+class Entity extends EntityParent implements EntityInterfaceB
{
/**
* @Assert\NotNull
diff --git a/src/Symfony/Component/Validator/Tests/Fixtures/EntityInterface.php b/src/Symfony/Component/Validator/Tests/Fixtures/EntityInterfaceA.php
similarity index 91%
rename from src/Symfony/Component/Validator/Tests/Fixtures/EntityInterface.php
rename to src/Symfony/Component/Validator/Tests/Fixtures/EntityInterfaceA.php
index 2901f26386b4e..a0afcf8163110 100644
--- a/src/Symfony/Component/Validator/Tests/Fixtures/EntityInterface.php
+++ b/src/Symfony/Component/Validator/Tests/Fixtures/EntityInterfaceA.php
@@ -11,6 +11,6 @@
namespace Symfony\Component\Validator\Tests\Fixtures;
-interface EntityInterface
+interface EntityInterfaceA
{
}
diff --git a/src/Symfony/Component/Validator/Tests/Fixtures/EntityInterfaceB.php b/src/Symfony/Component/Validator/Tests/Fixtures/EntityInterfaceB.php
new file mode 100644
index 0000000000000..93b389414fadf
--- /dev/null
+++ b/src/Symfony/Component/Validator/Tests/Fixtures/EntityInterfaceB.php
@@ -0,0 +1,16 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Validator\Tests\Fixtures;
+
+interface EntityInterfaceB extends EntityParentInterface
+{
+}
diff --git a/src/Symfony/Component/Validator/Tests/Fixtures/EntityParent.php b/src/Symfony/Component/Validator/Tests/Fixtures/EntityParent.php
index acbec3d32e88b..4674f8b35a226 100644
--- a/src/Symfony/Component/Validator/Tests/Fixtures/EntityParent.php
+++ b/src/Symfony/Component/Validator/Tests/Fixtures/EntityParent.php
@@ -13,7 +13,7 @@
use Symfony\Component\Validator\Constraints\NotNull;
-class EntityParent implements EntityInterface
+class EntityParent implements EntityInterfaceA
{
protected $firstName;
private $internal;
diff --git a/src/Symfony/Component/Validator/Tests/Fixtures/EntityParentInterface.php b/src/Symfony/Component/Validator/Tests/Fixtures/EntityParentInterface.php
new file mode 100644
index 0000000000000..3aad6fec5f76e
--- /dev/null
+++ b/src/Symfony/Component/Validator/Tests/Fixtures/EntityParentInterface.php
@@ -0,0 +1,16 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Validator\Tests\Fixtures;
+
+interface EntityParentInterface
+{
+}
diff --git a/src/Symfony/Component/Validator/Tests/Mapping/Factory/LazyLoadingMetadataFactoryTest.php b/src/Symfony/Component/Validator/Tests/Mapping/Factory/LazyLoadingMetadataFactoryTest.php
index c78d2a72c8d60..c1aaa9f8c7bf2 100644
--- a/src/Symfony/Component/Validator/Tests/Mapping/Factory/LazyLoadingMetadataFactoryTest.php
+++ b/src/Symfony/Component/Validator/Tests/Mapping/Factory/LazyLoadingMetadataFactoryTest.php
@@ -18,17 +18,19 @@
class LazyLoadingMetadataFactoryTest extends \PHPUnit_Framework_TestCase
{
- const CLASSNAME = 'Symfony\Component\Validator\Tests\Fixtures\Entity';
- const PARENTCLASS = 'Symfony\Component\Validator\Tests\Fixtures\EntityParent';
- const INTERFACECLASS = 'Symfony\Component\Validator\Tests\Fixtures\EntityInterface';
+ const CLASS_NAME = 'Symfony\Component\Validator\Tests\Fixtures\Entity';
+ const PARENT_CLASS = 'Symfony\Component\Validator\Tests\Fixtures\EntityParent';
+ const INTERFACE_A_CLASS = 'Symfony\Component\Validator\Tests\Fixtures\EntityInterfaceA';
+ const INTERFACE_B_CLASS = 'Symfony\Component\Validator\Tests\Fixtures\EntityInterfaceB';
+ const PARENT_INTERFACE_CLASS = 'Symfony\Component\Validator\Tests\Fixtures\EntityParentInterface';
public function testLoadClassMetadataWithInterface()
{
$factory = new LazyLoadingMetadataFactory(new TestLoader());
- $metadata = $factory->getMetadataFor(self::PARENTCLASS);
+ $metadata = $factory->getMetadataFor(self::PARENT_CLASS);
$constraints = array(
- new ConstraintA(array('groups' => array('Default', 'EntityInterface', 'EntityParent'))),
+ new ConstraintA(array('groups' => array('Default', 'EntityInterfaceA', 'EntityParent'))),
new ConstraintA(array('groups' => array('Default', 'EntityParent'))),
);
@@ -38,12 +40,12 @@ public function testLoadClassMetadataWithInterface()
public function testMergeParentConstraints()
{
$factory = new LazyLoadingMetadataFactory(new TestLoader());
- $metadata = $factory->getMetadataFor(self::CLASSNAME);
+ $metadata = $factory->getMetadataFor(self::CLASS_NAME);
$constraints = array(
new ConstraintA(array('groups' => array(
'Default',
- 'EntityInterface',
+ 'EntityInterfaceA',
'EntityParent',
'Entity',
))),
@@ -52,6 +54,17 @@ public function testMergeParentConstraints()
'EntityParent',
'Entity',
))),
+ new ConstraintA(array('groups' => array(
+ 'Default',
+ 'EntityParentInterface',
+ 'EntityInterfaceB',
+ 'Entity',
+ ))),
+ new ConstraintA(array('groups' => array(
+ 'Default',
+ 'EntityInterfaceB',
+ 'Entity',
+ ))),
new ConstraintA(array('groups' => array(
'Default',
'Entity',
@@ -67,34 +80,36 @@ public function testWriteMetadataToCache()
$factory = new LazyLoadingMetadataFactory(new TestLoader(), $cache);
$parentClassConstraints = array(
- new ConstraintA(array('groups' => array('Default', 'EntityInterface', 'EntityParent'))),
+ new ConstraintA(array('groups' => array('Default', 'EntityInterfaceA', 'EntityParent'))),
new ConstraintA(array('groups' => array('Default', 'EntityParent'))),
);
- $interfaceConstraints = array(new ConstraintA(array('groups' => array('Default', 'EntityInterface'))));
+ $interfaceAConstraints = array(
+ new ConstraintA(array('groups' => array('Default', 'EntityInterfaceA'))),
+ );
$cache->expects($this->never())
->method('has');
$cache->expects($this->exactly(2))
->method('read')
->withConsecutive(
- array($this->equalTo(self::PARENTCLASS)),
- array($this->equalTo(self::INTERFACECLASS))
+ array($this->equalTo(self::PARENT_CLASS)),
+ array($this->equalTo(self::INTERFACE_A_CLASS))
)
->will($this->returnValue(false));
$cache->expects($this->exactly(2))
->method('write')
->withConsecutive(
- $this->callback(function ($metadata) use ($interfaceConstraints) {
- return $interfaceConstraints == $metadata->getConstraints();
+ $this->callback(function ($metadata) use ($interfaceAConstraints) {
+ return $interfaceAConstraints == $metadata->getConstraints();
}),
$this->callback(function ($metadata) use ($parentClassConstraints) {
return $parentClassConstraints == $metadata->getConstraints();
})
);
- $metadata = $factory->getMetadataFor(self::PARENTCLASS);
+ $metadata = $factory->getMetadataFor(self::PARENT_CLASS);
- $this->assertEquals(self::PARENTCLASS, $metadata->getClassName());
+ $this->assertEquals(self::PARENT_CLASS, $metadata->getClassName());
$this->assertEquals($parentClassConstraints, $metadata->getConstraints());
}
@@ -104,7 +119,7 @@ public function testReadMetadataFromCache()
$cache = $this->getMock('Symfony\Component\Validator\Mapping\Cache\CacheInterface');
$factory = new LazyLoadingMetadataFactory($loader, $cache);
- $metadata = new ClassMetadata(self::PARENTCLASS);
+ $metadata = new ClassMetadata(self::PARENT_CLASS);
$metadata->addConstraint(new ConstraintA());
$loader->expects($this->never())
@@ -116,7 +131,7 @@ public function testReadMetadataFromCache()
->method('read')
->will($this->returnValue($metadata));
- $this->assertEquals($metadata, $factory->getMetadataFor(self::PARENTCLASS));
+ $this->assertEquals($metadata, $factory->getMetadataFor(self::PARENT_CLASS));
}
}
diff --git a/src/Symfony/Component/Validator/Tests/Validator/AbstractTest.php b/src/Symfony/Component/Validator/Tests/Validator/AbstractTest.php
index 3b13c09618f36..1141779ca3551 100644
--- a/src/Symfony/Component/Validator/Tests/Validator/AbstractTest.php
+++ b/src/Symfony/Component/Validator/Tests/Validator/AbstractTest.php
@@ -37,6 +37,7 @@ abstract class AbstractTest extends AbstractValidatorTest
/**
* @param MetadataFactoryInterface $metadataFactory
+ * @param array $objectInitializers
*
* @return ValidatorInterface
*/
diff --git a/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php b/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php
index 76c069dd06be6..2780c86a41485 100644
--- a/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php
+++ b/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php
@@ -73,7 +73,7 @@ public static function castType(\ReflectionType $c, array $a, Stub $stub, $isNes
$prefix = Caster::PREFIX_VIRTUAL;
$a += array(
- $prefix.'type' => $c->__toString(),
+ $prefix.'name' => method_exists('ReflectionType', 'getName') ? $c->getName() : $c->__toString(),
$prefix.'allowsNull' => $c->allowsNull(),
$prefix.'isBuiltin' => $c->isBuiltin(),
);
@@ -157,7 +157,7 @@ public static function castFunctionAbstract(\ReflectionFunctionAbstract $c, arra
));
if (isset($a[$prefix.'returnType'])) {
- $a[$prefix.'returnType'] = (string) $a[$prefix.'returnType'];
+ $a[$prefix.'returnType'] = method_exists('ReflectionType', 'getName') ? $a[$prefix.'returnType']->getName() : $a[$prefix.'returnType']->__toString();
}
if (isset($a[$prefix.'this'])) {
$a[$prefix.'this'] = new CutStub($a[$prefix.'this']);
@@ -213,12 +213,13 @@ public static function castParameter(\ReflectionParameter $c, array $a, Stub $st
'position' => 'getPosition',
'isVariadic' => 'isVariadic',
'byReference' => 'isPassedByReference',
+ 'allowsNull' => 'allowsNull',
));
try {
if (method_exists($c, 'hasType')) {
if ($c->hasType()) {
- $a[$prefix.'typeHint'] = $c->getType()->__toString();
+ $a[$prefix.'typeHint'] = method_exists('ReflectionType', 'getName') ? $c->getType()->getName() : $c->getType()->__toString();
}
} else {
$v = explode(' ', $c->__toString(), 6);
@@ -231,15 +232,22 @@ public static function castParameter(\ReflectionParameter $c, array $a, Stub $st
$a[$prefix.'typeHint'] = $m[1];
}
}
+ if (!isset($a[$prefix.'typeHint'])) {
+ unset($a[$prefix.'allowsNull']);
+ }
try {
$a[$prefix.'default'] = $v = $c->getDefaultValue();
if (method_exists($c, 'isDefaultValueConstant') && $c->isDefaultValueConstant()) {
$a[$prefix.'default'] = new ConstStub($c->getDefaultValueConstantName(), $v);
}
+ if (null === $v) {
+ unset($a[$prefix.'allowsNull']);
+ }
} catch (\ReflectionException $e) {
- if (isset($a[$prefix.'typeHint']) && $c->allowsNull()) {
+ if (isset($a[$prefix.'typeHint']) && $c->allowsNull() && !method_exists('ReflectionType', 'getName')) {
$a[$prefix.'default'] = null;
+ unset($a[$prefix.'allowsNull']);
}
}
diff --git a/src/Symfony/Component/VarDumper/Cloner/VarCloner.php b/src/Symfony/Component/VarDumper/Cloner/VarCloner.php
index fe1763c1a5664..6a3b451bda7f7 100644
--- a/src/Symfony/Component/VarDumper/Cloner/VarCloner.php
+++ b/src/Symfony/Component/VarDumper/Cloner/VarCloner.php
@@ -25,7 +25,6 @@ class VarCloner extends AbstractCloner
protected function doClone($var)
{
$useExt = $this->useExt;
- $i = 0; // Current iteration position in $queue
$len = 1; // Length of $queue
$pos = 0; // Number of cloned items past the first level
$refsCounter = 0; // Hard references counter
diff --git a/src/Symfony/Component/VarDumper/Dumper/AbstractDumper.php b/src/Symfony/Component/VarDumper/Dumper/AbstractDumper.php
index 685a7ffd3a34c..f3e951f3932af 100644
--- a/src/Symfony/Component/VarDumper/Dumper/AbstractDumper.php
+++ b/src/Symfony/Component/VarDumper/Dumper/AbstractDumper.php
@@ -146,8 +146,9 @@ protected function dumpLine($depth)
/**
* Generic line dumper callback.
*
- * @param string $line The line to write
- * @param int $depth The recursive depth in the dumped structure
+ * @param string $line The line to write
+ * @param int $depth The recursive depth in the dumped structure
+ * @param string $indentPad The line indent pad
*/
protected function echoLine($line, $depth, $indentPad)
{
diff --git a/src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php b/src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php
index 0b69eac1ddbf5..d8663e84e8e3d 100644
--- a/src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php
+++ b/src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php
@@ -288,8 +288,7 @@ function isCtrlKey(e) {
};
})(document);
-
-