symfony/symfony — pull request #6720 by KingCrunch (2013-01-13 01:18:22+00:00)
Title: [HttpKernel][WIP] Implement SSI rendering strategy

Well, it works, but I added the `[WIP]`-tag, because it "feels" incomplete. It currently implements SSI-support into the `HttpKernel` similar to the ESI-support, but more like `HInclude` (without `HttpCache`). This way it is only possible to (depending on the configuration) always render the SSI-tag, or never (including corresponding "missing render strategy"-exception). This makes it hard to use during development, where SSI may or may not be parsed.

The things I felt uncomfortable with:
- ESI is hardcoded into the `HttpCache`-class. It doesn't feel "clean" to do the same with SSI right next to ESI. Especially what happens, when both where used (unusual, but possible)?
- Although SSI and ESI are doing nearly exactly the same, the Esi-implementation implements very Esi-specific interfaces, classes and methods (`EsiResponseCacheStrategyInterface` for example). I would have copy and pasted them, but there must be better solutions.

At the end the main-point is, that both behave quite similar and I think there must be a way to implement both, so that they share most of the code and are useable simultaneously. I hope, it is clear, whats on my mind. Would like to hear some opinions before going on :smile: I think the "share code" is not thaaat hard, but requires to rename several classes, interfaces and methods. However, the "both were enabled and used at once" makes me thinking...