Merge branch '2.3' into 2.4
* 2.3: Minor doc fix. Simplified the way to update PHPUnit to the latest version [Process] Minor README update [HttpFoundation] Basic auth in url is broken when using PHP CGI/FPM Fixed a html error "Element ul is not closed" in logger.html.twig [HttpFoundation] Officialize the 308 redirect RFC issue #10808 crawler test Empty select with attribute name="foo[]" bug fix Fixed contextually wrong translation
This commit is contained in:
commit
ec1065ac97
@ -23,7 +23,7 @@ before_script:
|
||||
- sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;'
|
||||
- sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;'
|
||||
- COMPOSER_ROOT_VERSION=dev-master composer --prefer-source --dev install
|
||||
- wget https://phar.phpunit.de/phpunit.phar && rm `which phpunit` && sudo cp phpunit.phar /usr/local/bin/phpunit && sudo chmod +x /usr/local/bin/phpunit
|
||||
- phpunit --self-update
|
||||
|
||||
script:
|
||||
- ls -d src/Symfony/*/* | parallel --gnu --keep-order 'echo "Running {} tests"; phpunit --exclude-group tty,benchmark {};' || false
|
||||
|
@ -113,7 +113,9 @@
|
||||
|
||||
<li>Called from {{ call.file is defined and call.line is defined ? call.file|format_file(call.line, from) : from|raw }}</li>
|
||||
|
||||
{{ index == log.context.stack|length - 1 ? '</ul>' : '' }}
|
||||
{% if index == log.context.stack|length - 1 %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{{ log.priorityName }} - {{ log.message }}
|
||||
|
@ -146,9 +146,11 @@ class Form extends Link implements \ArrayAccess
|
||||
$values = array();
|
||||
foreach ($this->getValues() as $name => $value) {
|
||||
$qs = http_build_query(array($name => $value), '', '&');
|
||||
parse_str($qs, $expandedValue);
|
||||
$varName = substr($name, 0, strlen(key($expandedValue)));
|
||||
$values = array_replace_recursive($values, array($varName => current($expandedValue)));
|
||||
if (!empty($qs)) {
|
||||
parse_str($qs, $expandedValue);
|
||||
$varName = substr($name, 0, strlen(key($expandedValue)));
|
||||
$values = array_replace_recursive($values, array($varName => current($expandedValue)));
|
||||
}
|
||||
}
|
||||
|
||||
return $values;
|
||||
@ -169,9 +171,11 @@ class Form extends Link implements \ArrayAccess
|
||||
$values = array();
|
||||
foreach ($this->getFiles() as $name => $value) {
|
||||
$qs = http_build_query(array($name => $value), '', '&');
|
||||
parse_str($qs, $expandedValue);
|
||||
$varName = substr($name, 0, strlen(key($expandedValue)));
|
||||
$values = array_replace_recursive($values, array($varName => current($expandedValue)));
|
||||
if (!empty($qs)) {
|
||||
parse_str($qs, $expandedValue);
|
||||
$varName = substr($name, 0, strlen(key($expandedValue)));
|
||||
$values = array_replace_recursive($values, array($varName => current($expandedValue)));
|
||||
}
|
||||
}
|
||||
|
||||
return $values;
|
||||
|
@ -394,8 +394,8 @@ class FormTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testGetValues()
|
||||
{
|
||||
$form = $this->createForm('<form><input type="text" name="foo[bar]" value="foo" /><input type="text" name="bar" value="bar" /><input type="submit" /></form>');
|
||||
$this->assertEquals(array('foo[bar]' => 'foo', 'bar' => 'bar'), $form->getValues(), '->getValues() returns all form field values');
|
||||
$form = $this->createForm('<form><input type="text" name="foo[bar]" value="foo" /><input type="text" name="bar" value="bar" /><select multiple="multiple" name="baz[]"></select><input type="submit" /></form>');
|
||||
$this->assertEquals(array('foo[bar]' => 'foo', 'bar' => 'bar', 'baz' => array()), $form->getValues(), '->getValues() returns all form field values');
|
||||
|
||||
$form = $this->createForm('<form><input type="checkbox" name="foo" value="foo" /><input type="text" name="bar" value="bar" /><input type="submit" /></form>');
|
||||
$this->assertEquals(array('bar' => 'bar'), $form->getValues(), '->getValues() does not include not-checked checkboxes');
|
||||
@ -431,6 +431,10 @@ class FormTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$form = $this->createForm('<form><input type="text" name="fo.o[ba.r][]" value="foo" /><input type="text" name="fo.o[ba.r][ba.z]" value="bar" /><input type="submit" /></form>');
|
||||
$this->assertEquals(array('fo.o' => array('ba.r' => array('foo', 'ba.z' => 'bar'))), $form->getPhpValues(), '->getPhpValues() preserves periods and spaces in names recursively');
|
||||
|
||||
$form = $this->createForm('<form><input type="text" name="foo[bar]" value="foo" /><input type="text" name="bar" value="bar" /><select multiple="multiple" name="baz[]"></select><input type="submit" /></form>');
|
||||
$this->assertEquals(array('foo' => array('bar' => 'foo'), 'bar' => 'bar'), $form->getPhpValues(), "->getPhpValues() doesn't return empty values");
|
||||
|
||||
}
|
||||
|
||||
public function testGetFiles()
|
||||
|
@ -21,7 +21,7 @@ interface FormTypeInterface
|
||||
/**
|
||||
* Builds the form.
|
||||
*
|
||||
* This method is called for each type in the hierarchy starting form the
|
||||
* This method is called for each type in the hierarchy starting from the
|
||||
* top most type. Type extensions can further modify the form.
|
||||
*
|
||||
* @see FormTypeExtensionInterface::buildForm()
|
||||
@ -34,7 +34,7 @@ interface FormTypeInterface
|
||||
/**
|
||||
* Builds the form view.
|
||||
*
|
||||
* This method is called for each type in the hierarchy starting form the
|
||||
* This method is called for each type in the hierarchy starting from the
|
||||
* top most type. Type extensions can further modify the view.
|
||||
*
|
||||
* A view of a form is built before the views of the child forms are built.
|
||||
@ -52,7 +52,7 @@ interface FormTypeInterface
|
||||
/**
|
||||
* Finishes the form view.
|
||||
*
|
||||
* This method gets called for each type in the hierarchy starting form the
|
||||
* This method gets called for each type in the hierarchy starting from the
|
||||
* top most type. Type extensions can further modify the view.
|
||||
*
|
||||
* When this method is called, views of the form's children have already
|
||||
|
@ -972,7 +972,7 @@ class Request
|
||||
*/
|
||||
public function getUser()
|
||||
{
|
||||
return $this->server->get('PHP_AUTH_USER');
|
||||
return $this->headers->get('PHP_AUTH_USER');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -982,7 +982,7 @@ class Request
|
||||
*/
|
||||
public function getPassword()
|
||||
{
|
||||
return $this->server->get('PHP_AUTH_PW');
|
||||
return $this->headers->get('PHP_AUTH_PW');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -209,7 +209,7 @@ class RequestTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals(80, $request->getPort());
|
||||
$this->assertEquals('test.com', $request->getHttpHost());
|
||||
$this->assertEquals('testnopass', $request->getUser());
|
||||
$this->assertNull($request->getPassword());
|
||||
$this->assertSame('',$request->getPassword());
|
||||
$this->assertFalse($request->isSecure());
|
||||
|
||||
$request = Request::create('http://test.com/?foo');
|
||||
|
@ -27,7 +27,7 @@ as it becomes available:
|
||||
|
||||
$process = new Process('ls -lsa');
|
||||
$process->run(function ($type, $buffer) {
|
||||
if ('err' === $type) {
|
||||
if (Process::ERR === $type) {
|
||||
echo 'ERR > '.$buffer;
|
||||
} else {
|
||||
echo 'OUT > '.$buffer;
|
||||
@ -42,6 +42,6 @@ Resources
|
||||
|
||||
You can run the unit tests with the following command:
|
||||
|
||||
$ cd path/to/Symfony/Component/XXX/
|
||||
$ cd path/to/Symfony/Component/Process/
|
||||
$ composer.phar install
|
||||
$ phpunit
|
||||
|
@ -88,7 +88,7 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="22">
|
||||
<source>This value should not be blank.</source>
|
||||
<target>Bu değer boşluk olamaz.</target>
|
||||
<target>Bu değer boş bırakılmamalıdır.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="23">
|
||||
<source>This value should not be null.</source>
|
||||
|
Reference in New Issue
Block a user