fixed some phpdoc
optimized string starts with checks

Doing this with strpos() is slightly faster than substr().
[HttpKernel] removed unnecessary regex

The pattern was also flawed because of the unescaped `.`
merged branch canni/fix_collection_validator (PR #3078)

Commits
-------

7f7c2a7 Add prof-of-concept test, this test will fail without changes in previous commit
253eeba [BugFix][Validator] Fix for PHP incosistent behaviour of ArrayAccess

Discussion
----------

[BugFix][Validator] Fix for PHP incosistent behaviour of ArrayAccess

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

[![Build Status](https://secure.travis-ci.org/canni/symfony.png)](http://travis-ci.org/canni/symfony)

Because PHP function `array_key_exists` is buggy, it works great with native
PHP `ArrayObject` instances, but hand written implementations of `ArrayAccess`
and `Traversable` objects will fail to work with `CollectionValidator`

Tests from second commit are valid use cases, but without this change, they will fail.
merged branch kriswallsmith/kernel/unnecessary-regex (PR #3104)

Commits
-------

7f7f82a [HttpKernel] removed unnecessary regex

Discussion
----------

[HttpKernel] removed unnecessary regex

The pattern was also flawed because of the unescaped `.`

```
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
```
merged branch kriswallsmith/strpos (PR #3097)

Commits
-------

fe62401 optimized string starts with checks

Discussion
----------

optimized string starts with checks

Doing this with strpos() is slightly faster than substr().

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

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

by vicb at 2012-01-11T19:58:27Z

How faster ? even if the string is long and do not contain an occurrence of the sub-string ?
Looks like micro-(not)-optimizations to me.

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

by kriswallsmith at 2012-01-11T20:04:26Z

The difference is about 0.1s when repeated 1M times.

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

by vicb at 2012-01-11T20:08:12Z

% would be better (machine & env independant), what string size, what match offset ?
I personally vote against (`substr` is more meaningful to me and I do not like micro-optims)

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

by kriswallsmith at 2012-01-11T20:12:34Z

I personally consider this a coding standard but don't want to bikeshed here :)

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

by vicb at 2012-01-11T20:28:08Z

I have [tried](https://gist.github.com/1596588) at home.
`strpos ` **is** faster unless you have a very long string, probably because you do not need to create a new string, interesting, thanks for the tip.

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

by Tobion at 2012-01-11T22:40:18Z

I think strpos() is more useful. Say you want to change the string you have to replace 2 variables (the text and the length parameter) when using substr(). It could also introduce bugs when they don't match. With strpos() it's only the text.

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

by robocoder at 2012-01-11T22:43:22Z

alternate micro-optimization that doesn't create a temporary string:
```
strncmp($v, "@", 1) === 0
```

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

by Tobion at 2012-01-11T22:47:12Z

@robocoder probably the fastest solution but needs to be benchmarked
[Yaml][Parser] throw an exception if not readable
[Yaml][Parser] changes according review
[HttpFoundation] added missing trustProxy condition
merged branch kriswallsmith/http/forwarded-port (PR #3111)

Commits
-------

d67d419 [HttpFoundation] added missing trustProxy condition

Discussion
----------

[HttpFoundation] check trust setting in getPort()

Added a missing `self::$trustProxy` check in `Request::getPort()`.

```
Bug fix: yes
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
```
merged branch makasim/yaml-throw-not-readable (PR #3105)

Commits
-------

7961014 [Yaml][Parser] changes according review
efce640 [Yaml][Parser] throw an exception if not readable

Discussion
----------

[Yaml][Parser] throw an exception if service file not readable.

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

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

by makasim at 2012-01-13T15:49:49Z

 @fabpot done
added a missing use statement
fix expected return type of MutableAclProvider
[Bugfix][Locale] Fixed incomplete Locale data loading

Sublocales like de_CH returned only incomplete results for
getDisplayCountries(), getDisplayLanguages() and getDisplayLocales(),
consisting only of results specific for this sublocale, but without the
results of their respective parent locale
[Locale] Removed unneccesary semi-colon
merged branch havvg/patch-2 (PR #3125)

Commits
-------

360f574 fix expected return type of MutableAclProvider

Discussion
----------

fix expected return type of MutableAclProvider
merged branch ManuelKiessling/ticket_3090_bugfix (PR #3127)

Commits
-------

7e14a56 [Locale] Removed unneccesary semi-colon
cacc880 [Bugfix][Locale] Fixed incomplete Locale data loading

Discussion
----------

[Bugfix][Locale] Fixed incomplete Locale data loading

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

Sublocales like de_CH returned only incomplete results for
getDisplayCountries(), getDisplayLanguages() and getDisplayLocales(),
consisting only of results specific for this sublocale, but without the
results of their respective parent locale

This PR was https://github.com/symfony/symfony/pull/3106 before - reopened it as a new PR because the commits were too chaotic.
[HttpFoundation] fixed exception message (closes #3123)
Use reflection to determaine the correct path for component validation.xml file
merged branch henrikbjorn/2.0 (PR #3133)

Commits
-------

959614b Use reflection to determaine the correct path for component validation.xml file

Discussion
----------

2.0

Validation.xml use reflection to guess path