Commit Graph

21546 Commits

Author SHA1 Message Date
Nicolas Grekas f59a0baa95 Merge branch '2.7' into 2.8
* 2.7:
  Update DateTimeToArrayTransformer.php
  Mock microtime() and time() in transient tests
  Azerbaijani language pluralization rule
  Move HHVM tests out of the allowed failures
2015-07-01 20:24:26 +02:00
Nicolas Grekas 734fdbe702 [VarDumper] Fix tests for HHVM 2015-07-01 20:24:23 +02:00
Nicolas Grekas 4b9446edf8 Merge branch '2.6' into 2.7
* 2.6:
  Update DateTimeToArrayTransformer.php
  Mock microtime() and time() in transient tests
  Azerbaijani language pluralization rule
  Move HHVM tests out of the allowed failures
2015-07-01 20:23:16 +02:00
Nicolas Grekas d5cbc46cd9 Merge branch '2.3' into 2.6
* 2.3:
  Update DateTimeToArrayTransformer.php
  Mock microtime() and time() in transient tests
  Azerbaijani language pluralization rule
  Move HHVM tests out of the allowed failures
2015-07-01 20:23:01 +02:00
Fabien Potencier 6bcdee057e minor #15166 Mock microtime() and time() in transient tests (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

Mock microtime() and time() in transient tests

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

Commits
-------

8319ca3 Mock microtime() and time() in transient tests
2015-07-01 19:11:21 +02:00
Fabien Potencier f082cd323b minor #15164 Move HHVM tests out of the allowed failures (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

Move HHVM tests out of the allowed failures

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

2.3, 2.6 and 2.7 are now green on HHVM, let's ensure this remains always true!

Commits
-------

ff2ead1 Move HHVM tests out of the allowed failures
2015-07-01 19:07:52 +02:00
Fabien Potencier bace7aeb0b bug #15163 Update DateTimeToArrayTransformer.php (zhil)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #15163).

Discussion
----------

Update DateTimeToArrayTransformer.php

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

php have annoying bug with timezone handling. Some timezones (like US/Eastern, US/Central, US/Mountain) are considered "not standard" and not parsed in some cases.
For example, code
```
php -r '$d = new \DateTime("2015-07-01 16:11", new \DateTimeZone("US/Eastern")); print $d->format("r");'
```
return output
```
Wed, 01 Jul 2015 16:11:00 -0400
```

However, code
```
php -r '$d = new \DateTime("2015-07-01 16:11 US/Eastern"); print $d->format("r");'
```
throw exception
```
Exception' with message 'DateTime::__construct(): Failed to parse time string (2015-07-01 16:11 US/Eastern) at position 17 (U): The timezone could not be found in the database'
```

Thats why timezone US/Eastern works in some cases and didnt work in other cases.
This PR fix usage of US/Eastern in code like

```
$formBuilder->add("createdTimestamp", "datetime", ['view_timezone'=$user->timezone])
```

Commits
-------

27b824a Update DateTimeToArrayTransformer.php
2015-07-01 19:05:18 +02:00
zhil 27b824a6b7 Update DateTimeToArrayTransformer.php 2015-07-01 19:05:17 +02:00
Nicolas Grekas 8319ca3b05 Mock microtime() and time() in transient tests 2015-07-01 18:07:08 +02:00
Fabien Potencier 2c0c232f21 bug #15150 [Translation] Azerbaijani language pluralization rule is wrong (shehi)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #15150).

Discussion
----------

[Translation] Azerbaijani language pluralization rule is wrong

In AZ, as in TR, pluralization is always 0:

0 kitab (zero books)
1 kitab (1 book)
3 kitab (3 books)
104 kitab (104 books)

Apparently ZF ruleset was wrong in the first place :)

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

Commits
-------

efd927a Azerbaijani language pluralization rule
2015-07-01 16:29:21 +02:00
Şəhriyar İmanov efd927a660 Azerbaijani language pluralization rule
In AZ, as in TR, pluralization is always 0: 

0 kitab (zero books)
1 kitab (1 book)
3 kitab (3 books)
104 kitab (104 books)

