[Locale] updated StubIntlDateFormatter::format() behavior for PHP >= 5.3.4
merged branch eriksencosta/locale (PR #3840)

Commits
-------

31dde14 [Locale] updated StubIntlDateFormatter::format() behavior for PHP >= 5.3.4

Discussion
----------

[Locale] updated StubIntlDateFormatter::format() behavior for PHP >= 5.3.4

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -

[![Build Status](https://secure.travis-ci.org/eriksencosta/symfony.png?branch=locale)](http://travis-ci.org/eriksencosta/symfony)

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

by drak at 2012-04-08T23:20:20Z

This looks like a feature addition as opposed to a bug fix and if so, should probably go in the master branch rather than 2.0.

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

by stof at 2012-04-08T23:30:25Z

@drak it is a bug fix as the stub is meant to have the same behavior than the real intl

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

by drak at 2012-04-08T23:36:08Z

ok, thanks for the clarification, I wasnt sure.

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

by eriksencosta at 2012-04-08T23:44:22Z

@stof is right. I myself fixed it in master and then remembered that bug fixes should be made in 2.0.
[Filesystem] rename() throws RuntimeException on error (fixes #3848).
[Filesystem] Fixed docs for rename().
[Filesystem] Added silence operator to rename().
[Filesystem] Written missing tests.
Fixed base URL detection when request URI contains encoded chars

Signed-off-by: Victor Berchet <victor@suumit.com>
merged branch alessandro1997/issue-3848 (PR #3849)

Commits
-------

78d6f3f [Filesystem] Written missing tests.
1998f3f [Filesystem] Added silence operator to rename().
7ce5a52 [Filesystem] Fixed docs for rename().
3f2865b [Filesystem] rename() throws RuntimeException on error (fixes #3848).

Discussion
----------

[Filesystem] rename() throws RuntimeException on error.

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #3848

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

by alessandro1997 at 2012-04-09T19:32:23Z

I have a doubt: I can't write any tests since the rename() function generates a warning if an error occurs. Should I use the silence operator or what else?

Maybe @stof could enlighten me?
[Routing] Request methods always return a raw path, fix the matcher to decode only once

sq
merged branch vicb/url_decoding (PR #3780)

Commits
-------

55014a6 [Routing] Request methods always return a raw path, fix the matcher to decode only once
d17ba0e Fixed base URL detection when request URI contains encoded chars

Discussion
----------

[RFC] Fix issues with url decoding

Related: #2324, #2963, #2962, #2579

### This PR fixes two issues:

* `+` in paths were turned to " " by `urldecode()`
* `urldecode()` was called a few times (and a different number of times according to which part of the path was handled, see #2962 for details).

### BC Breaks:

* `Request::getPathInfo()`, `Request::getBaseUrl()` and `Request::getBasePath` now return the raw (encoded) path (vs a decoded path before this PR). You should check any calls to these methods in your code and wrap them in `rawurldecode()` if needed.
* The `UrlMatcher` now decodes the URL only once (i.e. variable are no more decoded twice) and use `rawurldecode()` to support `+`.

### Notes:

* @arnaud-lb, the first commit is based on your #2963 so I put your name for the commit,

### Comment history from the original PR:

@vicb

**The state before this PR:**

* getRequestUri() returns an **encoded** value
* getPathInfo() returns a **decoded** value
* getBaseUrl() returns a **decoded** value
* getBasePath() returns a **decoded** value

The decoded value is wrong as `urldecode` is used in place of `rawurldecode` turning `+` into a space character (#2324).

The matcher starts by urldecoing the path (it is already decoded as explained right before) and then urldecodes each variable one more time.

We end up with a path being decoded twice and variables being decoded three times.

`Request::getUri()` calls both `getBaseUrl()` and `getPathInfo()` so that the return URI is **decoded**.

**The state after the PR:**

* getRequestUri() returns an **encoded** value
* getPathInfo() returns an **encoded** value
* getBaseUrl() returns an **encoded** value
* getBasePath() returns an **encoded** value

We are consistent and we have the raw values everywhere - there is no (easy) way to get the encoded value back once it has been decoded as it is done in the current code.

The matcher relies on an encoded value and decode the value only once (using `rawurldecode` to support `+`s).

So basically this PR:

* fix a bug - URL with `+` are now supported,
* makes paths consistent - encoded values everywhere, including `getUri()`
* makes variables consistent: they are decoded only once - the same as query string parameters.

There are some BC breaks:

* getPathInfo() returns an encoded value vs a decoded one before,
* getBaseUrl() returns an encoded value vs a decoded one before.
* getBasePath() returns an encoded value vs a decoded one before.

Any code relying on the output of one of the 2 previous methods should be checked and upgraded if needed. I am interested in the use cases where your code need to be updated.

@Seldaek

I checked a few projects and this is what I found (usage of getPathInfo & getBaseUrl):

- One use case of getPathInfo to check if the url started with `/something/` which is a prefix used for all "overlay" content which had to be treated differently somewhere => most likely unaffected
- One use case for checking path prefixes by regex in our [CorsBundle](https://github.com/nelmio/NelmioCorsBundle/blob/master/EventListener/CorsListener.php#L52-56) => potentially affected depending on the complexity of regexes I'd say

@vicb

Thanks @Seldaek for reporting the use cases. You second case would be solved by `rawurldecode`ing the path info which is a minimal change.

And in general I think we have to expand to doc to specify the url format that should be used.

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

by vicb at 2012-04-04T13:42:21Z

I'll squash the commits before this gets merged but for now it make the review easier.
removed `param_converter` from symfony-1.0.xsd
fixed typehints in docblocks (IDE completion works now)
merged branch pminnieur/patch-2 (PR #3852)

Commits
-------

a56bea6 removed `param_converter` from symfony-1.0.xsd

Discussion
----------

removed `param_converter` from symfony-1.0.xsd

I think its a relict of the SensioFrameworkExtraBundle?
fixed used statements
merged branch brikou/typehint_fix (PR #3853)

Commits
-------

6486e25 fixed used statements
3530858 fixed typehints in docblocks (IDE completion works now)

Discussion
----------

Typehint fix

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

by fabpot at 2012-04-10T09:12:51Z

For type hint in PHPDoc, we are using the class name and not the full namespace (of course, we need the associated use statement).

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

by brikou at 2012-04-10T09:29:39Z

@fabpot ok fabien, i've added the use statements and (for both entityRepository and manager) cheer
removed obsolete files
[Form] Fixed handling of expanded choice lists, checkboxes and radio buttons with empty values ("")
[Form] Simplified choice list API
[Form] Fixed behavior of expanded multiple-choice field when submitted without ticks
[Form] Changed checkboxes in an expanded multiple-choice field to not include the choice index