Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[RFC] Deprecate bundle inheritance #24048

Copy link
Copy link
Closed
@javiereguiluz

Description

@javiereguiluz
Issue body actions
Q A
Bug report? no
Feature request? yes
BC Break report? yes
RFC? yes
Symfony version 3.4

After having upgraded several apps to Symfony Flex (both small and complex apps) the worst thing to me was the overriding of third-party elements. Templates for example where in app/Resources/AcmeBundle/views/ and now should be in src/Resources/AcmeBundle/views/..., etc.

I asked around in the Symfony Slack chat and the first responses confirmed that bundle inheritance is rarely used, except to customize some templates:

Do you use that in your real projects? Do you override controllers, templates, etc. from third-party bundles?

-> Rarely, but it has happened
-> I've seen that in ApiPlatform, people override the swagger html twig file
-> Apart error pages from twig, I almost never override resources from third-party bundle
-> I overrode ~70% of FosUserBundle, but without bundle inheritance
-> Only the error pages from twig.
-> Me too, only error pages (on real projects)
-> I used it along time ago for RollerworksMultiUserBundle. but that project is EOL (for good!)
-> I only override templates and assets within app/Resources/. Never did any overriding using an inheriting bundle.

Deprecating this feature in 3.4 and removing it in 4.0 is our last chance in several years to do that.

If you agree, we should provide simple alternatives to override all that is listed in this article: How to Override any Part of a Bundle

  • templates
  • routing
  • controllers
  • services
  • configuration
  • entities
  • forms
  • validation
  • translation

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFCRFC = Request For Comments (proposals about features that you want to be discussed)RFC = Request For Comments (proposals about features that you want to be discussed)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.