Avoid levenshtein comparison when using ContainerBuilder.
bug #10536 Avoid levenshtein comparison when using ContainerBuilder. (catch56)

This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #10536).

Discussion
----------

Avoid levenshtein comparison when using ContainerBuilder.

[DependencyInjection] ContainerBuilder catches exceptions when a service isn't found by Container::get().

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

In the process of building the exception message, I saw over 13k calls to levenshtein() when profiling a Drupal request where there's no compiled container yet, this adds around 36ms+ to the request for the function calls themselves, more for the overall logic.

Made the levenshtein calls optional based on a property on the class, then ContainerBuilder can set that to false and skip the suggestions.

![lev-before](https://f.cloud.github.com/assets/116285/2525110/d6dd3a90-b4eb-11e3-934a-a3726e0f8f09.png)
![lev-after](https://f.cloud.github.com/assets/116285/2525114/dd2de0fc-b4eb-11e3-8df0-598cadf2286b.png)

Commits
-------

cc9cc37 Avoid levenshtein comparison when using ContainerBuilder.
fixed CS
Fixed bug in ChoiceType triggering a warning when not using utf-8

This fixes issue #10409 by not using json_encode anymore, but serialize
instead.
Added test case for 4c6a2d15095c13b2a35751b2b2712b183be489c4
bug #10568 [Form] Fixed hashing of choice lists containing non-UTF-8 characters (webmozart)

This PR was merged into the 2.3 branch.

Discussion
----------

[Form] Fixed hashing of choice lists containing non-UTF-8 characters

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #10409
| License       | MIT
| Doc PR        | -

Commits
-------

18dc9a7 Added test case for 4c6a2d15095c13b2a35751b2b2712b183be489c4
73d56f7 Fixed bug in ChoiceType triggering a warning when not using utf-8
fixed CS
fixed the profiler when an uncalled listener throws an exception when instantiated
bug #10564 fixed the profiler when an uncalled listener throws an exception when instantiated (fabpot)

This PR was merged into the 2.3 branch.

Discussion
----------

fixed the profiler when an uncalled listener throws an exception when instantiated

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #10371
| License       | MIT
| Doc PR        | n/a

When the profiler gets the uncalled listeners, the current page is broken without a very clear message. That happens when a listener is a service that depends for instance on the request; creating this service throws an exception.

After this patch, if we cannot get the listeners, we give up and add a log message about the problem (the error message is an info as the problem is not really related to the toolbar but more about how things work).

Commits
-------

79540d4 fixed the profiler when an uncalled listener throws an exception when instantiated
[Form] Accept interfaces to be passed to "data_class"
[Form] Added test case for 4759e062ed004749dbdc2ba31aef0f8ac2601895
[PropertyAccess] Refactored PropertyAccessorTest
[PropertyAccess] Refactored PropertyAccessorCollectionTest
[PropertyAccess] Added isReadable() and isWritable()
[Form] ObjectChoiceList now compares choices by their value, if a value path is given
[PropertyAccess] Fixed CS and added missing documentation
Fix class names in ApcUniversalClassLoader tests.
minor #10577 [ClassLoader] Fix class names in ApcUniversalClassLoader tests. (idn2104)

This PR was merged into the 2.3 branch.

Discussion
----------

[ClassLoader] Fix class names in ApcUniversalClassLoader tests.

[ClassLoader] These tests were failing due to a leading slash in the class name. Support for the leading slash in findFile was removed a while ago, but the Apc tests were not updated. See #10576 for more details.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #10576
| License       | MIT
| Doc PR        | N/A

Commits
-------

dc0f8f9 Fix class names in ApcUniversalClassLoader tests.
[Process] fixed HHVM usage on the CLI
upgraded PHPUnit to version 4 for better HHVM support