Apparently ZF ruleset was wrong in the first place :)
2015-07-01 16:29:20 +02:00
Abdellatif Ait boudad 05f3c3db7b Merge remote-tracking branch 'origin/2.7' into 2.8
Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php
	src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveDefinitionTemplatesPassTest.php
2015-07-01 14:16:54 +00:00
Nicolas Grekas ff2ead17f9 Move HHVM tests out of the allowed failures 2015-07-01 15:03:16 +02:00
Nicolas Grekas b4fc321912 Fix merge 2015-07-01 14:07:40 +02:00
Nicolas Grekas eb179f9032 Merge branch '2.6' into 2.7
* 2.6:
  [2.6] Towards 100% HHVM compat
  [Security/Http] Fix test
  [Stopwatch] Fix test
  Minor fixes
  Towards 100% HHVM compat
  unify default AccessDeniedExeption message
  trigger event with right user (add test)
  [Security] Initialize SwitchUserEvent::targetUser on attemptExitUser
  [Form] Fixed: Data mappers always receive forms indexed by their names

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php
	src/Symfony/Component/VarDumper/Tests/CliDumperTest.php
	src/Symfony/Component/VarDumper/Tests/HtmlDumperTest.php
2015-07-01 13:25:50 +02:00
Fabien Potencier bfa28d6e41 feature #15154 [Validator] Added missing error codes and turned codes into UUIDs (webmozart)
This PR was merged into the 2.8 branch.

Discussion
----------

[Validator] Added missing error codes and turned codes into UUIDs

Reopened #12388 on the 2.8 branch.

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

With the current implementation of error codes, checking which error occurred is unnecessarily complex:

```php
if ($violation->getConstraint() instanceof Length && Length::TOO_SHORT_ERROR === $violation->getCode()) {
    // ...
}
```

Also, the code is completely missing for some constraints. This is fixed now. By using UUIDs, the check is reduced to:

```php
if (Length::TOO_SHORT_ERROR === $violation->getCode()) {
    // ...
}
```

Also, APIs can simply output the error code and the name of the error without needing to point to the constraint as well.

Before:

```json
[
    {
        "code": "1",
        "name": "TOO_SHORT_ERROR",
        "message": "This value is too short. ...",
        "constraint": "Symfony\\Component\\Validator\\Constraints\\Length"
    }
]
```

After:

```json
[
    {
        "code": "9ff3fdc4-b214-49db-8718-39c315e33d45",
        "name": "TOO_SHORT_ERROR",
        "message": "This value is too short. ..."
    }
]
```

This makes it possible to implement a service on symfony.com which looks up error codes, e.g.

symfony.com/error?code=9ff3fdc4-b214-49db-8718-39c315e33d45

Such a URL could redirect directly to the documentation of the appropriate constraint. We could even support user-submitted error codes which redirect to the documentation of that constraint.

Commits
-------

8874e88 [Validator] Added missing error codes and turned codes into UUIDs
2015-07-01 13:21:15 +02:00
Fabien Potencier a83487821f bug #15159 [2.6] Towards 100% HHVM compat (nicolas-grekas)
This PR was merged into the 2.6 branch.

Discussion
----------

[2.6] Towards 100% HHVM compat

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

Failing components:
- [x] HttpFoundation
- [x] HttpKernel
- [x] VarDumper

Related HHVM issues:
- https://github.com/facebook/hhvm/issues/5563

Commits
-------

8a78255 [2.6] Towards 100% HHVM compat
2015-07-01 13:18:19 +02:00
Nicolas Grekas 8a782556eb [2.6] Towards 100% HHVM compat 2015-07-01 12:03:42 +02:00
Nicolas Grekas 6a45129b41 [Security/Http] Fix test 2015-06-30 18:51:15 +02:00
Nicolas Grekas 700487002f Merge branch '2.3' into 2.6
* 2.3:
  [Stopwatch] Fix test
