Commit Graph

29334 Commits

Author SHA1 Message Date
Fabien Potencier
2183f98f54 feature #20973 [DI] Add getter injection (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Add getter injection

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

Getter overriding by the container will allow a new kind of dependency injection which enables easier laziness and more immutable classes, by not requiring any corresponding setter. See linked issue for more.

This is WIP:
- [x] wire the concept
- [x] dump anonymous classes with PhpDumper
- [x] generate at runtime in ContainerBuilder::createService
- [x] tests
- [x] make it work on PHP 5

Commits
-------

cb498580d1 [DI] Add getter injection
2017-01-30 11:43:35 -08:00
Fabien Potencier
b465634a55 minor #21461 [HttpFoundation] Mark more methods as @final (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[HttpFoundation] Mark more methods as `@final`

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

Follow up of #19734 (ping @GuilhemN)

Commits
-------

84a664f929 [HttpFoundation] Mark more methods as `@final`
2017-01-30 08:06:19 -08:00
Fabien Potencier
5378bc9b55 minor #21424 [FrameworkBundle] Revert AbstractDescriptorTest output trimming (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Revert AbstractDescriptorTest output trimming

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no, but fixes an annoying/unhelping test output and fixes false positives
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/21129/files#diff-0e52187cbf1067a310538287da74ddb5R178
| License       | MIT
| Doc PR        | N/A

#### Before output when having a failing test, for instance, in a `TextDescriptor` fixture:

```diff
There was 1 failure:

1) Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\TextDescriptorTest::testDescribeContainerDefinitionWhichIsAnAlias with data set #1 (Symfony\Component\DependencyInjection\Alias Object (...), ' // This serv...------', Symfony\Component\DependencyInjection\ContainerBuilder Object (...), array('alias_2'))
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-' // This service is an alias for the service service_2 Information for Service "service_2" =================================== ------------------ ---------------------------------  Option   Value  ------------------ --------------------------------- Class Full\Qualified\Class2 Tags tag1 (attr1: val1, attr2: val2) tag1 (attr3: val3) tag2 Calls setMailer Public no Synthetic yes Lazy no Shared yes Abstract no Autowired no Autowiring Types - Required File /path/to/file Factory Service factory.service Factory Method get ------------------ ---------------------------------'
+' // This service is an alias for the service service_2 Information for Service "service_2" =================================== ------------------ ---------------------------------  Option   Value  ------------------ --------------------------------- Service ID service_2 Class Full\Qualified\Class2 Tags tag1 (attr1: val1, attr2: val2) tag1 (attr3: val3) tag2 Calls setMailer Public no Synthetic yes Lazy no Shared yes Abstract no Autowired no Autowiring Types - Required File /path/to/file Factory Service factory.service Factory Method get ------------------ ---------------------------------'
```

#### After:

```diff
There was 1 failure:

1) Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\TextDescriptorTest::testDescribeContainerDefinitionWhichIsAnAlias with data set #1 (Symfony\Component\DependencyInjection\Alias Object (...), ' // This serv...------', Symfony\Component\DependencyInjection\ContainerBuilder Object (...), array('alias_2'))
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
  ------------------ ---------------------------------
+  Service ID         service_2
   Class              Full\Qualified\Class2
   Tags               tag1 (attr1: val1, attr2: val2)
                      tag1 (attr3: val3)
                      tag2
   Calls              setMailer
   Public             no
   Synthetic          yes
   Lazy               no
   Shared             yes
   Abstract           no
   Autowired          no
   Autowiring Types   -
   Required File      /path/to/file
   Factory Service    factory.service
   Factory Method     get
  ------------------ ---------------------------------'
```

Commits
-------

efd00bac20 [FrameworkBundle] Revert AbstractDescriptorTest output trimming
2017-01-30 07:44:32 -08:00
Fabien Potencier
bbf91d29f9 feature #21396 [DI] Enhance logging in compiler passes (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Enhance logging in compiler passes

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

We should log more in compiler passes - and this should be better integrated in usual log reports.

For logging more, let's drop LoggingFormatter and add a simple "log" method on ContainerBuilder.
For better integration, let's throw silenced notices - they can be caught by our Debug handler.

