Merge branch '2.3' into 2.6
* 2.3: CS: fix some license headers CS: Ensure there is no code on the same line as the PHP open tag and it is followed by a blankline use visited lookup with reference to gain performance Replace GET parameters when changed Conflicts: src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
This commit is contained in:
commit
2559628654
6
.php_cs
Normal file
6
.php_cs
Normal file
@ -0,0 +1,6 @@
|
||||
<?php
|
||||
|
||||
return Symfony\CS\Config\Config::create()
|
||||
->setUsingLinter(false)
|
||||
->setUsingCache(true)
|
||||
;
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
|
@ -77,7 +77,7 @@ class PhpStringTokenParser
|
||||
if ('\'' === $str[$bLength]) {
|
||||
return str_replace(
|
||||
array('\\\\', '\\\''),
|
||||
array( '\\', '\''),
|
||||
array('\\', '\''),
|
||||
substr($str, $bLength + 1, -1)
|
||||
);
|
||||
} else {
|
||||
|
@ -1235,7 +1235,7 @@ EOF;
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function hasReference($id, array $arguments, $deep = false, array $visited = array())
|
||||
private function hasReference($id, array $arguments, $deep = false, array &$visited = array())
|
||||
{
|
||||
foreach ($arguments as $argument) {
|
||||
if (is_array($argument)) {
|
||||
|
@ -197,9 +197,18 @@ class Form extends Link implements \ArrayAccess
|
||||
{
|
||||
$uri = parent::getUri();
|
||||
|
||||
if (!in_array($this->getMethod(), array('POST', 'PUT', 'DELETE', 'PATCH')) && $queryString = http_build_query($this->getValues(), null, '&')) {
|
||||
$sep = false === strpos($uri, '?') ? '?' : '&';
|
||||
$uri .= $sep.$queryString;
|
||||
if (!in_array($this->getMethod(), array('POST', 'PUT', 'DELETE', 'PATCH'))) {
|
||||
$query = parse_url($uri, PHP_URL_QUERY);
|
||||
$currentParameters = array();
|
||||
if ($query) {
|
||||
parse_str($query, $currentParameters);
|
||||
}
|
||||
|
||||
$queryString = http_build_query(array_merge($currentParameters, $this->getValues()), null, '&');
|
||||
|
||||
$pos = strpos($uri, '?');
|
||||
$base = false === $pos ? $uri : substr($uri, 0, $pos);
|
||||
$uri = rtrim($base.'?'.$queryString, '?');
|
||||
}
|
||||
|
||||
return $uri;
|
||||
|
@ -593,6 +593,12 @@ class FormTest extends \PHPUnit_Framework_TestCase
|
||||
array(),
|
||||
'/foo?bar=bar&foo=foo',
|
||||
),
|
||||
array(
|
||||
'replaces query values with the form values',
|
||||
'<form action="/foo?bar=bar"><input type="text" name="bar" value="foo" /><input type="submit" /></form>',
|
||||
array(),
|
||||
'/foo?bar=foo',
|
||||
),
|
||||
array(
|
||||
'returns an empty URI if the action is empty',
|
||||
'<form><input type="submit" /></form>',
|
||||
|
@ -2,12 +2,12 @@
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\ChoiceList;
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
|
@ -3,7 +3,7 @@
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
|
@ -1,9 +1,4 @@
|
||||
<?php
|
||||
namespace Symfony\Component\Security\Http\RememberMe;
|
||||
|
||||
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
@ -14,6 +9,12 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Security\Http\RememberMe;
|
||||
|
||||
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
/**
|
||||
* Interface that needs to be implemented by classes which provide remember-me
|
||||
* capabilities.
|
||||
|
Reference in New Issue
Block a user