This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Fabien Potencier 9dd43966c1 merged branch fabpot/renderer-renaming (PR #6925)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #6925).

Commits
-------

0586643 renamed some classes and Twig functions to more descriptive names (refs #6871)

Discussion
----------

renamed some classes and Twig functions to more descriptive names (refs #6871)

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6871
| License       | MIT
| Doc PR        | symfony/symfony-docs#2205

Todo:

 - [x] update the docs

In #6871, @kriswallsmith wondered if the names used for the ESI/HIncludes sub-framework were meaningful enough.

I agree that this was not the case and I propose to remove the notion of **sub-requests** in favor of **fragments**. This sub-framework is a way to render fragments of a resource (the fact that it's done via another request is an implementation detail).

With that decision, all names can be renamed and are probably more meaningful. Some examples:

* `HttpContentRenderer` -> `FragmentHandler`
* `RouterProxyListener` -> `FragmentListener`
* `router_proxy` -> `fragments` (configuration entry)
* `DefaultRenderingStrategy` -> `InlineFragmentRenderer`

---------------------------------------------------------------------------

by fabpot at 2013-01-31T09:50:14Z

I forgot to mention that this renaming will also probably help documenting the feature as understanding the notion of a fragment is probably easier.

---------------------------------------------------------------------------

by Tobion at 2013-01-31T14:18:40Z

I'd like to say again that the word `render` in `FragmentRenderingStrategy` does not fit because it's not about rendering (that's left to the templating) of a fragment.
I suggest to rename it to `FragmentInclusionStrategy` because it defines the strategy to include the fragment.
This is also consistent with every strategy there is:
- ESI: `<esi:include`
- SSI: `<!--#include file="header.shtml" -->`
- hinclude (even in the name)
- inline (similar to phps `include()`)

---------------------------------------------------------------------------

by fabpot at 2013-01-31T14:48:07Z

I've just renamed `FragmentRenderer` to `FragmentHandler` and strategies like `EsiFragmentRenderingStrategy` to `EsiFragmentRenderer` (and everything is put into a new `Fragment` sub-namespace).

---------------------------------------------------------------------------

by fabpot at 2013-01-31T21:11:44Z

I've reverted the Twig function name change as the current name is more expressive with its arguments: `render(controller(...))` or `render_esi(url(...))`.
2013-02-01 15:17:21 +01:00
src/Symfony renamed some classes and Twig functions to more descriptive names (refs #6871) 2013-02-01 15:17:20 +01:00
.editorconfig Add EditorConfig File 2012-06-16 14:08:15 +02:00
.gitignore ignore composer.phar 2012-04-20 14:10:06 +01:00
.travis.yml Merge branch '2.1' 2013-01-05 16:33:05 +01:00
autoload.php.dist [travis-ci] Zend Garbage Collection only for PHP5.4 2012-11-19 15:21:43 +01:00
CHANGELOG-2.0.md updated CHANGELOG for 2.0.22 2013-01-17 16:39:41 +01:00
CHANGELOG-2.1.md updated CHANGELOG for 2.1.7 2013-01-17 17:21:31 +01:00
composer.json Update composer.json files: - to allow versions ~2.2 (>=2.2,<3.0) of Doctrine DBAL, ORM & Common - fixed Propel1 versions difference between main and bridge files - fixed Twig versions difference between main and bridge files - to allow versions ~1.11 (>=1.11,<2.0) of Twig - fixed Locale ext-intl version to accept all, not non-existing version 2013-02-01 10:33:53 +01:00
CONTRIBUTING.md Making it easier to grab the PR template. 2012-12-15 21:57:27 +00:00
CONTRIBUTORS.md update CONTRIBUTORS for 2.0.22 2013-01-17 16:40:10 +01:00
LICENSE updated license year 2013-01-04 17:59:43 +01:00
phpunit.xml.dist [Locale] fixed tests 2012-12-05 14:13:56 +01:00
README.md Fix typos in README 2013-01-19 11:32:41 +01:00
UPGRADE-2.1.md Merge branch '2.1' 2012-11-29 11:32:45 +01:00
UPGRADE-2.2.md Updated UPGRADE-2.2.md for twig bridge section 2013-01-28 18:15:08 +01:00
UPGRADE-3.0.md [TwigBridge] added the render tag deprecation to the CHANGELOG for 3.0 2013-01-28 18:29:00 +01:00

README

What is Symfony2?

Symfony2 is a PHP 5.3 full-stack web framework. It is written with speed and flexibility in mind. It allows developers to build better and easy to maintain websites with PHP.

Symfony can be used to develop all kind of websites, from your personal blog to high traffic ones like Dailymotion or Yahoo! Answers.

Requirements

Symfony2 is only supported on PHP 5.3.3 and up.

Be warned that PHP versions before 5.3.8 are known to be buggy and might not work for you:

Installation

The best way to install Symfony2 is to download the Symfony Standard Edition available at http://symfony.com/download.

Documentation

The "Quick Tour" tutorial gives you a first feeling of the framework. If, like us, you think that Symfony2 can help speed up your development and take the quality of your work to the next level, read the official Symfony2 documentation.

Contributing

Symfony2 is an open source, community-driven project. If you'd like to contribute, please read the Contributing Code part of the documentation. If you're submitting a pull request, please follow the guidelines in the Submitting a Patch section and use Pull Request Template.

Running Symfony2 Tests

Information on how to run the Symfony2 test suite can be found in the Running Symfony2 Tests section.