2015-06-30 18:49:57 +02:00
Nicolas Grekas 9de0d60b2c [Stopwatch] Fix test 2015-06-30 18:34:54 +02:00
Nicolas Grekas c53ee35a2e Merge branch '2.3' into 2.6
* 2.3:
  Minor fixes
  Towards 100% HHVM compat
  trigger event with right user (add test)
  [Security] Initialize SwitchUserEvent::targetUser on attemptExitUser
  [Form] Fixed: Data mappers always receive forms indexed by their names

Conflicts:
	src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php
	src/Symfony/Component/Filesystem/Filesystem.php
	src/Symfony/Component/Process/Tests/AbstractProcessTest.php
2015-06-30 18:10:16 +02:00
Nicolas Grekas 6e1ae53fea Minor fixes 2015-06-30 18:05:31 +02:00
Fabien Potencier 0020680d92 bug #15146 Towards 100% HHVM compat (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

Towards 100% HHVM compat

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

Failing components:
- [x] Debug
- [x] DependencyInjection
- [x] Filesystem
- [x] Form
- [x] HttpFoundation
- [x] Process
- [x] Routing

Related HHVM issues:
- https://github.com/facebook/hhvm/issues/5562
- https://github.com/facebook/hhvm/issues/5561
- https://github.com/facebook/hhvm/issues/5330
- https://github.com/facebook/hhvm/issues/3558
- https://github.com/facebook/hhvm/issues/4901

Commits
-------

b9a76ba Towards 100% HHVM compat
2015-06-30 17:31:35 +02:00
Bernhard Schussek 8874e88384 [Validator] Added missing error codes and turned codes into UUIDs 2015-06-30 16:06:42 +02:00
Nicolas Grekas b9a76bab5c Towards 100% HHVM compat 2015-06-30 15:39:12 +02:00
Fabien Potencier 32cbfd49d4 feature #15096 [DependencyInjection] Allow anonymous DefinitionDecorator resolving (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[DependencyInjection] Allow anonymous DefinitionDecorator resolving

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

This PR allows injecting anonymous DefinitionDecorator into services' arguments/properties, such as:

```php
$container->register('foo_service_name', 'FooClass')
    ->setProperty('bar', new DefinitionDecorator('definition_decorated_service'))
;
```

Commits
-------

e5763ce [DependencyInjection] Allow anonymous DefinitionDecorator resolving
2015-06-30 14:51:42 +02:00
Fabien Potencier b16fc6c2f6 bug #15061 [Form] Fixed handling of choices passed in choice groups (webmozart)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fixed handling of choices passed in choice groups

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

I introduced a bug in the 2.7 ChoiceList implementation when choices are passed as groups:

```
$form->add('response', 'choice', array(
    'choices' => array(
        'Decided' => array($yesObj, $noObj),
        'Undecided' => array($maybeObj),
    ),
    // use getName() for the labels
    'choice_label' => 'name',
    'choices_as_values' => true,
));
```

In this example, since the choices `$yesObj` and `$maybeObj` have the same array index `0`, the same label is displayed for the two options. The problem is that we rely on the keys passed in the "choices" option to identify choices in a choice list (which are, as you see, not guaranteed to be free of duplicates).

This PR changes the new choice list implementation to identify choices by values instead. We already have the guarantee that choices can be identified uniquely by their string values.

This PR should be included in 2.7.2 to fix the regression.

Unfortunately, a few BC breaks in the new implementation are necessary to make this fix:

* The legacy `ChoiceListInterface` was reverted to how it was in 2.6 and does *not* extend the new `ChoiceListInterface` anymore.
* As a consequence, legacy choice lists need to be wrapped into a `LegacyChoiceListAdapter` when they are passed to any place in the framework where a new choice list is expected.
* The new `ChoiceListInterface` has two additional methods `getStructuredValues()` and `getOriginalKeys()` now.
* `ArrayKeyChoiceList::toArrayKey()` was marked as internal.
* `ChoiceListFactoryInterface::createView()` does not accept arrays and Traversables anymore for the `$groupBy` parameter (for simplicity).

@fabpot Where should we document the upgrade path for 2.7.1 => 2.7.2?

Commits
-------

