[Form] Check if IntlDateFormatter constructor returned a valid object before using it
[Process] Reduce I/O load on Windows platform
[Translator][FrameworkBundle] Added @ to the list of allowed chars in Translator
bug #11403 [Translator][FrameworkBundle] Added @ to the list of allowed chars in Translator (takeit)

This PR was squashed before being merged into the 2.3 branch (closes #11403).

Discussion
----------

[Translator][FrameworkBundle] Added @ to the list of allowed chars in Translator

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

Commits
-------

3176f8b [Translator][FrameworkBundle] Added @ to the list of allowed chars in Translator
[Validator] Backported #11410 to 2.3: Object initializers are called only once per object
bug #11411 [Validator] Backported #11410 to 2.3: Object initializers are called only once per object (webmozart)

This PR was merged into the 2.3 branch.

Discussion
----------

[Validator] Backported #11410 to 2.3: Object initializers are called only once per object

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

Before, object initializers were called multiple times if an object was validated in different groups in the same validation run. The initializers, however, are not aware of the current validation group, so calling them more than once does not make sense.

Now, object initializers are called exactly once per validated object.

See #11410

Commits
-------

291cbf9 [Validator] Backported #11410 to 2.3: Object initializers are called only once per object
Add some tweaks to the pt_BR translations
minor #11419 [Validator] Add some tweaks to the pt_BR translations (andreia)

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

Discussion
----------

[Validator] Add some tweaks to the pt_BR translations

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

Commits
-------

28424ee Add some tweaks to the pt_BR translations
[Validator] Fixed object initializers in 2.5 version of the Validator
bug #11410 [Validator] Fixed object initializers in 2.5 version of the Validator (webmozart)

This PR was merged into the 2.5 branch.

Discussion
----------

[Validator] Fixed object initializers in 2.5 version of the Validator

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

Object initializers were forgot in the 2.5 Validator API. This PR implements them.

A bug was fixed also in the old version which resulted in the initializers being called multiple times if an object was validated in multiple groups within the same validation run. This fix will be backported separately to older versions.

Commits
-------

ce04073 [Validator] Fixed object initializers in 2.5 version of the Validator
[ExpressionLanguage] Fixed an issue with # characters in double quoted string literals
Optimize assertLocale regexp
minor #11441 [Translator] Optimize assertLocale regexp (Jérémy Derussé)

This PR was merged into the 2.3 branch.

Discussion
----------

[Translator] Optimize assertLocale regexp

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

Optimize regexp by remove unused variable and using anchored regex.
Thanks @Tobion

Commits
-------

537c39b Optimize assertLocale regexp
bug #11439 [ExpressionLanguage] Fixed double quoted string literals containing sharps (pylebecq)

This PR was merged into the 2.4 branch.

Discussion
----------

[ExpressionLanguage] Fixed double quoted string literals containing sharps

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

Commits
-------

0c2622e [ExpressionLanguage] Fixed an issue with # characters in double quoted string literals
bug #11342 [2.3][Form] Check if IntlDateFormatter constructor returned a valid object before using it (romainneutron)

This PR was merged into the 2.3 branch.

Discussion
----------

[2.3][Form] Check if IntlDateFormatter constructor returned a valid object before using it

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

`IntlDateFormatter` constructor [may return false](http://www.php.net/manual/en/intldateformatter.create.php#refsect1-intldateformatter.create-returnvalues). This patches avoids fatal errors in these cases

This PR replaces #11334

Commits
-------

ebf967d [Form] Check if IntlDateFormatter constructor returned a valid object before using it
[FrameworkBundle] changed KernelTestCase::getKernelClass() to check $_SERVER['KERNEL_DIR'] before invoking getPhpUnitXmlDir()
bug #11370 [FrameworkBundle] avoid raising unexpected RuntimeException when specifying $_SERVER['KERNEL_DIR'] (iteman)

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

Discussion
----------

[FrameworkBundle] avoid raising unexpected RuntimeException when specifying $_SERVER['KERNEL_DIR']

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

Since v2.5.0 (exactly e778cf19cd60f677ead35d662f816adeaae429b4), all tests that use WebTestCase are to be errors "RuntimeException: Unable to guess the Kernel directory." even though $_SERVER['KERNEL_DIR'] is specified. This has been preventing another test runner (e.g. [MakeGood](https://github.com/piece/makegood)) from running tests for a Symfony application without overriding KernelTestCase::getPhpUnitXmlDir() as follows.

The bootstrap file for testing in the app directory:

```php
<?php
...
$_SERVER['KERNEL_DIR'] = __DIR__;
require_once dirname(__DIR__) . '/var/bootstrap.php.cache';
```

console output:

```console
PHPUnit 4.1.3 by Sebastian Bergmann.

EE

Acme\DemoBundle\Tests\Controller\DemoController
 [ ] Index
 [ ] Secure section

Time: 146 ms, Memory: 9.50Mb

There were 2 errors:

1) Acme\DemoBundle\Tests\Controller\DemoControllerTest::testIndex
RuntimeException: Unable to guess the Kernel directory.

/path/to/symfony-application/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php:56
/path/to/symfony-application/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php:103
/path/to/symfony-application/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php:156
/path/to/symfony-application/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php:137
/path/to/symfony-application/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php:33
/path/to/symfony-application/src/Acme/DemoBundle/Tests/Controller/DemoControllerTest.php:11
/path/to/eclipse/plugins/com.piece_framework.makegood.stagehandtestrunner_3.1.0.v201407050319/resources/php/vendor/piece/stagehand-testrunner/src/Runner/PHPUnitRunner.php:81
/path/to/eclipse/plugins/com.piece_framework.makegood.stagehandtestrunner_3.1.0.v201407050319/resources/php/vendor/piece/stagehand-testrunner/src/Process/TestRunner.php:100
/path/to/eclipse/plugins/com.piece_framework.makegood.stagehandtestrunner_3.1.0.v201407050319/resources/php/vendor/piece/stagehand-testrunner/src/CLI/TestRunnerApplication/Command/PluginCommand.php:149
/path/to/symfony-application/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:252
/path/to/symfony-application/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:887
/path/to/symfony-application/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:193
/path/to/symfony-application/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:124
...
```

Commits
-------

6f58674 [FrameworkBundle] changed KernelTestCase::getKernelClass() to check $_SERVER['KERNEL_DIR'] before invoking getPhpUnitXmlDir()
bug #11120 [2.3][Process] Reduce I/O load on Windows platform (romainneutron)

This PR was merged into the 2.3 branch.

Discussion
----------

[2.3][Process] Reduce I/O load on Windows platform

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

When using file handles, no `stream_select` call is done.
On linux platforms, `stream_select` introduce a sleep as it has 0.2s timeout, there is no such pause on Windows, producing lot's of disk I/Os when reading file handles

Commits
-------

ff0bb01 [Process] Reduce I/O load on Windows platform
[Validator] Fixed memory leak in ValidatorBuilder
bug #11454 [Validator] Fixed memory leak in ValidatorBuilder (webmozart)

This PR was merged into the 2.5 branch.

Discussion
----------

[Validator] Fixed memory leak in ValidatorBuilder

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

In 23534ca6ab4a107a5e801e710fb3c07b1a8874d9, the following code was introduced in `ValidatorBuilder::getValidator()`:

```php
AnnotationRegistry::registerLoader(function ($class) {
    if (0 === strpos($class, __NAMESPACE__.'\\Constraints\\')) {
        $file = str_replace(__NAMESPACE__.'\\Constraints\\', __DIR__.'/Constraints/', $class).'.php';

        if (is_file($file)) {
            require_once $file;

            return true;
        }
    }

    return false;
});
```

`AnnotationRegistry::registerLoader()` stores all loaders in a global array. Every time that `getValidator()` is called, a new closure is put onto the loader stack, referencing `$this` (i.e. the ValidatorBuilder) and consequently preventing the ValidatorBuilder (and its references) from being garbage-collected.

The call to `registerLoader()` did not exist in 2.4 and I can't find a reason why it should be there. All tests are green without that code. I suppose I used it for debugging and then forgot to remove it again, so I'm removing it here.

Commits
-------

283387a [Validator] Fixed memory leak in ValidatorBuilder