return empty metadata collection if none do exist

The PropertyMetadataContainerInterface defines that the method
getPropertyMetadata() has to return an empty collection if no
metadata have been configured for the given property. Though, its
implementation in the ClassMetadata class didn't check for
existence of such metadata. This behavior led to unexpected PHP
notices when validating a property or a property value of a property
without any configured constraints (only affects the new 2.5 API).
Additionally, the getMemberMetadatas() didn't check for existing
array keys as well which has also been fixed.
[FrameworkBundle] Fixed validator factory definition when the Validator API is "auto" for PHP < 5.3.9
[Validator] Fixed Constraint class to not destroy custom groups upon serialization
bug #11584 [FrameworkBundle] Fixed validator factory definition when the Validator API is "auto" for PHP < 5.3.9 (webmozart)

This PR was merged into the 2.5 branch.

Discussion
----------

[FrameworkBundle] Fixed validator factory definition when the Validator API is "auto" for PHP < 5.3.9

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

Commits
-------

a74b758 [FrameworkBundle] Fixed validator factory definition when the Validator API is "auto" for PHP < 5.3.9
bug #11691 [Validator] Fixed Constraint class to not destroy custom groups upon serialization (webmozart)

This PR was merged into the 2.6-dev branch.

Discussion
----------

[Validator] Fixed Constraint class to not destroy custom groups upon serialization

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

Commits
-------

d405f43 [Validator] Fixed Constraint class to not destroy custom groups upon serialization
minor #11615 [Validator] return empty metadata collection if none do exist (xabbuh)

This PR was merged into the 2.3 branch.

Discussion
----------

[Validator] return empty metadata collection if none do exist

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | [The reference to the documentation PR if any]

Backport of #11614 for Symfony 2.3 and 2.4.

Commits
-------

f5bc18d return empty metadata collection if none do exist
[Validators] Fixed failing tests requiring ICU 52.1 which are skipped otherwise
bug #11695 [Validators] Fixed failing tests requiring ICU 52.1 which are skipped otherwise (webmozart)

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

Discussion
----------

[Validators] Fixed failing tests requiring ICU 52.1 which are skipped otherwise

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

I just ran the tests with ICU 52.1 installed and noticed that a few of them failed. This PR fixes these tests.

Commits
-------

5440ed5 [Validators] Fixed failing tests requiring ICU 52.1 which are skipped otherwise
Merge branch '2.3' into 2.4

* 2.3:
  [Validators] Fixed failing tests requiring ICU 52.1 which are skipped otherwise
  return empty metadata collection if none do exist
Merge branch '2.4' into 2.5

* 2.4:
  [Validators] Fixed failing tests requiring ICU 52.1 which are skipped otherwise
  return empty metadata collection if none do exist
[Validator] Fixed missing use statements
Merge branch '2.5'

* 2.5:
  [Validator] Fixed missing use statements
  [Validators] Fixed failing tests requiring ICU 52.1 which are skipped otherwise
  [FrameworkBundle] Fixed validator factory definition when the Validator API is "auto" for PHP < 5.3.9
  return empty metadata collection if none do exist
[Validator] Added ConstraintViolation::getConstraint()
feature #11657 [Validator] Added ConstraintViolation::getConstraint() (webmozart)

This PR was merged into the 2.6-dev branch.

Discussion
----------

[Validator] Added ConstraintViolation::getConstraint()

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

This PR adds a `getConstraint()` method to the `ConstraintViolation` in order to access the constraint causing the violation.

Related to #7276, #7273 and #9691.

Commits
-------

ce1d209 [Validator] Added ConstraintViolation::getConstraint()
Add shortcut methods to controllers

Add redirectToRoute, addFlash, isGranted and checkGranted to controllers
Change all the added methods to be protected

Change redirectToRoute, addFlash, isGranted and checkGranted access to protected
Check container and custom exception messages

Added a check on loaded services in addFlash and isGranted, changed checkGranted name to a more verbose one and allows to pass a message to the AccessDeniedException.
Changed function name and default message

denyAccessIfNotGranted -> denyAccessUnlessGranted and Access Denied"."
Added helpers to changelog