Commits
-------

fb200a0d2f [DI] Enhance logging in compiler passes
2017-01-30 07:41:46 -08:00
Fabien Potencier
5e5a88cc67 minor #21058 [DI] deprecate the strict attribute (xabbuh)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] deprecate the strict attribute

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/20938#discussion_r92660355
| License       | MIT
| Doc PR        |

Commits
-------

49cb4dbd8c [DI] deprecate the strict attribute
2017-01-30 07:28:44 -08:00
Christian Flothmann
49cb4dbd8c [DI] deprecate the strict attribute 2017-01-30 15:44:22 +01:00
Nicolas Grekas
84a664f929 [HttpFoundation] Mark more methods as @final 2017-01-30 10:14:56 +01:00
Fabien Potencier
10c9d19f6d minor #21453 [DI][DX] Do not map id to class for global classes (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI][DX] Do not map id to class for global classes

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

Using a global classname as service id without specifying the definition class attribute won't work anymore after this, in the benefit of properly throwing an exception at compilation time for a misconfigured service. Service ids could previously be wrongly interpreted as a class name.

So:
```yml
services:
    app_bar:
        arguments: ['foo']
```

will now properly result into:
> Fatal error: Uncaught Symfony\Component\DependencyInjection\Exception\RuntimeException: The definition for "app_bar" has no class.

at compilation time.

Commits
-------

