Open majoskorec opened 2 years ago
Summary symfony add "collection_entry" block prefix to CollectionType entries in 5.1 https://github.com/symfony/symfony/pull/36088
it cause that entity type in collection in collection is rendering as input type
Steps to reproduce
final class TestType extends Abstract`Type { public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('coll1', \Oro\Bundle\FormBundle\Form\Type\CollectionType::class, [ 'entry_type' => Test2Type::class, 'allow_add' => true, 'allow_delete' => true, 'prototype' => true, 'handle_primary' => false, ]); } } final class Test2Type extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('coll2', \Oro\Bundle\FormBundle\Form\Type\CollectionType::class, [ 'entry_type' => EntityType::class, 'entry_options' => [ 'class' => User::class, ], 'allow_add' => true, 'allow_delete' => true, 'prototype' => true, 'handle_primary' => false, ]); } }
Actual Result coll2 is text input
Expected Result coll2 should by entity select type
Details about your environment
Additional information when i remove "collection_entry" from block prefix of CollectionType it start working
Summary
symfony add "collection_entry" block prefix to CollectionType entries in 5.1 https://github.com/symfony/symfony/pull/36088
it cause that entity type in collection in collection is rendering as input type
Steps to reproduce
Actual Result coll2 is text input![image](https://user-images.githubusercontent.com/10130278/185602941-80eca537-9001-47bc-b6ff-85277ee40341.png)
Expected Result
coll2 should by entity select type
Details about your environment
Additional information
when i remove "collection_entry" from block prefix of CollectionType it start working