Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitccd9c1f

Browse files
committed
bug#37276 [Form] Fixed block prefixes hierarchy of the CollectionType (yceruto)
This PR was merged into the 5.1 branch.Discussion----------[Form] Fixed block prefixes hierarchy of the CollectionType| Q | A| ------------- | ---| Branch? | 5.1| Bug fix? | yes| New feature? | no| Deprecations? | no| Tickets |Fix#37024| License | MIT| Doc PR | -/cc@HeahDudeCommits-------a8f2c60 fixed block prefixes hierarchy of the CollectionType
2 parentsa89cc6b +a8f2c60 commitccd9c1f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎src/Symfony/Component/Form/Extension/Core/Type/CollectionType.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function buildView(FormView $view, FormInterface $form, array $options)
7272
*/
7373
publicfunctionfinishView(FormView$view,FormInterface$form,array$options)
7474
{
75-
$prefixOffset = -1;
75+
$prefixOffset = -2;
7676
// check if the entry type also defines a block prefix
7777
/** @var FormInterface $entry */
7878
foreach ($formas$entry) {

‎src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,8 @@ public function testEntriesBlockPrefixes()
415415

416416
$expectedBlockPrefixes = [
417417
'form',
418-
'text',
419418
'collection_entry',
419+
'text',
420420
'_fields_entry',
421421
];
422422

@@ -436,8 +436,8 @@ public function testEntriesBlockPrefixesWithCustomBlockPrefix()
436436
$this->assertCount(1,$collectionView);
437437
$this->assertSame([
438438
'form',
439-
'text',
440439
'collection_entry',
440+
'text',
441441
'field',
442442
'_fields_entry',
443443
],$collectionView[0]->vars['block_prefixes']);
@@ -454,8 +454,8 @@ public function testEntriesBlockPrefixesWithCustomBlockPrefixedType()
454454
$this->assertCount(1,$collectionView);
455455
$this->assertSame([
456456
'form',
457-
'block_prefixed_foo_text',
458457
'collection_entry',
458+
'block_prefixed_foo_text',
459459
'foo',
460460
'_fields_entry',
461461
],$collectionView[0]->vars['block_prefixes']);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp