Commit Graph

17835 Commits

Author SHA1 Message Date
Fabien Potencier 4dbe0e1c34 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
2014-07-23 17:11:31 +02:00
Fabien Potencier 3f5d4c55ba 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 e778cf19cd), 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()
2014-07-23 17:01:18 +02:00
KUBO Atsuhiro 6f58674832 [FrameworkBundle] changed KernelTestCase::getKernelClass() to check $_SERVER['KERNEL_DIR'] before invoking getPhpUnitXmlDir() 2014-07-23 17:01:18 +02:00
Fabien Potencier 797d8141e3 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
2014-07-23 16:33:41 +02:00
Fabien Potencier bdf874f593 [MonologBridge] fixed Console handler priorities 2014-07-23 14:15:23 +02:00
Fabien Potencier 0032abd618 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
2014-07-23 10:01:19 +02:00
Fabien Potencier 0b5348ea3a 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
2014-07-23 09:58:41 +02:00
Jérémy Derussé 537c39b11e Optimize assertLocale regexp 2014-07-22 23:54:07 +02:00
Pierre-Yves LEBECQ 0c2622e2e7 [ExpressionLanguage] Fixed an issue with # characters in double quoted string literals 2014-07-22 15:26:34 +02:00
Bernhard Schussek 4c97420fef 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
2014-07-21 13:29:59 +02:00
Bernhard Schussek ce04073b4e [Validator] Fixed object initializers in 2.5 version of the Validator 2014-07-21 10:57:43 +02:00
Ben 4cf50e8d30 Bring code into standard 2014-07-20 22:50:55 -06:00
Ben 9f4313cf6f [Process] Add test to verify fix for issue #11421 2014-07-19 17:48:53 -06:00
Ben 02eb765a9c [Process] Fixes issue #11421 2014-07-19 17:29:08 -06:00
Jakub Zalas 678766900b [DependencyInjection] Pass a Scope instance instead of a scope name. 2014-07-19 21:50:43 +01:00
Fabien Potencier dfabc4a61a 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
2014-07-19 07:51:56 +02:00
Andreia Bohner 28424ee79d Add some tweaks to the pt_BR translations 2014-07-19 07:51:56 +02:00
Fabien Potencier 9572918064 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
2014-07-18 11:07:06 +02:00
Bernhard Schussek 291cbf9efa [Validator] Backported #11410 to 2.3: Object initializers are called only once per object 2014-07-18 10:20:25 +02:00
Fabien Potencier efab88490e 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
2014-07-17 12:20:14 +02:00
Rafał Muszyński 3176f8bb98 [Translator][FrameworkBundle] Added @ to the list of allowed chars in Translator 2014-07-17 12:20:11 +02:00
Fabien Potencier a9af6be54e Merge branch '2.4' into 2.5
* 2.4:
  [Process] Adjust PR #11264, make it Windows compatible and fix CS
  [Process] Fix unit tests on Windows platform
  bumped Symfony version to 2.4.9
  bumped Symfony version to 2.3.19
  updated VERSION for 2.4.8
  updated CHANGELOG for 2.4.8
  updated VERSION for 2.3.18
  update CONTRIBUTORS for 2.3.18
  updated CHANGELOG for 2.3.18
  [Process] Use correct test for empty string in UnixPipes

Conflicts:
	src/Symfony/Component/HttpKernel/Kernel.php
2014-07-16 15:13:02 +02:00
Fabien Potencier 2797df89b8 Merge branch '2.3' into 2.4
* 2.3:
  [Process] Adjust PR #11264, make it Windows compatible and fix CS
  [Process] Fix unit tests on Windows platform
  bumped Symfony version to 2.3.19
  updated VERSION for 2.3.18
  update CONTRIBUTORS for 2.3.18
  updated CHANGELOG for 2.3.18
  [Process] Use correct test for empty string in UnixPipes

Conflicts:
	src/Symfony/Component/HttpKernel/Kernel.php
	src/Symfony/Component/Process/Tests/AbstractProcessTest.php
