Commit Graph

17965 Commits

Author SHA1 Message Date
Nicolas Grekas 623595f0d6 [ClassLoader] Use symfony/polyfill-apcu 2016-01-14 18:42:51 +01:00
Fabien Potencier 54d7f2dfb9 security #17359 do not ship with a custom rng implementation (xabbuh, fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

do not ship with a custom rng implementation

Commits
-------

b91441c removed obsolete tests, fixed composer.json
fcd3160 do not ship with a custom rng implementation
2016-01-14 09:59:32 +01:00
Fabien Potencier b91441c6cc removed obsolete tests, fixed composer.json 2016-01-14 09:49:27 +01:00
Christian Flothmann fcd3160a0f do not ship with a custom rng implementation 2016-01-14 09:34:47 +01:00
Fabien Potencier 5781bbce01 bug #17326 [Console] Display console application name even when no version set (polc)
This PR was squashed before being merged into the 2.3 branch (closes #17326).

Discussion
----------

[Console] Display console application name even when no version set

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

When displaying help of an Application with a name but no version, it show "Console Tool" instead of the application name.

Commits
-------

61e810e [Console] Display console application name even when no version set
2016-01-14 08:51:59 +01:00
Paul LE CORRE 61e810e769 [Console] Display console application name even when no version set 2016-01-14 08:51:57 +01:00
Fabien Potencier c8c94772b5 minor #17354 [2.3] Remove empty statements. (SpacePossum)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] Remove empty statements.

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

Test run for new fixer to see if it would be suitable for SF.
For ref.: https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1671

Commits
-------

4491c97 Remove empty statements.
2016-01-14 08:48:21 +01:00
Possum 4491c970b3 Remove empty statements. 2016-01-13 18:07:01 +01:00
Nicolas Grekas 26af0ae56b minor #17348 [Yaml] Fix tests on PHP 7.0.2 (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Yaml] Fix tests on PHP 7.0.2

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

Related to https://bugs.php.net/66179 that has been fixed in 7.0.2

Commits
-------

902f6dd [Yaml] Fix tests on PHP 7.0.2
2016-01-13 10:03:05 +01:00
Nicolas Grekas 902f6ddb93 [Yaml] Fix tests on PHP 7.0.2 2016-01-13 09:54:41 +01:00
Fabien Potencier 7a02f4e43e minor #17346 [2.3] Workaround https://bugs.php.net/63206 (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] Workaround https://bugs.php.net/63206

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

This bug has almost no chance to be hit in this code but still, cleaning any potential issue is worth.

Commits
-------

c5479dd [2.3] Workaround https://bugs.php.net/63206
2016-01-13 08:40:10 +01:00
Nicolas Grekas c5479dde8c [2.3] Workaround https://bugs.php.net/63206 2016-01-13 08:28:48 +01:00
Tobias Schultze 36eb8188ca minor #17344 [Event Dispatcher] Add closing parenthesis (omerida)
This PR was merged into the 2.3 branch.

Discussion
----------

[Event Dispatcher] Add closing parenthesis

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

Commits
-------

5cdccc4 Add closing parenthesis
2016-01-13 00:06:22 +01:00
omerida 5cdccc4350 Add closing parenthesis 2016-01-12 14:46:23 -05:00
Fabien Potencier 406e260c49 minor #17338 [Documentation] Typo fix (quentint)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #17338).

Discussion
----------

[Documentation] Typo fix

Commits
-------

12fd48c Typo fix
2016-01-12 18:16:47 +01:00
Quentin 12fd48c192 Typo fix 2016-01-12 18:16:37 +01:00
Tobias Schultze 85d5ed29d7 bug #17140 [Serializer] Remove normalizer cache in Serializer class (jvasseur)
This PR was merged into the 2.3 branch.

Discussion
----------

[Serializer] Remove normalizer cache in Serializer class

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

The serializer cache the normalizer/denormalizer to use based only on the class and format. But the supportsNormalization and supportDenormalization methods can decide based on the data passed leading to hard to find bugs when the serializer used a cached normalizer it shouldn't use.

Commits
-------

8566dc1 Remove normalizer cache in Serializer class
2016-01-12 13:31:34 +01:00
Fabien Potencier f1cce4e139 minor #17282 [2.3] Static Code Analysis for Components (kalessil)
This PR was squashed before being merged into the 2.3 branch (closes #17282).

Discussion
----------

[2.3] Static Code Analysis for Components

| 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

Static Code Analysis with Php Inspections (EA Extended):
    - several code constructs simplification
    - decoupling statements from foreach
    - extra colons/parenthesis removal (code style)
    - correct string functions usage (micro-optimization)
    - variable functions usage (php 5 compatible)

Commits
-------

81f8181 [2.3] Static Code Analysis for Components
2016-01-12 12:31:36 +01:00
Vladimir Reznichenko 81f81812a5 [2.3] Static Code Analysis for Components 2016-01-12 12:31:34 +01:00
Fabien Potencier a02bd4b753 bug #17307 [FrameworkBundle] Fix paths with % in it (like urlencoded) (scaytrase)
This PR was merged into the 2.3 branch.

Discussion
----------

[FrameworkBundle] Fix paths with % in it (like urlencoded)

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

Commits
-------

de7b4d7 Fix #17306 Paths with % in it are note allowed (like urlencoded)
2016-01-11 11:07:30 +01:00
Fabien Potencier aa9801e8a2 bug #17078 [Bridge] [Doctrine] [Validator] Added support \IteratorAggregate for UniqueEntityValidator (Disparity)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #17078).

Discussion
----------

[Bridge] [Doctrine] [Validator] Added support \IteratorAggregate for UniqueEntityValidator

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

Expand the list of supported types of results returned from the repositories.
Added processing of type \IteratorAggregate (and as a consequence doctrine Collection)

Commits
-------

6ebd179 Added support \IteratorAggregate for UniqueEntityValidator
2016-01-11 11:04:47 +01:00
Disparity 6ebd1792d8 Added support \IteratorAggregate for UniqueEntityValidator
Expand the list of supported types of results returned from the repositories.
Added processing of type \IteratorAggregate (and as a consequence doctrine Collection)
2016-01-11 11:04:46 +01:00
Pavel Batanov de7b4d73c6 Fix #17306 Paths with % in it are note allowed (like urlencoded) 2016-01-09 15:55:11 +03:00
Fabien Potencier 5d63c554e8 bug #17287 [HttpKernel] Forcing string comparison on query parameters sort in UriSigner (Tim van Densen)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #17287).

Discussion
----------

[HttpKernel] Forcing string comparison on query parameters sort in UriSigner

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

The signing of an url fails when using query parameters with integers as keys.
The ksort function in the ```UriSigner``` class changes the order of the query params and causes to generate a different hash which results in a failed check.

In this PR we force a string comparison for ksort which keeps the correct order of parameters.

Commits
-------

2040139 Added sort order SORT_STRING for params in UriSigner
2016-01-07 14:44:10 +01:00
Tim van Densen 2040139db6 Added sort order SORT_STRING for params in UriSigner 2016-01-07 14:43:59 +01:00
Fabien Potencier f9bf3f8d5a bug #17278 [2.3][FrameworkBundle] Add case in Kernel directory guess for PHPUnit (tgalopin)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3][FrameworkBundle] Add case in Kernel directory guess for PHPUnit

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

The current automatic guess of the Kernel directory in the context of PHPUnit does work properly using the following commands:

- `phpunit -c app`
- `phpunit --configuration app`
- `phpunit --configuration=app`

But it fails with the synthax `phpunit -capp`, even if PHPUnit supports it. This PR fixes this.

See https://github.com/symfony/symfony/pull/17272.

Commits
-------

758fc1d [FrameworkBundle] Add case in Kernel directory guess for PHPUnit
2016-01-07 14:27:03 +01:00
Fabien Potencier 61daebfbee minor #17293 [HttpFoundation] Add missing apostrophe in setSaveHandler phpdoc (pawel-lewtak)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #17293).

Discussion
----------

[HttpFoundation] Add missing apostrophe in setSaveHandler phpdoc

| Q             | A
| ------------- | ---
| Fixed tickets |
| License       | MIT

I fixed php code in comment to one of functions as it couldn't be used with simple copy and paste.

Commits
-------

e32f5a2 Add missing apostrophe in setSaveHandler phpdoc
2016-01-07 14:19:31 +01:00
pawel-lewtak e32f5a2cd2 Add missing apostrophe in setSaveHandler phpdoc 2016-01-07 14:19:31 +01:00
Nicolas Grekas 707d359c0c bug #17276 [Process] Fix potential race condition (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Process] Fix potential race condition

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

As seen at https://travis-ci.org/symfony/symfony/jobs/100448880#L2768, ProcessTest::testRunProcessWithTimeout can create an infinite blocking situation.
I found two potential code paths that could be subject to a race condition. This fixes them.

Commits
-------

b114a85 [Process] Fix potential race condition
2016-01-06 10:56:27 +01:00
Titouan Galopin 758fc1dfb2 [FrameworkBundle] Add case in Kernel directory guess for PHPUnit 2016-01-06 10:52:17 +01:00
Nicolas Grekas b114a85609 [Process] Fix potential race condition 2016-01-06 10:07:06 +01:00
Fabien Potencier e9b8aae787 minor #17264 Fix typo in Locale class annotations (enumag)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #17264).

Discussion
----------

Fix typo in Locale class annotations

Commits
-------

eab7e11 typo
2016-01-05 16:32:23 +01:00
Jáchym Toušek eab7e11be7 typo 2016-01-05 16:32:23 +01:00
Fabien Potencier 19a63356ef bug #17183 [FrameworkBundle] Set the kernel.name properly after a cache warmup (jakzal)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #17183).

Discussion
----------

[FrameworkBundle] Set the kernel.name properly after a cache warmup

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

Commits
-------

1438b9a [FrameworkBundle] Set the kernel.name properly after a cache warmup
2016-01-04 18:15:55 +01:00
Jakub Zalas 1438b9a067 [FrameworkBundle] Set the kernel.name properly after a cache warmup 2016-01-04 18:15:54 +01:00
Fabien Potencier 5a9c1b5a0f minor #17243 Removed spaces before semicolon (dereckson)
This PR was merged into the 2.3 branch.

Discussion
----------

Removed spaces before semicolon

'lorem ; ipsum' → 'lorem; ipsum'

| Q             | A
| ------------- | ---
| Fixed tickets | #17242
| License       | MIT

Commits
-------

169d551 Removed spaces before semicolon
2016-01-04 17:52:03 +01:00
Tobias Schultze eeaa4dcd0c minor #17248 [Form] fixed DateTimeType tests using "date_widget"="choice". (Adrien LUCAS)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #17248).

Discussion
----------

[Form] fixed DateTimeType tests using "date_widget"="choice".

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

As said in the [documentation](http://symfony.com/doc/current/reference/forms/types/datetime.html#years), the default years available in the ``DateType`` go from five year before to five year after the current year. So now that it's 2016 all around, the tests which use the ``"date_widget"="choice"`` without defining a ``"years"`` option and tries to submit a date in 2010 are failing because 2010 is not in the default choice list.

This PR fixes the issue by setting the ``"years"`` option to ``"2010"`` for each test that need it. It also remove unnecessary (and confusing) dummy data from some tests which were suffering the same issue but silently.

Edit : The PHP 5.6 build on travis seems to fetch and run some old version of the tests. So it still fail on this build but not on the others anymore.

Commits
-------

be20e89 Fix Form's DateTimeType tests.
2016-01-04 15:27:02 +01:00
Adrien LUCAS be20e892c2 Fix Form's DateTimeType tests. 2016-01-04 15:27:01 +01:00
Fabien Potencier e738227d63 bug #17159 [Yaml] recognize when a block scalar is left (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Yaml] recognize when a block scalar is left

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

The parser did not recognize when the block scalar was completely parsed
and thus treated following comments as they need to be kept leading to
parse errors on the following lines.

Commits
-------

3a22165 [Yaml] recognize when a block scalar is left
2016-01-04 12:01:16 +01:00
Christian Flothmann 3a2216559b [Yaml] recognize when a block scalar is left
The parser did not recognize when the block scalar was completely parsed
and thus treated following comments as they need to be kept leading to
parse errors on the following lines.
2016-01-03 20:52:40 +01:00
Jérôme Vasseur 8566dc18fc Remove normalizer cache in Serializer class 2016-01-03 18:07:57 +01:00
Fabien Potencier 7b097ae418 minor #17244 Update copyright year (dosten)
This PR was merged into the 2.3 branch.

Discussion
----------

Update copyright year

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

Happy new year! 🎉

Commits
-------

ce067e6 Update copyright year
2016-01-03 16:28:35 +01:00
Diego Saint Esteben ce067e6460 Update copyright year 2016-01-01 23:53:47 -03:00
Sébastien Santoro 169d5513a6 Removed spaces before semicolon
'lorem ; ipsum' → 'lorem; ipsum'
2016-01-01 15:10:52 +00:00
Fabien Potencier 1b15ac3bdc minor #17085 [2.3] Static Code Analysis for Components (kalessil)
This PR was squashed before being merged into the 2.3 branch (closes #17085).

Discussion
----------

[2.3] Static Code Analysis for Components

| 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

Static Code Analysis with Php Inspections (EA Extended):
    - remaining mkdir race conditions
    - continue miss-usage in switch

Commits
-------

6d303c7 [2.3] Static Code Analysis for Components
2015-12-31 19:24:03 +01:00
Vladimir Reznichenko 6d303c7755 [2.3] Static Code Analysis for Components 2015-12-31 19:24:01 +01:00
Nicolas Grekas e9dcc04ace minor #17198 [Process] Clean tested process on tear down (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Process] Clean tested process on tear down

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

As show on this failing test (https://travis-ci.org/symfony/symfony/jobs/99569782#L2690) and confirmed locally, some tested process objects remain in memory until the global destructor shutdown stage.
This PR forces processes to be cleaned right after their test case.

Commits
-------

80e1107 [Process] Clean tested process on tear down
2015-12-31 11:58:59 +01:00
Nicolas Grekas 80e11071cc [Process] Clean tested process on tear down 2015-12-31 11:29:46 +01:00
Nicolas Grekas 4512e3456d [travis] Use xargs instead of parallel to test --enable-sigchild 2015-12-31 10:15:06 +01:00
Nicolas Grekas 3aa30005f0 bug #17195 bug #14246 [Filesystem] dumpFile() non atomic (Hidde Boomsma)
This PR was merged into the 2.3 branch.

Discussion
----------

bug #14246 [Filesystem] dumpFile() non atomic

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

Remove race condition where `dumpFile` has written the resulting file but has not given access yet.

Commits
-------

e4015d5 bug #14246 [Filesystem] dumpFile() non atomic
2015-12-31 10:05:40 +01:00