rvanlaak/SettingsBundle

Error on Settings form

Closed this issue · 2 comments

Atyz commented

Hello and thx for your work these days !

I updated my project, and now I get an error when I want to display the built-in settings form :

The type name specified for the service "form.type.settings_management" does not match the actual name. Expected "settings_management", given "Dmishh\SettingsBundle\Form\Type\SettingsType"

You can quickly get rid of this error by replacing this line in SettingsController.php :

$form = $this->createForm('settings_management', $this->get('settings_manager')->all($owner));

by that :

$form = $this->createForm(SettingsType::class, $this->get('settings_manager')->all($owner));

(and add the corresponding use statement)
And then, delete the corresponding service.

Thx again for your work 👍

You are on master, and what version of Symfony are you using? My assumption is 3.0, for which we did not finish the deprecation fixing yet. See #72

Awesome @Atyz. Thank you for this bug report. You are correct. That would fix the issue.

Would you mind sending a PR?