bb870304f0 [DI][DX] Do not map id to class for global classes
2017-01-29 14:49:01 -08:00
Maxime Steinhausser
bb870304f0 [DI][DX] Do not map id to class for global classes 2017-01-29 23:41:20 +01:00
Maxime Steinhausser
efd00bac20 [FrameworkBundle] Revert AbstractDescriptorTest output trimming 2017-01-29 20:35:38 +01:00
Nicolas Grekas
6791124f93 minor #21454 [Cache] Fix trigger_error (jderusse)
This PR was squashed before being merged into the 3.3-dev branch (closes #21454).

Discussion
----------

[Cache] Fix trigger_error

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

Commits
-------

ca38551 [Cache] Fix trigger_error
2017-01-29 20:06:27 +01:00
Jérémy Derussé
ca385510f0 [Cache] Fix trigger_error 2017-01-29 20:06:24 +01:00
Nicolas Grekas
fb200a0d2f [DI] Enhance logging in compiler passes 2017-01-29 19:31:47 +01:00
Fabien Potencier
bcf8b68be9 feature #21402 [Security] make LdapBindAuthenticationProvider capable of searching for the DN (lsmith77, nietonfir)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Security] make LdapBindAuthenticationProvider capable of searching for the DN

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #16823, #20905
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/7420

I guess due to the separation between the user and auth provider something like the following isn't ok  (note: the following works just fine for me but if course in the end the username is the DN and not the user provided shorter username):

```diff
diff --git a/src/Symfony/Component/Security/Core/Authentication/Provider/LdapBindAuthenticationProvider.php b/src/Symfony/Component/Security/Core/Authentication/Provider/LdapBindAuthenticationProvider.php
index 5ebb09a..18d7825 100644
--- a/src/Symfony/Component/Security/Core/Authentication/Provider/LdapBindAuthenticationProvider.php
+++ b/src/Symfony/Component/Security/Core/Authentication/Provider/LdapBindAuthenticationProvider.php
@@ -70,7 +70,7 @@ class LdapBindAuthenticationProvider extends UserAuthenticationProvider
      */
     protected function checkAuthentication(UserInterface $user, UsernamePasswordToken $token)
     {
-        $username = $token->getUsername();
+        $username = $user->getUsername();
         $password = $token->getCredentials();

         if ('' === $password) {
@@ -78,10 +78,7 @@ class LdapBindAuthenticationProvider extends UserAuthenticationProvider
         }

         try {
-            $username = $this->ldap->escape($username, '', LdapInterface::ESCAPE_DN);
-            $dn = str_replace('{username}', $username, $this->dnString);
-
-            $this->ldap->bind($dn, $password);
+            $this->ldap->bind($username, $password);
         } catch (ConnectionException $e) {
             throw new BadCredentialsException('The presented password is invalid.');
         }
diff --git a/src/Symfony/Component/Security/Core/User/LdapUserProvider.php b/src/Symfony/Component/Security/Core/User/LdapUserProvider.php
index fc42419..8194c4c 100644
--- a/src/Symfony/Component/Security/Core/User/LdapUserProvider.php
+++ b/src/Symfony/Component/Security/Core/User/LdapUserProvider.php
@@ -115,7 +115,7 @@ class LdapUserProvider implements UserProviderInterface
     {
         $password = $this->getPassword($entry);

-        return new User($username, $password, $this->defaultRoles);
+        return new User($entry->getDn(), $password, $this->defaultRoles);
     }

     /**
```

Therefore I created an entire new auth provider.

Commits
-------

8ddd5333a3 Merge pull request #1 from nietonfir/http_basic_ldap
a783e5c9c5 Update HttpBasicLdapFactory
a30191f30a make LdapBindAuthenticationProvider capable of searching for the DN
2017-01-28 14:14:50 -08:00
Kévin Dunglas
f025392867
Merge branch '3.2'
* 3.2:
  [FrameworkBundle] Remove useless checks in descriptors
  fixed typo
2017-01-28 18:13:06 +01:00
Kévin Dunglas
39c81c2dce
Merge branch '2.8' into 3.2
* 2.8:
  [FrameworkBundle] Remove useless checks in descriptors
  fixed typo
2017-01-28 18:06:51 +01:00
Kévin Dunglas
5bc83c4142
minor #21341 [FrameworkBundle] Remove useless checks in descriptors (dunglas)
This PR was merged into the 2.8 branch.

Discussion
----------

[FrameworkBundle] Remove useless checks in descriptors

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

As pointed out by @ogizanagi in https://github.com/symfony/symfony/pull/21315#discussion_r96476201, some code in FrameworkBundle's descriptors is useless because the bundle works only with DI 2.8.

Commits
-------

c759345781 [FrameworkBundle] Remove useless checks in descriptors
2017-01-28 17:36:39 +01:00
Kévin Dunglas
c759345781
[FrameworkBundle] Remove useless checks in descriptors 2017-01-28 17:17:55 +01:00
Nicolas Grekas
cb498580d1 [DI] Add getter injection 2017-01-28 08:49:57 +01:00
Fabien Potencier
b1098d9492 Merge branch '3.2'
* 3.2:
  fixed composer dep
2017-01-27 18:43:25 -08:00
Fabien Potencier
71066530de Merge branch '3.1' into 3.2
* 3.1:
  fixed composer dep
2017-01-27 18:43:14 -08:00
Fabien Potencier
dba3e75fb2 fixed composer dep 2017-01-27 18:42:42 -08:00
Fabien Potencier
9f3072c416 Merge branch '3.2'
* 3.2:
  fixed typo
  fixed composer.json
  [HttpKernel] Fix Bundle name regression
  always check for all fields to be mapped
  clarify exception when no args are configured
  [PropertyAccess] Handle interfaces in the invalid argument exception
  [DI] Fix defaults overriding empty strings in AutowirePass
  [Debug] Workaround "null" $context
  [Debug] Remove $context arg from handleError(), preparing for PHP 7.2
  [FrameworkBundle] Dont wire "annotations.cached_reader" before removing passes
  [Routing] Fix BC break in AnnotationClassLoader defaults attributes handling
  Fix tests with ICU 57.1
  Fix the condition checking the minimum ICU version
2017-01-27 18:39:08 -08:00
Fabien Potencier
09d5f4eb72 Merge branch '3.1' into 3.2
* 3.1:
  fixed typo
  fixed composer.json
  always check for all fields to be mapped
  clarify exception when no args are configured
  [PropertyAccess] Handle interfaces in the invalid argument exception
  [DI] Fix defaults overriding empty strings in AutowirePass
  [Debug] Workaround "null" $context
  [Debug] Remove $context arg from handleError(), preparing for PHP 7.2
  [Routing] Fix BC break in AnnotationClassLoader defaults attributes handling
  Fix tests with ICU 57.1
  Fix the condition checking the minimum ICU version
2017-01-27 18:37:08 -08:00
Fabien Potencier
137a7748d6 fixed typo 2017-01-27 17:00:17 -08:00
Fabien Potencier
537b932302 fixed typo 2017-01-27 16:27:58 -08:00
Fabien Potencier
f904f0406d Merge branch '2.8' into 3.1
* 2.8:
  fixed composer.json
2017-01-27 16:21:39 -08:00
Fabien Potencier
4b5930ca44 fixed composer.json 2017-01-27 16:19:36 -08:00
Fabien Potencier
e8895ad102 Merge branch '2.8' into 3.1
* 2.8:
  always check for all fields to be mapped
  clarify exception when no args are configured
  [PropertyAccess] Handle interfaces in the invalid argument exception
  [DI] Fix defaults overriding empty strings in AutowirePass
  [Debug] Workaround "null" $context
  [Debug] Remove $context arg from handleError(), preparing for PHP 7.2
  [Routing] Fix BC break in AnnotationClassLoader defaults attributes handling
  Fix tests with ICU 57.1
  Fix the condition checking the minimum ICU version
2017-01-27 16:04:57 -08:00
Fabien Potencier
791b143914 Merge branch '2.7' into 2.8
* 2.7:
  always check for all fields to be mapped
  clarify exception when no args are configured
  [PropertyAccess] Handle interfaces in the invalid argument exception
  [Debug] Workaround "null" $context
  [Debug] Remove $context arg from handleError(), preparing for PHP 7.2
  [Routing] Fix BC break in AnnotationClassLoader defaults attributes handling
  Fix tests with ICU 57.1
  Fix the condition checking the minimum ICU version
2017-01-27 15:54:58 -08:00
Maxime Steinhausser
531c6cc5ff [HttpKernel] Fix Bundle name regression 2017-01-27 07:30:57 -08:00
Fabien Potencier
bc391c130e bug #21431 [DoctrineBridge] always check for all fields to be mapped (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[DoctrineBridge] always check for all fields to be mapped

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

Commits
-------

1e3421d6f0 always check for all fields to be mapped
2017-01-27 07:29:46 -08:00
Christian Flothmann
1e3421d6f0 always check for all fields to be mapped 2017-01-27 10:14:45 +01:00
Lukas Kahwe Smith
8ddd5333a3
Merge pull request #1 from nietonfir/http_basic_ldap
Update HttpBasicLdapFactory
2017-01-27 08:30:49 +01:00
Fabien Potencier
a35986f657 minor #21416 [DependencyInjection] clarify exception when no args are configured (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] clarify exception when no args are configured

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

Commits
-------

428814b25d clarify exception when no args are configured
2017-01-26 07:56:09 -08:00
nietonfir
a783e5c9c5 Update HttpBasicLdapFactory
so that it matches the current FormLoginLdapFactory ldap implementation,
where the DN can be search for before binding.
2017-01-26 11:58:09 +01:00
Christian Flothmann
428814b25d clarify exception when no args are configured 2017-01-26 11:48:39 +01:00
Lukas Kahwe Smith
a30191f30a
make LdapBindAuthenticationProvider capable of searching for the DN 2017-01-25 21:32:38 +01:00
Fabien Potencier
b9b6ebd643 feature #21404 [DI] Generalize constructor autowiring to partial method calls (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Generalize constructor autowiring to partial method calls

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

When autowiring is enabled:

currently, the constructor can be partially wired, and autowiring will complete the remaining missing arguments.
But there is no reason this should only apply to the constructor.
This PR fixes this inconsistency by looking at all method calls, and wire missing arguments in the same way.

Commits
-------

29c2fd5f74 [DI] Generalize constructor autowiring to partial method calls
2017-01-25 07:53:09 -08:00
Fabien Potencier
a6d2420f00 bug #21360 [PropertyAccess] Handle interfaces in the invalid argument exception (fancyweb)
This PR was squashed before being merged into the 2.7 branch (closes #21360).

Discussion
----------

[PropertyAccess] Handle interfaces in the invalid argument exception

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

Before :
`Expected argument of type "dule\MenuBundle\Entity\AbstractMenu::setMenuElements() must implement interface Doctrine\Common\Collections\Collection", "array" given`

After :
`Expected argument of type "Doctrine\Common\Collections\Collection", "array" given`

Commits
-------

be52b39031 [PropertyAccess] Handle interfaces in the invalid argument exception
2017-01-25 07:13:56 -08:00
Thomas Calvet
be52b39031 [PropertyAccess] Handle interfaces in the invalid argument exception 2017-01-25 07:13:54 -08:00
Fabien Potencier
21f1be16d5 bug #21403 [DI] Fix defaults overriding empty strings in AutowirePass (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[DI] Fix defaults overriding empty strings in AutowirePass

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

Commits
-------

89e27240ab [DI] Fix defaults overriding empty strings in AutowirePass
2017-01-25 07:08:36 -08:00
Fabien Potencier
74ee29dc2f bug #21401 [Debug] Workaround "null" $context (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Debug] Workaround "null" $context

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

As reported in #20068, the imap extension can call error handlers with $context = null.

Commits
-------

2555f3151d [Debug] Workaround "null" $context
2017-01-25 07:05:34 -08:00
Nicolas Grekas
29c2fd5f74 [DI] Generalize constructor autowiring to partial method calls 2017-01-25 14:16:38 +01:00
Nicolas Grekas
89e27240ab [DI] Fix defaults overriding empty strings in AutowirePass 2017-01-25 13:37:59 +01:00
Nicolas Grekas
2555f3151d [Debug] Workaround "null" $context 2017-01-25 13:11:45 +01:00
Fabien Potencier
140e847ae3 bug #21395 [WebProfilerBundle] fixed usage of non-Twig paths in the cache panel (fabpot)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[WebProfilerBundle] fixed usage of non-Twig paths in the cache panel

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

Commits
-------

9612472288 [WebProfilerBundle] fixed usage of non-Twig paths in the cache panel
2017-01-24 11:00:59 -08:00
Fabien Potencier
9612472288 [WebProfilerBundle] fixed usage of non-Twig paths in the cache panel 2017-01-24 10:58:55 -08:00
Fabien Potencier
dd4e78c96d minor #21379 [Routing] Fix BC break in AnnotationClassLoader defaults attributes handling (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[Routing] Fix BC break in AnnotationClassLoader defaults attributes handling

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | 77289b9023 (commitcomment-20572462)
| License       | MIT
| Doc PR        | n/a

This fixes a BC break introduced in #21333. Instead of removing the automatic request attributes creation, we keep it but only for attributes that are mandatory (i.e. present in the route path).

Thanks to @iltar for the idea.

Commits
-------

1d298f0417 [Routing] Fix BC break in AnnotationClassLoader defaults attributes handling
2017-01-24 08:26:17 -08:00
Fabien Potencier
388be9dc3a minor #21320 Fix ICU dependant tests (jakzal)
This PR was squashed before being merged into the 2.7 branch (closes #21320).

Discussion
----------

Fix ICU dependant tests

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

#20551 changed the condition checking if the ICU version matches the stubbed data. The change intended to enable tests on more ICU versions, but it actually has limited them. I'm still not convinced it should've been done but let's at least fix the condition. Ideal solution would be to have the latest ICU data available on travis (still not there https://github.com/travis-ci/travis-ci/issues/3616).

I also needed to fix several tests.

Currently skipped tests in components depending on ICU data:

|            | 4.8.1.1 | 54.1 | 55.1 | 57.1 |
|---|---|--|--|--|
| Intl       | 488     | 488  | 7    | 6    |
| Locale     | 0       | 0    | 0    | 0    |
| Translation| 0       | 0    | 0    | 0    |
| Validator  | 69      | 69   | 69   | 0    |
| Form       | 75      | 75   | 75   | 1    |

Commits
-------

d3b5d8efdf Fix tests with ICU 57.1
677d820874 Fix the condition checking the minimum ICU version
2017-01-24 07:57:42 -08:00