Skip to content
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

Deprecate unused form templates #6238

Merged

Conversation

franmomu
Copy link
Member

@franmomu franmomu commented Jul 28, 2020

Subject

I think these templates are not used anymore. The PR is draft because I still have to check better, but just in case someone has some knowledge about this.

It makes sense to have templates for list and show for each field, but edit fields are configured through form_admin_fields.html.twig and in the persistence bundles, that's why I think they are not used.

I am targeting this branch, because this is BC.

Changelog

### Deprecated
- Deprecated `base_filter_field.html.twig` template
- Deprecated `base_inline_edit_field.html.twig` template
- Deprecated `base_standard_edit_field.html.twig` template
- Deprecated `edit_array.html.twig ` template
- Deprecated `edit_boolean.html.twig` template
- Deprecated `edit_file.html.twig` template
- Deprecated `edit_integer.html.twig` template
- Deprecated `edit_sonata_type_immutable_array.html.twig` template
- Deprecated `edit_string.html.twig` template
- Deprecated `edit_text.html.twig` template

Edit:

Looks like in 0dc07ae some things happened:

$fieldDescription->setTemplate(sprintf('SonataAdminBundle:CRUD:edit_%s.html.twig', $fieldDescription->getType()));
$template = $this->getTemplate($fieldDescription, 'SonataAdminBundle:CRUD:base_standard_edit_field.html.twig');
$base_template = sprintf('SonataAdminBundle:CRUD:base_%s_edit_field.html.twig', 'standard');

Following a normal request for create for example:

@franmomu franmomu changed the title Deprecated edit_* templates Deprecate edit_* templates Jul 28, 2020
@franmomu franmomu force-pushed the feature/deprecate_edit_templates branch from 3802368 to 3ea7c08 Compare August 1, 2020 15:49
@franmomu franmomu changed the title Deprecate edit_* templates Deprecate unused form templates Aug 1, 2020
@franmomu franmomu force-pushed the feature/deprecate_edit_templates branch from 3ea7c08 to 3821d69 Compare August 1, 2020 16:05
@franmomu franmomu marked this pull request as ready for review August 1, 2020 16:05
@SonataCI
Copy link
Collaborator

SonataCI commented Aug 1, 2020

Could you please rebase your PR and fix merge conflicts?

@franmomu franmomu force-pushed the feature/deprecate_edit_templates branch from 3821d69 to 53129cf Compare August 1, 2020 20:24
@SonataCI
Copy link
Collaborator

SonataCI commented Aug 2, 2020

Could you please rebase your PR and fix merge conflicts?

@franmomu franmomu force-pushed the feature/deprecate_edit_templates branch from 53129cf to ced5505 Compare August 2, 2020 10:42
Copy link
Member

@VincentLanglet VincentLanglet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we list all the deprecated templates in the changelog ?

@jordisala1991 jordisala1991 merged commit d391619 into sonata-project:3.x Aug 3, 2020
@jordisala1991
Copy link
Member

Thank you @franmomu

@franmomu franmomu deleted the feature/deprecate_edit_templates branch August 3, 2020 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants