Skip to content

Commit e7b555e

Browse files
Merge branch '2.8' into 3.3
* 2.8: [HttpFoundation] Fix FileBag issue with associative arrays fix the phpdoc that is not really inherited from response Minor docblock cleanup Remove redundant sprintf arguments.
2 parents e80cf9c + 865622e commit e7b555e

File tree

15 files changed

+46
-36
lines changed

15 files changed

+46
-36
lines changed

src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,6 @@
3737
*/
3838
class DoctrineTokenProvider implements TokenProviderInterface
3939
{
40-
/**
41-
* Doctrine DBAL database connection
42-
* F.ex. service id: doctrine.dbal.default_connection.
43-
*
44-
* @var Connection
45-
*/
4640
private $conn;
4741

4842
public function __construct(Connection $conn)

src/Symfony/Bridge/Twig/Extension/CodeExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ public function abbrMethod($method)
7070
list($class, $method) = explode('::', $method, 2);
7171
$result = sprintf('%s::%s()', $this->abbrClass($class), $method);
7272
} elseif ('Closure' === $method) {
73-
$result = sprintf('<abbr title="%s">%s</abbr>', $method, $method);
73+
$result = sprintf('<abbr title="%s">%1$s</abbr>', $method);
7474
} else {
75-
$result = sprintf('<abbr title="%s">%s</abbr>()', $method, $method);
75+
$result = sprintf('<abbr title="%s">%1$s</abbr>()', $method);
7676
}
7777

7878
return $result;

src/Symfony/Bridge/Twig/Tests/Node/FormThemeTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ public function testCompile()
7474
protected function getVariableGetter($name)
7575
{
7676
if (\PHP_VERSION_ID >= 70000) {
77-
return sprintf('($context["%s"] ?? null)', $name, $name);
77+
return sprintf('($context["%s"] ?? null)', $name);
7878
}
7979

80-
return sprintf('(isset($context["%s"]) ? $context["%s"] : null)', $name, $name);
80+
return sprintf('(isset($context["%s"]) ? $context["%1$s"] : null)', $name);
8181
}
8282
}

src/Symfony/Bridge/Twig/Tests/Node/SearchAndRenderBlockNodeTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,9 @@ public function testCompileLabelWithLabelThatEvaluatesToNullAndAttributes()
272272
protected function getVariableGetter($name)
273273
{
274274
if (\PHP_VERSION_ID >= 70000) {
275-
return sprintf('($context["%s"] ?? null)', $name, $name);
275+
return sprintf('($context["%s"] ?? null)', $name);
276276
}
277277

278-
return sprintf('(isset($context["%s"]) ? $context["%s"] : null)', $name, $name);
278+
return sprintf('(isset($context["%s"]) ? $context["%1$s"] : null)', $name);
279279
}
280280
}

src/Symfony/Bridge/Twig/Tests/Node/TransNodeTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,22 @@ public function testCompileStrict()
4545
protected function getVariableGetterWithoutStrictCheck($name)
4646
{
4747
if (\PHP_VERSION_ID >= 70000) {
48-
return sprintf('($context["%s"] ?? null)', $name, $name);
48+
return sprintf('($context["%s"] ?? null)', $name);
4949
}
5050

51-
return sprintf('(isset($context["%s"]) ? $context["%s"] : null)', $name, $name);
51+
return sprintf('(isset($context["%s"]) ? $context["%1$s"] : null)', $name);
5252
}
5353

5454
protected function getVariableGetterWithStrictCheck($name)
5555
{
5656
if (Environment::MAJOR_VERSION >= 2) {
57-
return sprintf('(isset($context["%s"]) || array_key_exists("%s", $context) ? $context["%s"] : (function () { throw new Twig_Error_Runtime(\'Variable "%s" does not exist.\', 0, $this->getSourceContext()); })())', $name, $name, $name, $name);
57+
return sprintf('(isset($context["%s"]) || array_key_exists("%1$s", $context) ? $context["%1$s"] : (function () { throw new Twig_Error_Runtime(\'Variable "%1$s" does not exist.\', 0, $this->getSourceContext()); })())', $name);
5858
}
5959

6060
if (\PHP_VERSION_ID >= 70000) {
61-
return sprintf('($context["%s"] ?? $this->getContext($context, "%s"))', $name, $name, $name);
61+
return sprintf('($context["%s"] ?? $this->getContext($context, "%1$s"))', $name);
6262
}
6363

64-
return sprintf('(isset($context["%s"]) ? $context["%s"] : $this->getContext($context, "%s"))', $name, $name, $name);
64+
return sprintf('(isset($context["%s"]) ? $context["%1$s"] : $this->getContext($context, "%1$s"))', $name);
6565
}
6666
}

