[TwigBundle] Fixed tests on windows
Added configuration pass that adds Twig Loaders

- Added compiler class which picks up any services tagged "twig.loader"
- If there is one loader registered we set the alias to this loader
- If there is more than one we set the alias to a chain loader and all
  the loaders to it
- If there is no loaders we throw an Exception
[HttpKernel] ExceptionHandler is actually displaying PHP errors

Since even fatal errors are catched and turned into exceptions by
ErrorHandler, all PHP errors can nicely be displayed by
ExceptionHandler. There is no need to set display_errors to true
anymore then.

Partially fixes #6254 on github.
merged branch dantleech/twig_loader_pass (PR #6171)

This PR was merged into the master branch.

Commits
-------

f48b22a Added configuration pass that adds Twig Loaders

Discussion
----------

[Twig] [DI Pass] Added configuration pass that adds Twig Loaders

Bug fix: [no]
Feature addition: [yes]
Backwards compatibility break: [no]
Symfony2 tests pass: [yes]
Todo: Documentation?
License of the code: MIT

- Defined new Chain loader service with symfony Filesystem loader added
  by default.
- Added compiler class which picks up any services tagged "twig.loader"
- If there are any instances of "twig.loader" the "twig.loader" alias is
  set to the Twig_Loader_Chain service ID instead of the filesystem
  loader.

I think I still like the explicitness of the other pull request, but I defer to your judgment :) This is certainly much easier for the developer.

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

by dantleech at 2012-12-03T08:31:08Z

Will update the PR later today / tomorrow

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

by dantleech at 2012-12-03T18:19:09Z

ok, updated. I throw a `Symfony\Component\DependencyInjection\Exception\LogicException` if there are no loaders -- not sure if that is the best thing to do, or if that is the best exception.

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

by fabpot at 2012-12-05T15:28:24Z

Looks good to me. Can you add a note in the CHANGELOG about this new possibility and update the documentation accordingly? Thanks.

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

by dantleech at 2012-12-05T17:50:37Z

ok. updated change log and changed both count() comparisons to be strict. @fabpot which documentation should I update? or should I add `cookbook/templating/registering_multiple_loaders.rst`?

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

by stof at 2012-12-05T20:07:37Z

@dantleech at least the DIC tags reference need to be updated to mention the new tag. I'm not sure a dedicated article is needed for it (but @weaverryan will decide if it is worth it)

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

by dantleech at 2012-12-06T17:57:20Z

Made a PR for documentation: https://github.com/symfony/symfony-docs/pull/2005

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

by dantleech at 2012-12-07T16:44:00Z

ok. have updated the correct CHANGELOG and squashed to one commit
[FrameworkBundle] tweaked previous merge
merged branch hason/tests_2_2 (PR #6202)

This PR was merged into the master branch.

Commits
-------

abe244f [TwigBundle] Fixed tests on windows

Discussion
----------

[TwigBundle] Fixed tests on windows
merged branch bamarni/display-errors (PR #6259)

This PR was merged into the master branch.

Commits
-------

5d98fb1 [HttpKernel] ExceptionHandler is actually displaying PHP errors

Discussion
----------

[HttpKernel] ExceptionHandler is actually displaying all PHP errors

So there is no need to set display_errors to true in that case.

Partially fixes #6254.