Skip to content

Commit c20c1d1

Browse files
committed
merged branch bschussek/propertypath (PR #5011)
Commits ------- dd2aa54 [Form] Disabled manual singulars in PropertyPath until the syntax is finalized Discussion ---------- [Form] Disabled manual singulars in PropertyPath until the syntax is finalized Bug fix: no Feature addition: no Backwards compatibility break: no Symfony2 tests pass: yes Fixes the following tickets: - Todo: -
2 parents 4bafd1d + dd2aa54 commit c20c1d1

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

src/Symfony/Component/Form/Tests/Util/PropertyPathCollectionTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ public function testSetValueCallsAdderAndRemoverForNestedCollections()
211211

212212
public function testSetValueCallsCustomAdderAndRemover()
213213
{
214+
$this->markTestSkipped('This feature is temporarily disabled as of 2.1');
215+
214216
$car = $this->getMock(__CLASS__ . '_CarCustomSingular');
215217
$axesBefore = $this->getCollection(array(1 => 'second', 3 => 'fourth'));
216218
$axesAfter = $this->getCollection(array(0 => 'first', 1 => 'second', 2 => 'third'));
@@ -300,6 +302,9 @@ public function noAdderRemoverData()
300302
);
301303
$data[] = array($car, $propertyPath, $expectedMessage);
302304

305+
/*
306+
Temporarily disabled in 2.1
307+
303308
$propertyPath = new PropertyPath('axes|boo');
304309
$expectedMessage = sprintf(
305310
'Neither element "axes" nor method "setAxes()" exists in class '
@@ -309,6 +314,7 @@ public function noAdderRemoverData()
309314
'boo'
310315
);
311316
$data[] = array($car, $propertyPath, $expectedMessage);
317+
*/
312318

313319
$car = $this->getMock(__CLASS__ . '_CarNoAdderAndRemoverWithProperty');
314320
$propertyPath = new PropertyPath('axes');

src/Symfony/Component/Form/Tests/Util/PropertyPathTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ public function testGetValueReadsProperty()
9595

9696
public function testGetValueIgnoresSingular()
9797
{
98+
$this->markTestSkipped('This feature is temporarily disabled as of 2.1');
99+
98100
$object = (object) array('children' => 'Many');
99101

100102
$path = new PropertyPath('children|child');

src/Symfony/Component/Form/Util/PropertyPath.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,9 @@ public function __construct($propertyPath)
118118
$element = $matches[3];
119119
$this->isIndex[] = true;
120120
}
121-
122-
$pos = strpos($element, self::SINGULAR_SEPARATOR);
121+
// Disabled this behaviour as the syntax is not yet final
122+
//$pos = strpos($element, self::SINGULAR_SEPARATOR);
123+
$pos = false;
123124
$singular = null;
124125

125126
if (false !== $pos) {

0 commit comments

Comments
 (0)