src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ public function abbrMethod($method)
6161
list($class, $method) = explode('::', $method, 2);
6262
$result = sprintf('%s::%s()', $this->abbrClass($class), $method);
6363
} elseif ('Closure' === $method) {
64-
$result = sprintf('<abbr title="%s">%s</abbr>', $method, $method);
64+
$result = sprintf('<abbr title="%s">%1$s</abbr>', $method);
6565
} else {
66-
$result = sprintf('<abbr title="%s">%s</abbr>()', $method, $method);
66+
$result = sprintf('<abbr title="%s">%1$s</abbr>()', $method);
6767
}
6868

6969
return $result;

src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,6 @@ private function configureDbalAclProvider(array $config, ContainerBuilder $conta
180180
$container->setParameter('security.acl.dbal.sid_table_name', $config['tables']['security_identity']);
181181
}
182182

183-
/**
184-
* Loads the web configuration.
185-
*/
186183
private function createRoleHierarchy(array $config, ContainerBuilder $container)
187184
{
188185
if (!isset($config['role_hierarchy']) || 0 === count($config['role_hierarchy'])) {

src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@
3030
*/
3131
class TwigExtension extends Extension
3232
{
33-
/**
34-
* Responds to the twig configuration parameter.
35-
*/
3633
public function load(array $configs, ContainerBuilder $container)
3734
{
3835
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));

src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
namespace Symfony\Component\BrowserKit\Tests;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Component\BrowserKit\CookieJar;
1615
use Symfony\Component\BrowserKit\Cookie;
16+
use Symfony\Component\BrowserKit\CookieJar;
1717
use Symfony\Component\BrowserKit\Response;
1818

1919
class CookieJarTest extends TestCase
@@ -94,7 +94,7 @@ public function testUpdateFromSetCookieWithMultipleCookies()
9494
{
9595
$timestamp = time() + 3600;
9696
$date = gmdate('D, d M Y H:i:s \G\M\T', $timestamp);
97-
$setCookies = array(sprintf('foo=foo; expires=%s; domain=.symfony.com; path=/, bar=bar; domain=.blog.symfony.com, PHPSESSID=id; expires=%s', $date, $date));
97+
$setCookies = array(sprintf('foo=foo; expires=%s; domain=.symfony.com; path=/, bar=bar; domain=.blog.symfony.com, PHPSESSID=id; expires=%1$s', $date));
9898

9999
$cookieJar = new CookieJar();
100100
$cookieJar->updateFromSetCookie($setCookies);

src/Symfony/Component/DomCrawler/Crawler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ public function selectImage($value)
743743
public function selectButton($value)
744744
{
745745
$translate = 'translate(@type, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz")';
746-
$xpath = sprintf('descendant-or-self::input[((contains(%s, "submit") or contains(%s, "button")) and contains(concat(\' \', normalize-space(string(@value)), \' \'), %s)) ', $translate, $translate, static::xpathLiteral(' '.$value.' ')).
746+
$xpath = sprintf('descendant-or-self::input[((contains(%s, "submit") or contains(%1$s, "button")) and contains(concat(\' \', normalize-space(string(@value)), \' \'), %s)) ', $translate, static::xpathLiteral(' '.$value.' ')).
747747
sprintf('or (contains(%s, "image") and contains(concat(\' \', normalize-space(string(@alt)), \' \'), %s)) or @id=%s or @name=%s] ', $translate, static::xpathLiteral(' '.$value.' '), static::xpathLiteral($value), static::xpathLiteral($value)).
748748
sprintf('| descendant-or-self::button[contains(concat(\' \', normalize-space(string(.)), \' \'), %s) or @id=%s or @name=%s]', static::xpathLiteral(' '.$value.' '), static::xpathLiteral($value), static::xpathLiteral($value));
749749

0 commit comments

Comments
 (0)