You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor #5932 Rename Form Panels as Form Fieldsets (javiereguiluz)
This PR was squashed before being merged into the 4.x branch.
Discussion
----------
Rename Form Panels as Form Fieldsets
I know that renames are always annoying because you need to change things in your apps for something that doesn't provide anything valuable 🙏 But:
**(1)** If you don't change anything, everything should keep working the same. You won't see any change ... except some new messages in the list of deprecations shown by Symfony
**(2)** To fix those deprecations, you can use your IDE/editor to do this:
```diff
-::addPanel('...')
+::addFieldset('...')
```
**(3)** Only people doing very obscure/advanced things will need to do some more `panel` -> `fieldset` renames.
-----
Why do I propose this? Because fieldsets is a much more natural word for this feature and also, because it feels better with some upcoming changes in a nice feature that I will unveil in the future.
Commits
-------
fa98932 Rename Form Panels as Form Fieldsets
@@ -269,4 +261,26 @@ private function checkOrphanTabFields(FieldCollection $fields, AdminContext $con
269
261
270
262
thrownew \RuntimeException(sprintf('The "%s" page of "%s" uses tabs to display its fields, but the following fields don\'t belong to any tab: %s. Use "FormField::addTab(\'...\')" to add a tab before those fields.', $context->getCrud()->getCurrentPage(), $context->getCrud()->getControllerFqcn(), implode(', ', $orphanFieldNames)));
271
263
}
264
+
265
+
/*
266
+
* This is needed to handle this edge-case: the list of fields include one or more form fieldsets,
267
+
* but the first fields of the list don't belong to any fieldset. We must create an automatic empty
268
+
* form fieldset for those "orphaned fields" so they are displayed as expected.
0 commit comments