Skip to content

[3.0] Splitting the HttpKernel component #9406

Closed
@fabpot

Description

@fabpot

The HttpKernel component contains many classes and from time to time, someone wants to split it in several components.

It does not really brings us anything if the split components are not useable by themselves, but separating Kernel and HttpKernel is probably good to at least avoid confusing about the decoupling between bundles and the HTTP kernel itself.

Also, as things have been refactored a lot since 2.0, it's much clearer now to see where things can go in separate components. For instance, moving the Profiler/DataCollector classes to a new component is now possible as other classes do not depend on them anymore (at least in 3.0 as the TraceableEventDispatcher won't depend on the Profiler anymore).

So, here is my initial proposal for Symfony 3.0: we split the HttpKernel component into 3 separate components:

  • Kernel:
    • Bundle/, Config/, DependencyInjection/, CacheClearer/, CacheWarmer/ directories
    • Kernel.php, KernelInterface.php
  • Profiler:
    • Profiler/ and DataCollector/ directories
    • EventListener/ProfilerListener.php
  • HttpKernel:
    • Controller/, Debug/, Event/, EventListener/, Exception/, Fragment/, HttpCache/, Log/ directories
    • Client.php, HttpKernel.php, HttpKernelInterface.php, TerminableInterface.php (to be merge with HttpKernelInterface in 3.0), UriSigner.php
    • rename KernelEvent to HttpKernelEvent and KernelEvents to HttpKernelEvents?

Metadata

Metadata

Assignees

No one assigned

    Labels

    HttpKernelRFCRFC = 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