7623dc8 [Form] Fixed handling of choices passed in choice groups
2015-06-30 14:46:52 +02:00
Fabien Potencier cad16ac162 feature #14764 [TwigBundle] Warmup twig templates in non-standard paths (kbond)
This PR was submitted for the 2.7 branch but it was merged into the 2.8 branch instead (closes #14764).

Discussion
----------

[TwigBundle] Warmup twig templates in non-standard paths

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

Commits
-------

96cce38 Warmup twig templates in non-standard paths (closes #12507)
2015-06-30 13:50:17 +02:00
Kevin Bond 96cce38b00 Warmup twig templates in non-standard paths (closes #12507) 2015-06-30 13:50:17 +02:00
Fabien Potencier bfc174a178 bug #15145 [Bridge/PhpUnit] Enforce a consistent locale (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Bridge/PhpUnit] Enforce a consistent locale

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

Will fix some HHVM failures

Commits
-------

b04fe83 [Bridge/PhpUnit] Enforce a consistent locale
2015-06-30 11:32:10 +02:00
Nicolas Grekas b04fe832ac [Bridge/PhpUnit] Enforce a consistent locale 2015-06-30 10:16:45 +02:00
Fabien Potencier 38c08d1fb3 bug #15069 [Form] Fixed: Data mappers always receive forms indexed by their names (webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] Fixed: Data mappers always receive forms indexed by their names

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

This PR facilitates writing domain-specific data mappers, since it guarantees that you can access forms by name in the data mapper methods. Currently, `Form::add()` does not set the index of the array passed to the data mapper to the form's name.

Commits
-------

86b7fe5 [Form] Fixed: Data mappers always receive forms indexed by their names
2015-06-30 07:54:26 +02:00
Fabien Potencier f28ee56b67 bug #15137 [Security] Initialize SwitchUserEvent::targetUser on attemptExitUser (Rvanlaak, xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Security] Initialize SwitchUserEvent::targetUser on attemptExitUser

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

Commits
-------

f999217 trigger event with right user (add test)
01ee3f6 [Security] Initialize SwitchUserEvent::targetUser on attemptExitUser
2015-06-30 07:51:24 +02:00
Fabien Potencier c20720f9f6 bug #15142 Fix choice translation domain for expanded choice widget (jvasseur)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix choice translation domain for expanded choice widget

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

This fix the form component using the translation_domain instead of the choice_translation_domain for expanded choice widgets.

I had to add the possibility to skip label translation when using ```translation_domain => false``` to do this fix so this can be considered a new feature to.

Commits
-------

52755ba Fix choice translation domain for expanded choice widget
2015-06-30 07:47:57 +02:00
Fabien Potencier ffed0cec10 feature #15134 [FrameworkBundle] add option to force web server startup (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[FrameworkBundle] add option to force web server startup

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

The `server:start` command will report an error message when a lock file
does exist.

However, this means that you cannot restart the web server process if
the previously running process terminated accidentally or if it was
terminated by the user without executing the `server:stop` command (e.g.
by using the system's `kill` command or the task manager).

This commit adds a `--force` option that makes it possible to launch the
web server process even if a lock file does exist.

Commits
-------

1583fad add option to force web server startup
2015-06-30 07:45:10 +02:00
Fabien Potencier 148c7db74e minor #15143 unify default AccessDeniedExeption message (xabbuh)
This PR was merged into the 2.6 branch.

Discussion
----------

unify default AccessDeniedExeption message

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

Commits
-------

87e7709 unify default AccessDeniedExeption message
2015-06-30 07:44:03 +02:00
Tobias Schultze c8e999b198 minor #15144 [Finder] Fix PHPUnit param order (Dave Hulbert)
This PR was merged into the 2.7 branch.

Discussion
----------

[Finder] Fix PHPUnit param order

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

Fairly cosmetic but it confused me for a while when I broke tests and PHPUnit said something like

    --- Expected
    +++ Actual
    @@ @@
    -'/^(?=[^\.])x\.[^/]*$/'
    +'/^\.[^/]*$/'

Looks like 2.7 is the earliest this can be merged into.

Commits
-------

8e41a5b Fix param order of assertEquals (expected, actual) in test for Finder\Glob
2015-06-30 00:30:04 +02:00
Dave Hulbert 8e41a5b22a Fix param order of assertEquals (expected, actual) in test for Finder\Glob 2015-06-29 20:56:37 +01:00
Jérôme Vasseur 52755ba26d Fix choice translation domain for expanded choice widget 2015-06-29 21:23:41 +02:00
Christian Flothmann 87e7709b7b unify default AccessDeniedExeption message 2015-06-29 20:24:24 +02:00
Christian Flothmann f999217a96 trigger event with right user (add test) 2015-06-28 20:33:21 +02:00
Richard van Laak 01ee3f6cda [Security] Initialize SwitchUserEvent::targetUser on attemptExitUser
The `SwitchUserEvent` is triggered in case an account is switched. This works okay while switching to the user, but on exit the `SwitchUserEvent` is triggered again with the original User. That User was not initialized by the provider yet.

load user by UserInterface instead of username
2015-06-28 20:33:21 +02:00
Fabien Potencier 268210bcec fixed CS 2015-06-28 20:28:18 +02:00
Fabien Potencier 674b124b59 feature #14238 [config] added remove option to ignoreExtraKeys (twifty)
This PR was submitted for the 2.7 branch but it was merged into the 2.8 branch instead (closes #14238).

Discussion
----------

[config] added remove option to ignoreExtraKeys

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

I have added a remove option to the `ignoreExtraKeys()` method of `Config/Definition/Builder/ArrayNodeDefinition`. The current implementation removes all such keys from the resulting array. This can at times be an inconvenience as we have to write extra methods to remove them before the validation then add them back again when done. Passing a boolean to the method now leaves them in place.

Commits
-------

1df4ebe added remove option to ignoreExtraKeys
2015-06-28 20:28:03 +02:00
twifty 1df4ebecfd added remove option to ignoreExtraKeys 2015-06-28 20:28:03 +02:00
Fabien Potencier b6dbfa4b73 minor #15136 Fix quoting style consistency (2.7) (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix quoting style consistency (2.7)

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

Follows up #15129.

Commits
-------

2aab007 Fix quoting style consistency.
2015-06-28 19:27:31 +02:00
Fabien Potencier 873e3d9a74 Merge branch '2.6' into 2.7
* 2.6:
  [2.6][Validator] Fix BC for Validator's validate method
  Very small typo fix
  Fix quoting style consistency.
  [DependencyInjection] Fail when dumping a Definition with no class nor factory
  Normalizing recursively - see #9096
  No change - the normalizeParams is a copy-and-paste of the earlier logic
  fixes issue with logging array of non-utf8 data
  fix validation for Maestro UK card numbers

Conflicts:
	src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php
	src/Symfony/Component/Validator/Validator/LegacyValidator.php
2015-06-28 19:13:14 +02:00
Fabien Potencier e36e83117b Merge branch '2.3' into 2.6
* 2.3:
  Fix quoting style consistency.
  [DependencyInjection] Fail when dumping a Definition with no class nor factory
  Normalizing recursively - see #9096
  No change - the normalizeParams is a copy-and-paste of the earlier logic
  fixes issue with logging array of non-utf8 data
  fix validation for Maestro UK card numbers
2015-06-28 19:11:14 +02:00
Fabien Potencier 6e4563e7ee bug #15126 [2.6][Validator] Fix BC for Validator's validate method (michalmarcinkowski)
This PR was merged into the 2.6 branch.

Discussion
----------

[2.6][Validator] Fix BC for Validator's validate method

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

This fix makes method call ``` $validator->validate($value, array()); ``` backward compatible and does not throw

```
[Symfony\Component\Validator\Exception\NoSuchMetadataException]

The class or interface "XXX" does not exist.
```

when the ``` $value ``` is a scalar type.

Commits
-------

ffe25dc [2.6][Validator] Fix BC for Validator's validate method
2015-06-28 19:09:43 +02:00