merged branch pierredup/hinclude (PR #5993)

This PR was merged into the master branch.

Commits
-------

74a8fcf [FrameworkBundle] Added support for default templates per render tag

Discussion
----------

[FrameworkBundle] Added support for default templates per render tag

This commit allows you to specify default templates per render tag when using hinclude.

E.G:
The following will use the specific default template for the render:
```` {% render "AcmeDemoBundle:Controller:action" with {}, {"standalone" : "js", "default" : "AcmeDemoBundle:Default:content.html.twig"} %}````

or if you don't want to use a template for the default content but just a string, you can do the following
```` {% render "AcmeDemoBundle:Controller:action" with {}, {"standalone" : "js", "default" : "Loading..."} %}````

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Fixes the following tickets: #3356
Todo: -
Documentation

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

by fabpot at 2012-12-14T12:25:40Z

Looks good to me. Can you add a note in the CHANGELOG of the component and send a PR on symfony/symfony-docs about this new feature? Thanks.

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

by pierredup at 2012-12-14T14:30:00Z

@fabpot done, documentation PR symfony/symfony-docs#2021
merged branch hason/config (PR #5875)

This PR was merged into the master branch.

Commits
-------

45aab0f [Config] Added parameter to check prefix in an element or an attribute name in XmlUtils::convertDomElementToArray
7f5a7fd [DependencyInjection] Using class from Config component to loading XML files
d6f0880 [Validator] Added dependency to Config component to loading XML files
34471a6 [Routing] Using class from Config component to loading XML files
fa8b0d8 [Config] Added a utils class for XML manipulations

Discussion
----------

[Config] Added a utils class for XML manipulations

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT

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

by fabpot at 2012-12-14T13:59:59Z

Looks good to me. Can you rebase on master as there is a conflict right now? Thanks.

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

by hason at 2012-12-14T14:44:11Z

Done.
Merge branch '2.1'

* 2.1:
  [Form] Fixed DateTimeToStringTransformer parsing on PHP < 5.3.8
  [Propel1Bridge] Fix "and => &&" CS in ModelChoiceList
  [HttpKernel] Revise MongoDbProfilerStorage::write() return value
  [Session] Document Mongo|MongoClient argument type instead of "object"
  [HttpKernel] Support MongoClient and Mongo connection classes
  [Session] Support MongoClient and Mongo connection classes
  [Session] Utilize MongoDB::selectCollection()
  [Form] Fixed reverse transformation of values in DateTimeToStringTransformer

Conflicts:
	src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php
	src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php
[Session] Added exception to save method

A RuntimeException is thrown if there is an attempt to save the session
without it being started, or if it has already been closed.
[Form] Fixed duplicate case expression
fix double-decoding in the routing system
[Form] [FrameworkBundle] catch deprecation errors in tests
[Form] Catch deprecation errors that are caused by BC code
[Form] Fix two cases where deprecated methods were being used
Fixed typos
Merge branch 'master' of github.com:symfony/symfony into deprecationErrors
fix typos in PhpMatcherDumper
Merge pull request #3 from Tobion/patch-5

fix typos in PhpMatcherDumper
merged branch pborreli/typos-friday (PR #6364)

This PR was merged into the master branch.

Commits
-------

c84907b Merge pull request #3 from Tobion/patch-5
9ab5e4f fix typos in PhpMatcherDumper
60eeacd Fixed typos
4a073e6 [Form] Fixed duplicate case expression

Discussion
----------

Fixed Typos

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

by Tobion at 2012-12-14T22:51:05Z

:+1: Thanks for fixing some of my typos.
@pborreli see pborreli/symfony#3
merged branch colinfrei/deprecationErrors (PR #6180)

This PR was merged into the master branch.

Commits
-------

6b10550 Merge branch 'master' of github.com:symfony/symfony into deprecationErrors
1d82112 [Form] Fix two cases where deprecated methods were being used
b8cdbdc [Form] Catch deprecation errors that are caused by BC code
ebcb432 [Form] [FrameworkBundle] catch deprecation errors in tests
c21b12e [Form] handle BC use of deprecated stuff in non-test-methods.
fc2be6d [Form] catch deprecated errors in tests
800a032 [Form] replace bindRequest() with bind(), as bindRequest is deprecated
d5b2638 [Form] Trigger errors for deprecated methods in Form Component
f3d6966 [Validator] Stop using deprecated methods
d57ad32 [Form] Catch deprecation errors when using deprecated methods/classes in tests
3241157 [Validator] Trigger errors for deprecations
1f9eb7f return value of handleError
b35de9e Handle errors using a custom error handler
f49704b trigger errors for deprecated methods in HttpFoundation component

Discussion
----------

trigger_error() for deprecations

See also #6173 and #6139.

Started triggering errors in the HttpFoundation component.
It seems as if most of the time the error is just duplicating the text in the @deprecation comment.

Any opinions on if duplicating the text is acceptable, or if fetching the comment text to output the error makes sense?

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

by Seldaek at 2012-12-04T13:39:42Z

IMO it's fine to just duplicate the `@deprecated` note in the message, since anyway this code is meant to be completely deleted, this duplication should not do much harm.

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

by fabpot at 2012-12-06T08:22:21Z

@colinfrei I've merged PR #6173. Do you have time to implement the `trigger_error()` call everywhere? Thanks.

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

by colinfrei at 2012-12-06T08:36:55Z

Yep I'll finish that, probably until the beginning of next week.

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

by bschussek at 2012-12-10T10:15:12Z

Thank you for working on this!

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

by fabpot at 2012-12-12T11:08:53Z

@colinfrei: Is this PR finished? Can I merge it?

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

by colinfrei at 2012-12-12T12:09:19Z

@fabpot not quite - I lost some work due to a computer crash over the weekend. The only thing open is fixing the tests  for the Form Component and catching the cases where the Form Component intentionally uses deprecated stuff.

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

by colinfrei at 2012-12-15T07:32:28Z

@fabpot - finished adding trigger_errors and catching them in Tests and as needed.
Travis is failing, but that seems to be master being broken due to the Finder changes?

I changed a few cases where the code was using deprecated methods which wasn't necessary in my eyes, specifically   1d8211249b56ccc14145b81779b9ddc3a36f9b12, 800a032f07200e281abd61928f601d6d37360e37, f3d696636afa2a0c724f92450fde275f4c6f2ad7
create oneof constraint and add deprecation messages in choice, also make choice extend new oneOf constraint to avoid duplicate code
merged branch ricardclau/rename_choice_to_oneof (PR #6360)

This PR was merged into the master branch.

Commits
-------

9071676 create oneof constraint and add deprecation messages in choice, also make choice extend new oneOf constraint to avoid duplicate code

Discussion
----------

[Validator] Rename "Choice" to "OneOf"

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #6324
Todo:
License of the code: MIT
Documentation PR: https://github.com/symfony/symfony-docs/issues/2025

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

by bschussek at 2012-12-14T18:20:56Z

Can you let `Choice` and `ChoiceValidator` extend the renamed classes? Then we avoid the code duplication. You can also remove `ChoiceValidatorTest` then.

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

by ricardclau at 2012-12-14T18:26:58Z

For sure! BTW there seems to be a problem with SF2 build when testing BR currency :S maybe it is the new ICU version supported, I guess you are aware of this but just in case!

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

by stof at 2012-12-14T21:14:04Z

the ``Choice`` constraint should trigger a ``E_USER_DEPRECATED`` in its constructor (and calling the parent constructor) as we agreed on this. The PR adding these calls everywhere is not merged yet, but it would avoid missing it when merging the PRs separately

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

by bschussek at 2012-12-14T21:19:45Z

Things missing:

* add a deprecation note to the Validator's CHANGELOG
* add a block in UPGRADE-2.2 under the Validator's "Deprecations" section that explains how to upgrade with a before/after sample
* add `trigger_error()` calls to the constructors of `Choice` and `ChoiceValidator`

See #6180 for more information about how to call `trigger_error()`.

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

by ricardclau at 2012-12-14T22:45:55Z

Sorry I was not aware of the trigger_error() agreement, absolutely +1 on it.

I hope I understood everything properly, if there is something else or some other errors please tell me!

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

by bschussek at 2012-12-15T08:46:51Z

The entry in the CHANGELOG is still missing.

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

by ricardclau at 2012-12-15T09:36:28Z

By the CHANGELOG you mean what I just added right? Hope now it is ok!

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

by bschussek at 2012-12-15T09:45:16Z

Awesome! :+1:
merged branch baldurrensch/testlistener_fix (PR #6362)

This PR was merged into the 2.1 branch.

Commits
-------

098b593 [Session] Added exception to save method
6b9ee87 [Session] Fixed a bug with the TestListener

Discussion
----------

[Session] Fixed bug with TestListener

Fixed a bug where an unstarted mock session would be emptied with a save. Here are the steps to reproduce:

Use the test client from Symfony\Bundle\FrameworkBundle\Test\WebTestCase::createClient(), and add something to its session. (I actually had it authenticate against a firewall).
Take the cookies of this first test client and add them to a second test client
Have the second test client request a URL that results in a 404
Since the 404 does not need to start the session, hence when save is called (automatically), the mock session is overwritten with an empty array. This does not happen with the other session handlers.
The added unit test in this PR shows this problem. If this PR gets accepted, will it also get merged into the 2.1.x-dev branch?

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes (The broken test seems to be unrelated to this change)
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -

This is a follow up PR since my original one (https://github.com/symfony/symfony/pull/6342) was against the wrong upstream branch.
merged branch fabpot/translation-metadata (PR #6349)

This PR was merged into the master branch.

Commits
-------

320fb6c [Translation] changed the MetadataAwareInterface method signatures
11ff433 [Translation] fixed CS in unit tests
c40db35 [Translation] removed some code that is not done anywhere else in Symfony
63719a0 [Translation] created a new interface to avoid breaking BC
23e9e65 [Translation] fixed name
5607732 [Translation] added Metadata to MessageCatalogue

Discussion
----------

[MessageCatalogue] Add Metadata to MessageCatalogue

rework of #4399

For improving the Gettext tools (PO, MO File Loader/Dumper) we need at least storage for their meta data.

This patch allows for issues below to store and process ie Po Header, Po Header Pluralisation rule.

Open
- [[WIP]: Allow Drupal to use Translate component](https://github.com/symfony/symfony/pull/4249)
- [[2.1][Translator] Symfony translation process & gettext](https://github.com/symfony/symfony/issues/4245)

Closed:
- [[Translation] Po/MoFileLoader parse plurization rules](https://github.com/symfony/symfony/pull/3023)

It has 1 TODO regarding addCatalogue: it now just override old values with new.
[Yaml] tweaked phpdoc (closes #6275)