2014-07-16 15:12:41 +02:00
Fabien Potencier 91e32f810b bug #11381 [2.3] [Process] Use correct test for empty string in UnixPipes (whs, romainneutron)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] [Process] Use correct test for empty string in UnixPipes

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

This PR supersedes #11264 : 2.3 compatibility + Windows compatibility + CS fix

Commits
-------

cec0a45 [Process] Adjust PR #11264, make it Windows compatible and fix CS
9e1ea4a [Process] Use correct test for empty string in UnixPipes
2014-07-16 15:02:06 +02:00
Fabien Potencier 45df2f314c minor #11397 [2.3][Process] Fix unit tests on Windows platform (romainneutron)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3][Process] Fix unit tests on Windows platform

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

Commits
-------

d418935 [Process] Fix unit tests on Windows platform
2014-07-16 14:58:19 +02:00
Romain Neutron cec0a45ff5 [Process] Adjust PR #11264, make it Windows compatible and fix CS 2014-07-16 14:40:06 +02:00
Romain Neutron d4189350c0 [Process] Fix unit tests on Windows platform 2014-07-16 11:55:07 +02:00
Romain Neutron ff0bb01a91 [Process] Reduce I/O load on Windows platform 2014-07-16 11:39:41 +02:00
Fabien Potencier 28defa8741 bumped Symfony version to 2.5.3 2014-07-15 22:52:32 +02:00
Fabien Potencier 98142a0a35 bumped Symfony version to 2.4.9 2014-07-15 22:38:14 +02:00
Fabien Potencier ace5a29867 bumped Symfony version to 2.3.19 2014-07-15 21:58:41 +02:00
Fabien Potencier e66ee96757 updated VERSION for 2.5.2 2014-07-15 17:39:46 +02:00
Fabien Potencier 8805ee1604 updated CHANGELOG for 2.5.2 2014-07-15 17:39:39 +02:00
Fabien Potencier 3da923989c updated VERSION for 2.4.8 2014-07-15 16:52:02 +02:00
Fabien Potencier 34620a7d99 updated CHANGELOG for 2.4.8 2014-07-15 16:51:55 +02:00
Fabien Potencier f11da64cb9 bug #11350 [2.5][Form] solved dependency to ValidatorInterface, fix #11036 (Sebastian Blum)
This PR was submitted for the master branch but it was merged into the 2.5 branch instead (closes #11350).

Discussion
----------

[2.5][Form] solved dependency to ValidatorInterface, fix #11036

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

Since Symfony 2.5

The problem was that the form component has a hardcoded depencency to the deprecated validator component (api Version 2.4)
The pull request fixes the dependency to the validator component and supports now both implementations, apiVersion 2.5 and apiVersion 2.4 of the validator component.

@Symfony Core Members
please review the changes 0a1e9c208f/src/Symfony/Component/Form/Extension/Validator/ValidatorExtension.php
I'm not sure if it was the right solution

Commits
-------

705d67b [2.5][Form] solved dependency to ValidatorInterface, fix #11036
2014-07-15 16:46:59 +02:00
Sebastian Blum 705d67b563 [2.5][Form] solved dependency to ValidatorInterface, fix #11036 2014-07-15 16:46:59 +02:00
Fabien Potencier ff4997fb39 Merge branch '2.4' into 2.5
* 2.4:
  fixed typo
2014-07-15 16:22:44 +02:00
Fabien Potencier 84334058b8 fixed typo 2014-07-15 16:22:28 +02:00
Fabien Potencier 75e07e6bde updated VERSION for 2.3.18 2014-07-15 16:20:44 +02:00
Fabien Potencier 4a12f4d0f2 update CONTRIBUTORS for 2.3.18 2014-07-15 16:20:27 +02:00
Fabien Potencier 98b891d271 updated CHANGELOG for 2.3.18 2014-07-15 16:20:17 +02:00
Fabien Potencier cd8927017f Merge branch '2.4' into 2.5
* 2.4:
  Remove Spaceless Blocks From Twig Templates
  Validate locales sets intos translator
  Fix UserPassword validator translation
  Remove Spaceless Blocks from Twig Form Templates
  fixed typo
  [HttpFoundation] Fix to prevent magic bytes injection in JSONP responses (Prevents CVE-2014-4671)
  added regression test
  fix issue #8171 on configuration tree for twig extension -- pairing up with @cordoval
  [HttpFoundation] Fix wrong assertion in Response test
  [Upgrade] Fixed markdown syntax
  [2.3][Form] Cleanup & fix phpdocs
  Added verbosity methods

Conflicts:
	src/Symfony/Component/Form/FormError.php
2014-07-15 16:15:12 +02:00
Fabien Potencier a05016099b bug #11278 Remove Spaceless Blocks From Twig Templates (chrisguitarguy)
This PR was submitted for the master branch but it was merged into the 2.4 branch instead (closes #11278).

Discussion
----------

Remove Spaceless Blocks From Twig Templates

Leaving it in can only mangle values from data bound to the form.

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

The tests pass here, but it doesn't seem like any tests really cover the actual rendering.

Commits
-------

793a083 Remove Spaceless Blocks From Twig Templates
2014-07-15 16:13:00 +02:00
Christopher Davis 793a083fd7 Remove Spaceless Blocks From Twig Templates 2014-07-15 16:12:54 +02:00
Fabien Potencier 56b0139b0d Merge branch '2.3' into 2.4
* 2.3:
  Validate locales sets intos translator
  Fix UserPassword validator translation
  Remove Spaceless Blocks from Twig Form Templates
  fixed typo
  [HttpFoundation] Fix to prevent magic bytes injection in JSONP responses (Prevents CVE-2014-4671)
  added regression test
  fix issue #8171 on configuration tree for twig extension -- pairing up with @cordoval
  [HttpFoundation] Fix wrong assertion in Response test
  [Upgrade] Fixed markdown syntax
  [2.3][Form] Cleanup & fix phpdocs

Conflicts:
	src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig
	src/Symfony/Component/Form/Extension/Core/ChoiceList/SimpleChoiceList.php
	src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php
2014-07-15 16:07:10 +02:00
Jérémy Derussé 06a80fbdbe Validate locales sets intos translator 2014-07-15 15:44:49 +02:00
Fabien Potencier 06fc97ead8 feature #11367 [HttpFoundation] Fix to prevent magic bytes injection in JSONP responses... (CVE-2014-4671) (Andrew Moore)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] Fix to prevent magic bytes injection in JSONP responses... (CVE-2014-4671)

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no*
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A
| CVE Ticket   | [CVE-2014-4671](http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-4671)
| See Also | [Rosetta Flash](http://miki.it/blog/2014/7/8/abusing-jsonp-with-rosetta-flash/)

\* Unless you are parsing the response string manually, which you really shouldn't do anyway

**THIS IS A SECURITY FIX AND SHOULD BE MERGED SHORTLY**

This fix prevents attacks vectors where third-party browser plugins depends on ASCII magic bytes in order to execute a plugin. This is currently exploited with Flash using a carefully crafted JSONP response, allowing the execution of random SWF data from a domain with a vulnerable JSONP endpoint.

This security issue is mitigated by adding an empty comment right before the callback parameter. This does not affect the execution of the JSONP callback.

Commits
-------

6af3d05 [HttpFoundation] Fix to prevent magic bytes injection in JSONP responses (Prevents CVE-2014-4671)
2014-07-15 15:35:51 +02:00
Christophe Coevoet 7e1b4f6e2d bug #11284 [Console] Remove estimated field from debug_nomax (bburnichon)
This PR was squashed before being merged into the 2.5 branch (closes #11284).

Discussion
----------

[Console] Remove estimated field from debug_nomax

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

Commits
-------

2ac1bb4 [Console] Remove estimated field from debug_nomax
2014-07-15 13:45:19 +02:00
Benoît Burnichon 2ac1bb45bc [Console] Remove estimated field from debug_nomax 2014-07-15 13:44:57 +02:00