10000 Merge branch '2.3' into 2.6 · symfony/symfony@c53ee35 · GitHub
[go: up one dir, main page]

Skip to content

Commit c53ee35

Browse files
Merge branch '2.3' into 2.6
* 2.3: Minor fixes Towards 100% HHVM compat trigger event with right user (add test) [Security] Initialize SwitchUserEvent::targetUser on attemptExitUser [Form] Fixed: Data mappers always receive forms indexed by their names Conflicts: src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php src/Symfony/Component/Filesystem/Filesystem.php src/Symfony/Component/Process/Tests/AbstractProcessTest.php
2 parents 148c7db + 6e1ae53 commit c53ee35

File tree

18 files changed

+149
-85
lines changed

18 files changed

+149
-85
lines changed

src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/createphar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ public function getAlias()
4444
</xsd:schema>
4545
EOT
4646
);
47-
$phar->setStub('<?php require_once "phar://ProjectWithXsdExtensionInPhar.phar/ProjectWithXsdExtensionInPhar.php"; __HALT_COMPILER(); ?>');
47+
$phar->setStub('<?php Phar::mapPhar("ProjectWithXsdExtensionInPhar.phar"); require_once "phar://ProjectWithXsdExtensionInPhar.phar/ProjectWithXsdExtensionInPhar.php"; __HALT_COMPILER(); ?>');

src/Symfony/Component/Filesystem/Filesystem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ public function chgrp($files, $group, $recursive = false)
241241
$this->chgrp(new \FilesystemIterator($file), $group, true);
242242
}
243243
if (is_link($file) && function_exists('lchgrp')) {
244-
if (true !== @lchgrp($file, $group)) {
244+
if (true !== @lchgrp($file, $group) || (defined('HHVM_VERSION') && !posix_getgrnam($group))) {
245245
throw new IOException(sprintf('Failed to chgrp file "%s".', $file), 0, null, $file);
246246
}
247247
} else {

src/Symfony/Component/Form/Form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ public function add($child, $type = null, array $options = array())
916916
$child->setParent($this);
917917

918918
if (!$this->lockSetData && $this->defaultDataSet && !$this->config->getInheritData()) {
919-
$iterator = new InheritDataAwareIterator(new \ArrayIterator(array($child)));
919+
$iterator = new InheritDataAwareIterator(new \ArrayIterator(array($child->getName() => $child)));
920920
$iterator = new \RecursiveIteratorIterator($iterator);
921921
$this->config->getDataMapper()->mapDataToForms($viewData, $iterator);
922922
}

src/Symfony/Component/Form/Tests/CompoundFormTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ public function testAddMapsViewDataToFormIfInitialized()
350350
->with('bar', $this->isInstanceOf('\RecursiveIteratorIterator'))
351351
->will($this->returnCallback(function ($data, \RecursiveIteratorIterator $iterator) use ($child, $test) {
352352
$test->assertInstanceOf('Symfony\Component\Form\Util\InheritDataAwareIterator', $iterator->getInnerIterator());
353-
$test->assertSame(array($child), iterator_to_array($iterator));
353+
$test->assertSame(array($child->getName() => $child), iterator_to_array($iterator));
354354
}));
355355

356356
$form->initialize();

src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ abstract class DateTimeTestCase extends \PHPUnit_Framework_TestCase
1515
{
1616
public static function assertDateTimeEquals(\DateTime $expected, \DateTime $actual)
1717
{
18-
self::assertEquals($expected->format('c'), $actual->format('c'));
18+
self::assertEquals($expected->format('U'), $actual->format('U'));
1919
}
2020
}

src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ public function testStartedOutside()
216216
{
217217
$storage = $this->getStorage();
218218

219-
$this->assertFalse(isset($_SESSION));
220219
$this->assertFalse($storage->getSaveHandler()->isActive());
221220
$this->assertFalse($storage->isStarted());
222221

src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ public function testPhpSession54()
9191

9292
$storage = $this->getStorage();
9393

94-
$this->assertFalse(isset($_SESSION));
9594
$this->assertFalse($storage->getSaveHandler()->isActive());
96< 92A5 code>95
$this->assertFalse($storage->isStarted());
9796

src/Symfony/Component/Process/PhpExecutableFinder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function find($includeArgs = true)
3737
{
3838
// HHVM support
3939
if (defined('HHVM_VERSION')) {
40-
return (false !== ($hhvm = getenv('PHP_BINARY')) ? $hhvm : PHP_BINARY).($includeArgs ? ' '.implode(' ', $this->findArguments()) : '');
40+
return (getenv('PHP_BINARY') ?: PHP_BINARY).($includeArgs ? ' '.implode(' ', $this->findArguments()) : '');
4141
}
4242

4343
// PHP_BINARY return the current sapi executable

0 commit comments

Comments
 (0)
0