8000 [form][2.8.1] new 'entry_options' not making it to underlying formtype · Issue #17443 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[form][2.8.1] new 'entry_options' not making it to underlying formtype #17443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
matthbull opened this issue Jan 19, 2016 · 2 comments
Closed

Comments

@matthbull
Copy link

In trying to fix some 2.8 deprecation warnings and I've come across an issue where entry_options are not passing to the underlying formType. I'm not sure if this is me or its a bug, but I'll try to explain as clearly as I can.

using a CollectionType form field as follows:

Parent form

// ...
 $builder->add( 'teacher_scale_versions', CollectionType::class, array(
        'entry_type' => BudgetVersionTableType::class,
        'entry_options' => array(
            'school'       => $school,
            'data_class'   => 'SBS\BudgetBundle\Entity\BudgetTeacherScale',
            'version_type' => SBSBudgetBundle::REFERENCE_TEACHER_SCALES,
        ),
       // .......

child form

   // ....

  public function configureOptions( OptionsResolver $resolver) {
    $resolver->setRequired( array( 'version_type', 'school' ) );
  }

error:

The required options "school", "version_type" are missing.

Using xdebug to see whats being passed where, it seems that the entry_options are not making it through to the child BudgetVersionTableType::class which needs them.

@HeahDude
Copy link
Contributor

Hi @matthbull this is fixed in 2.8.2, see #17162

@matthbull
Copy link
Author

awesome. thanks for that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0