merged branch asm89/subrequest-request-method (PR #3657)

Commits
-------

c1206c3 [FrameworkBundle] Subrequests should always use GET method

Discussion
----------

[FrameworkBundle] Subrequests should always use GET method

Bug fix: yes
Feature addition: no
Backwards compatibility break: maybe?
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/asm89/symfony.png?branch=subrequest-request-method)](http://travis-ci.org/asm89/symfony)
Fixes the following tickets: -
Todo: -

When generating a subrequest using the bundle/controller notation instead of a url, the method of the duplicated subrequest isn't set to GET, while this does happen in the other case (see [here](https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/HttpKernel.php#L143)). This causes weird behavior when embedding actions with forms on a page that is already reached through a POST request (since most forms check if POST was the request method before binding to the request).
[HttpKernel] fixed sub-request which should be always a GET (refs #3657)
merged branch vicb/profiler/mongo/fix (PR #3650)

Commits
-------

979c02b [HttpKernel] Fix MongoDbProfilerStorageTest

Discussion
----------

[HttpKernel] Fix MongoDbProfilerStorageTest

* The test was failing if no connection (trying to call purge)
* The extension / connection was tested before each single test
merged branch vicb/routing_cleanup (PR #3647)

Commits
-------

a8e17fe [Routing] Cleanup

Discussion
----------

[Routing] Cleanup

removing the obsolete `segment_separators` option
[FrameworkBundle] Allow configuration of session garbage collection for session 'keep-alive'.
replaced command names with supported placeholders in help texts
fix Command:asXml to use processed help
restore previous testing style with static fixtures for console
[FrameworkBundle] Remove default from gc_* session configuration keys.
[Translation] Ignore xliff entries with no "target" node
merged branch Tobion/command-name (PR #3285)

Commits
-------

447d468 restore previous testing style with static fixtures for console
11585c3 fix Command:asXml to use processed help
304e13d replaced command names with supported placeholders in help texts

Discussion
----------

using the placeholder in command help texts

Replaced the command names with the already supported placeholders `%command.name%` and `%command.full_name%`. Thus preventing typos in future commands based on the existing ones.

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

by fabpot at 2012-02-09T06:26:07Z

That breaks the unit tests.

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

by Tobion at 2012-02-09T17:05:06Z

fixed

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

by stof at 2012-02-09T17:43:47Z

can you rebase your branch please ? it conflicts with master

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

by stof at 2012-02-09T17:44:11Z

the reason is simple: SwiftmailerBundle is gone :)

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

by Tobion at 2012-02-09T23:23:23Z

done

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

by fabpot at 2012-02-11T23:47:10Z

Can you squash your commit before I merge this PR? Thanks.

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

by Tobion at 2012-02-12T13:57:14Z

I'm unable to squash it into 1 commit because of the uptream commits inside.
I hope it's fine now. If not someone needs to help me.

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

by stof at 2012-02-12T14:27:38Z

``git rebase -i upstream/master`` should allow you rebasing things and squashing them toghter (changing the action for the second commit to ``squash``)

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

by Tobion at 2012-02-12T14:47:29Z

first i tried with git rebase -i head~4 (4 commits), but this showed many more external commits. second I tried git reset --soft with a clean commit, but still no success.
then I used your proposal. and there are always conflicts of stuff that is not part of my PR.
now the diff is messed up...
this is frustrating

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

by stof at 2012-02-12T14:58:43Z

The only reason why the diff is messed is because you messed it when resolving the conflicts by choosing the wrong result for the output. Please fix things as it means that merging your PR would revert changes done previosuly

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

by stof at 2012-02-12T15:00:18Z

Basically, you reverted most of the changes done in Symfony the few last days.

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

by Tobion at 2012-02-12T15:10:59Z

I used `git checkout --theirs .` when resolving. Whats the correct way?

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

by stof at 2012-02-12T15:13:21Z

Well, I generally resolve the conflicts myself instead of asking git to use one version, as generally the final code is not one of the versions by a mix of both versions (as both sides are likely to have done useful changes)

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

by Tobion at 2012-02-12T15:15:02Z

Yes but the conflicts are in files I never touched and that are not part of my changes.
I cannot resolve hundreds of files by hand.

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

by Tobion at 2012-02-12T15:41:31Z

Finally it worked. I used git reset head~1 and then discarded all foreign changes.
There you go.

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

by Tobion at 2012-02-14T14:06:04Z

@fabpot ping

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

by Tobion at 2012-02-20T18:20:50Z

@fabpot ping

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

by stof at 2012-03-02T22:14:49Z

@Tobion the branch needs to be rebased. It conflicts with master

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

by Tobion at 2012-03-21T04:22:10Z

All done. I don't want to squash commits because they are self-contained fixes and changes that might be needed for future references (like the dynamic tests for -`>run()`).
merged branch vicb/form/guess/length (PR #3645)

Commits
-------

fc7c7f6 [Form] Fix min/max length guessing for numeric types (fix #3091)

Discussion
----------

[Form] Fix min/max length guessing for numeric types (fix #3091)

Before this PR, the length was guessed from `strlen(min/max)`.

This is obviously false for float: `strlen("1.123") > strlen ("5")` then this guess is now low confidence only and is masked by a `null` medium confidence guess for floats (implemented in both doctrine ORM & validator).

This PR also includes some code reorg in order to improve readability.

I'll update Propel & Mongo if needed once this is merged.

_note: `5.000` did neither work because of `5e3`_

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

by Koc at 2012-03-19T23:42:01Z

Will `strlen` works correctly with multibyte strings?

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

by vicb at 2012-03-19T23:58:33Z

could numeric types be multibyte strings ?

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

by Koc at 2012-03-20T00:07:24Z

I thought it somehow concerns `Symfony\Component\Validator\Constraints\MaxLengthValidator` too.

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

by vicb at 2012-03-20T00:20:33Z

This PR is about numeric types only and the MaxLengthValidator is [multibyte safe:](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Validator/Constraints/MaxLengthValidator.php#L45)
[TwigBundle] Changed getAndCleanOutputBuffering() handling of systems where ob_get_level() never returns 0

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/lencioni/symfony.png)](http://travis-ci.org/lencioni/symfony)
Fixes the following tickets: -
Todo: -

Relying on decrementing a counter has two problems. First, and most importantly, if the output buffering nesting level is greater than the counter, the function does not perform the expected task. Secondly, on systems where the counter is needed, a lot of unnecessary extra loops would potentially occur.

This approach checks to see if the level has stayed the same from the previous iteration and if it has it stops looping.
[TwigBundle] Improved ExceptionController docblocks

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/lencioni/symfony.png)](http://travis-ci.org/lencioni/symfony)
Fixes the following tickets: -
Todo: -
unused variable removed
merged branch bamarni/master (PR #3670)

Commits
-------

3638c72 unused variable removed

Discussion
----------

[FrameworkBundle] unused variable removed
merged branch aerialls/xliff_fix (PR #3664)

Commits
-------

93d2a4f [Translation] Ignore xliff entries with no "target" node

Discussion
----------

[Translation] Ignore xliff entries with no "target" node

This PR will ignore some entries with no "target" node when a xliff file is loaded.

```xml
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
  <file source-language="en" datatype="plaintext" original="file.ext">
    <body>
      <trans-unit id="1">
        <source>foo</source>
        <target>bar</target>
      </trans-unit>
      <trans-unit id="2">
        <source>extra</source>
      </trans-unit>
    </body>
  </file>
</xliff>
```
Before:

```php
array(
    'foo'   => 'bar',
    'extra' => ''
);
```

After:

```php
array(
    'foo' => 'bar'
);
```

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

by fabpot at 2012-03-21T17:35:51Z

Wouldn't it be better to throw an exception for such cases? A `trans-unit` without a `target` is useless anyway, no?

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

by aerialls at 2012-03-21T20:25:19Z

I'm using transifex (https://www.transifex.net/home/) and when a user doesn't translate an entry, transifex fills up a `trans-unit` node without a `target` children.
merged branch rdohms/upload-validation-details (PR #3637)

Commits
-------

836d12b Fixing typo.
ac2a187 Improved feedback for Upload Validator to cover all PHP error states. This way we don't get a unclear "upload error" message unless its something completely unexpected.

Discussion
----------

Improved feedback for Upload Validator to cover all PHP error states.

The upload validator only sets individual messages for 2 out of the 7 error states PHP suports for uploading files. Which means when you have any of those 5 stats you get a standard error message and have to really dig into the code to read the error state.

I added messages for every state, so that you will always get a detailed message.

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

by stloyd at 2012-03-19T13:54:04Z

You should probably also extend translations in `FrameworkBundle`.

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

by rdohms at 2012-03-19T14:04:50Z

@stloyd what's the best way to do that? I obviously don't speak all languages. Could you point me to a best practices in this case?

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

by stof at 2012-03-19T15:58:17Z

@rdohms update the translations for the languages you speak. Other people will contribute with update later eventually :)

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

by rdohms at 2012-03-19T22:34:50Z

Fixed the typo, only other language i can update is portuguese, but it needs more work. I'll update it on a separate PR later on.

Anything else for this PR?

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

by mvrhov at 2012-03-20T05:41:00Z

@rdohms: just put English strings into other lanugages

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

by rdohms at 2012-03-20T07:35:56Z

@mvrhov is there a quick way to do this? or is it copying and pasting into every language and adjusting the string IDs?

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

by mvrhov at 2012-03-20T09:02:59Z

AFAIK you'll have to copy paste. String ids and source are the same in all translations so it really is just c/p after you update the first one.

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

by rdohms at 2012-03-20T09:56:48Z

@mvrhov so which is the most updated one you would say? i see a lot of them missing bit and pieces :P

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

by mvrhov at 2012-03-20T14:00:21Z

Sorry no idea.

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

by stof at 2012-03-20T19:09:10Z

@mvrhov Please don't do this. The translation component has a fallback mecanism so putting the EN string in an incomplete translation file is a bad idea as it forbids using a fallback.

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

by rdohms at 2012-03-20T20:14:50Z

@stof i figured as much.

Any other concerns before we push this PR further?
fixed previous merge
remove callback from constructor and create method