Commit Graph

20138 Commits

Author SHA1 Message Date
Fabien Potencier
9afd7e02e0 Merge branch '2.3' into 2.7
* 2.3:
  fixed test
2016-01-21 09:40:12 +01:00
Fabien Potencier
6eda9ad834 fixed test 2016-01-21 09:40:05 +01:00
Fabien Potencier
0c28d753e2 bug #16822 [FrameworkBundle][Validator] Fix apc cache service deprecation (ogizanagi)
This PR was merged into the 2.8 branch.

Discussion
----------

[FrameworkBundle][Validator] Fix apc cache service deprecation

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

Related to #16795

I guess the deprecation was on the wrong service.
Also, no deprecation notice was triggered about using `"apc"` as the value of the `framework.validation.cache` configuration option. This PR adds the missing deprecation.

> 📝 _NOTE_: The standard edition will need to be updated [here](https://github.com/symfony/symfony-standard/blob/2.8/app/config/config_prod.yml#L6).

Commits
-------

907bbec [FrameworkBundle][Validator] Fix apc cache service deprecation
2016-01-21 08:28:13 +01:00
Fabien Potencier
ddc668d1cb Merge branch '2.3' into 2.7
* 2.3:
  fixed CS
2016-01-21 07:59:09 +01:00
Fabien Potencier
78c8543d25 Merge branch '2.8' into 3.0
* 2.8:
  make tests compatible with Symfony 2.8 and 3.0
2016-01-21 07:33:42 +01:00
Fabien Potencier
42862c4668 fixed CS 2016-01-21 07:28:40 +01:00
Stepan Anchugov
b85059a672 Remove default match from AbstractConfigCommand::findExtension
Previously, findExtension would return the first extension that might
not even match the $name parameter.
2016-01-21 07:10:38 +01:00
Konstantin.Myakshin
b8028f6053 Remove unused imports 2016-01-21 00:01:55 +02:00
Christian Flothmann
4d2930e52a make tests compatible with Symfony 2.8 and 3.0 2016-01-20 21:05:54 +01:00
Christian Flothmann
9d034787fe tag for dumped PHP objects must be a local one 2016-01-20 20:16:59 +01:00
Fabien Potencier
67df429d99 Merge branch '2.8' into 3.0
* 2.8: (48 commits)
  [Process] Use stream based storage to avoid memory issues
  Fix upgrade guides concerning erroneous removal of assets helper
  [Process] Remove a misleading comment
  Fix markdown typo
  ChooseBaseUrl should return an index
  [Form] ChoiceType: Fix a notice when 'choices' normalizer is replaced
  Improve the phpdoc of SplFileInfo methods
  [Process] Use stream based storage to avoid memory issues
  [FrameworkBundle] Don't log twice with the error handler
  synchronize 2.8 and 3.0 upgrade files
  Remove useless is_object condition
  [Process] Fix typo, no arguments needed anymore
  [Serializer] Introduce constants for context keys
  Fixed the documentation of VoterInterface::supportsAttribute
  Fixed Bootstrap form theme form "reset" buttons
  Fixed the form profiler when using long form types
  [PropertyInfo] PhpDocExtractor: Fix a notice when the property doesn't exist
  Remove useless duplicated tests
  [FrameworkBundle] Optimize framework extension tests
  synchronize 2.7 and 3.0 upgrade files
  ...
2016-01-20 13:18:23 +01:00
Fabien Potencier
fd50be95d9 Merge branch '2.7' into 2.8
* 2.7: (28 commits)
  [Process] Use stream based storage to avoid memory issues
  Fix upgrade guides concerning erroneous removal of assets helper
  [Process] Remove a misleading comment
  Fix markdown typo
  ChooseBaseUrl should return an index
  [Form] ChoiceType: Fix a notice when 'choices' normalizer is replaced
  Improve the phpdoc of SplFileInfo methods
  [Process] Use stream based storage to avoid memory issues
  [FrameworkBundle] Don't log twice with the error handler
  Remove useless is_object condition
  [Process] Fix typo, no arguments needed anymore
  [Serializer] Introduce constants for context keys
  Fixed the documentation of VoterInterface::supportsAttribute
  Fixed Bootstrap form theme form "reset" buttons
  Remove useless duplicated tests
  [FrameworkBundle] Optimize framework extension tests
  synchronize 2.7 and 3.0 upgrade files
  fix merge 2.3 into 2.7 for SecureRandom dependency
  Use is_subclass_of instead of reflection
  Use is_subclass_of instead of Reflection when possible
  ...
2016-01-20 13:09:07 +01:00
Javier Eguiluz
12d447d3c8 Fixed form types in profiler 2016-01-20 12:43:36 +01:00
Javier Eguiluz
11b63ff686 Allow absolute URLs to be displayed in the debug toolbar 2016-01-20 10:38:59 +01:00
Romain Neutron
2d931f43e0 [Process] Use stream based storage to avoid memory issues 2016-01-20 10:24:45 +01:00
Fabien Potencier
6ec5537aed Merge branch '2.3' into 2.7
* 2.3:
  [Process] Remove a misleading comment
  Improve the phpdoc of SplFileInfo methods
  [Process] Use stream based storage to avoid memory issues
  Fixed the documentation of VoterInterface::supportsAttribute
  Remove useless duplicated tests
  [FrameworkBundle] Optimize framework extension tests
  Use is_subclass_of instead of Reflection when possible
2016-01-20 07:45:12 +01:00
Fabien Potencier
6d8078febf bug #17423 [2.3][Process] Use stream based storage to avoid memory issues (romainneutron)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3][Process] Use stream based storage to avoid memory issues

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

Commits
-------

da73125 [Process] Use stream based storage to avoid memory issues
2016-01-20 07:43:36 +01:00
Fabien Potencier
1941add676 minor #17419 Fixed the documentation of VoterInterface::supportsAttribute (javiereguiluz)
This PR was merged into the 2.3 branch.

Discussion
----------

Fixed the documentation of VoterInterface::supportsAttribute

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

Commits
-------

d662c2a Fixed the documentation of VoterInterface::supportsAttribute
2016-01-19 22:34:18 +01:00
Fabien Potencier
98f86c0834 bug #17041 [FrameworkBundle] Added the assets helper again (dosten)
This PR was merged into the 3.0 branch.

Discussion
----------

[FrameworkBundle] Added the assets helper again

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

This PR is a follow up of #14972, we deprecated and removed the AssetsHelper in 2.7/3.0 doing impossible to use the Asset component and the PHP templates together, I've submitted this PR to be merged in 3.0 because IMO this is a bug fix, but we documented the deprecation and removal of the helper, what we should do here? (https://github.com/symfony/symfony/blob/3.0/UPGRADE-3.0.md#frameworkbundle and https://github.com/symfony/symfony/blob/2.8/UPGRADE-2.7.md#frameworkbundle)

cc/ @WouterJ

Commits
-------

98cb838 Added the assets helper again
2016-01-19 22:28:11 +01:00
Fabien Potencier
90ce9bc35e minor #17378 [Asset] ChooseBaseUrl should return an offset (bburnichon)
This PR was merged into the 2.7 branch.

Discussion
----------

[Asset] ChooseBaseUrl should return an offset

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

Enforce chooseBaseUrl to return an integer offset to the baseUrls member.

Commits
-------

0d041c3 ChooseBaseUrl should return an index
2016-01-19 17:56:49 +01:00
Jakub Zalas
71f4a3200e [Process] Remove a misleading comment
The described behaviour was never implemented.
2016-01-19 16:31:40 +00:00
Benoît Burnichon
0d041c3f8a ChooseBaseUrl should return an index
Enforce chooseBaseUrl to return an integer index to the baseUrls member.
2016-01-19 13:47:30 +01:00
Fabien Potencier
414ddf7c2c bug #17406 [Form] ChoiceType: Fix a notice when 'choices' normalizer is replaced (paradajozsef)
This PR was squashed before being merged into the 2.7 branch (closes #17406).

Discussion
----------

[Form] ChoiceType: Fix a notice when 'choices' normalizer is replaced

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

As @gseidel [mentioned](https://github.com/symfony/symfony/issues/17270#issuecomment-169115049), the notice only occurs, when a custom choice field added after a choice field **and** the custom type is expanded, **and** the ```'choices'``` normalizer is replaced. The problem is that when ```'choices'``` option is replaced, the [default choiceNormalizer](https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php#L262) is not invoked. This normalizer would [clear](https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php#L264) the labels from previous invocation, but it's been replaced in the custom choice type. As a result [$choiceLabel](https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php#L279) normalizer will get the wrong labels because it shares the same scope with [$choiceNormalizer](https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php#L262). Resetting the label values after copy solves this problem.

Commits
-------

be056fd [Form] ChoiceType: Fix a notice when 'choices' normalizer is replaced
2016-01-19 13:18:15 +01:00
Paráda József
be056fd0bf [Form] ChoiceType: Fix a notice when 'choices' normalizer is replaced 2016-01-19 13:18:13 +01:00
Fabien Potencier
d55f73fb12 minor #17422 [Serializer] Introduce constants for context keys (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Serializer] Introduce constants for context keys

| 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

Introduces constants for keys. Follow up @xabbuh's https://github.com/symfony/symfony/pull/17113/files#r48598904

Commits
-------

c56c7bf [Serializer] Introduce constants for context keys
2016-01-19 13:16:25 +01:00
Fabien Potencier
3a19369e61 minor #17431 [Serializer] Remove useless is_object condition (paradajozsef)
This PR was merged into the 2.7 branch.

Discussion
----------

[Serializer] Remove useless is_object condition

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

[This condition](https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Serializer/Serializer.php#L185) is useless, because ```$class``` is not used in ```getNormalizer()```.

Commits
-------

f6fd5e4 Remove useless is_object condition
2016-01-19 13:13:55 +01:00
Fabien Potencier
63cb9a90e2 bug #17433 [FrameworkBundle] Don't log twice with the error handler (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Don't log twice with the error handler

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

Commits
-------

90d493e [FrameworkBundle] Don't log twice with the error handler
2016-01-19 13:12:05 +01:00
Matthieu Napoli
1b170d7a85 Improve the phpdoc of SplFileInfo methods 2016-01-19 13:10:23 +01:00
Romain Neutron
da73125a9c [Process] Use stream based storage to avoid memory issues 2016-01-19 11:50:56 +01:00
Kévin Dunglas
85fd8754ec minor #17286 [Serializer] Refactor serializer normalize method (jvasseur)
This PR was merged into the 2.7 branch.

Discussion
----------

[Serializer] Refactor serializer normalize method

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

The serializer normalize method contains some dead or duplicate code. This PR refactor the method to make it simpler.

I tried to keep the same Exceptions in the same situations but they could probably be simplified too. (The last case only append if you pass a ressource to the serializer.)

Commits
-------

2bb5f45 Refactor serializer normalize method
2016-01-19 09:01:47 +01:00
Fabien Potencier
02f66e2ff5 bug #17418 Fixed Bootstrap form theme form "reset" buttons (javiereguiluz)
This PR was merged into the 2.7 branch.

Discussion
----------

Fixed Bootstrap form theme form "reset" buttons

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

All the credit for this solution goes to @AntonioAmore, who reported the error originally and provided a solution. I only confirmed the bug and verified the proposed solution.

Commits
-------

67c7f05 Fixed Bootstrap form theme form "reset" buttons
2016-01-19 08:38:18 +01:00
Nicolas Grekas
90d493ea97 [FrameworkBundle] Don't log twice with the error handler 2016-01-19 00:13:42 +01:00
Paráda József
f6fd5e47ed Remove useless is_object condition 2016-01-18 23:07:25 +01:00
Geoff
a0dc3994d4 [ClassLoader] Use symfony/polyfill-apcu 2016-01-18 12:27:23 -08:00
Romain Neutron
7f89158a0d [Process] Fix typo, no arguments needed anymore 2016-01-18 19:47:39 +01:00
Kévin Dunglas
c56c7bf869 [Serializer] Introduce constants for context keys 2016-01-18 17:42:55 +01:00
Javier Eguiluz
d662c2ae8f Fixed the documentation of VoterInterface::supportsAttribute 2016-01-18 17:25:45 +01:00
Javier Eguiluz
67c7f05d96 Fixed Bootstrap form theme form "reset" buttons 2016-01-18 17:01:35 +01:00
Javier Eguiluz
b23f2ef9af Fixed the form profiler when using long form types 2016-01-18 15:59:33 +01:00
Kévin Dunglas
73db0ec7b4 [PropertyInfo] PhpDocExtractor: Fix a notice when the property doesn't exist 2016-01-18 11:44:30 +01:00
Wouter J
deab127663 Remove useless duplicated tests 2016-01-18 10:52:44 +01:00
Fabien Potencier
80086ad54b minor #17399 [FrameworkBundle] Optimize framework extension tests (paradajozsef)
This PR was squashed before being merged into the 2.3 branch (closes #17399).

Discussion
----------

[FrameworkBundle] Optimize framework extension tests

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

```XmlFrameworkExtensionTest```, ```YamlFrameworkExtensionTest``` and ```PhpFrameworkExtensionTest``` are slow tests. The reason is that the [parent test](https://github.com/symfony/symfony/blob/2.3/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php#L308) creates the container in every test case. With different parameters, but the same is created several times. (actually with 'full' parameter it is created 12 times in 2.3) If we cache the different containers during test, we avoid to creating the same container multiple times.

As I experienced it can be merged without a conflict into 2.3 and 2.7, but 2.8 and 3.0 conflicts.

I have these result on my local setup. Not that big optimalization, but a few second can matter too imo. :)

**2.3 before**

```go
Time: 8.79 seconds, Memory: 55.75Mb
OK (449 tests, 586 assertions)
OK src/Symfony/Bundle/FrameworkBundle
```

**2.3 after**

```go
Time: 5.85 seconds, Memory: 58.25Mb
OK (449 tests, 586 assertions)
OK src/Symfony/Bundle/FrameworkBundle
```

----

**2.7 before**

```go
Time: 17.17 seconds, Memory: 81.50Mb
OK, but incomplete, skipped, or risky tests!
Tests: 753, Assertions: 1098, Skipped: 3.
Legacy deprecation notices (45)
OK src/Symfony/Bundle/FrameworkBundle
```
**2.7 after**

```go
Time: 12.65 seconds, Memory: 88.00Mb
OK, but incomplete, skipped, or risky tests!
Tests: 753, Assertions: 1098, Skipped: 3.
Legacy deprecation notices (41)
OK src/Symfony/Bundle/FrameworkBundle
```

----

**2.8 before**

```go
Time: 18.94 seconds, Memory: 88.00Mb
OK, but incomplete, skipped, or risky tests!
Tests: 787, Assertions: 1159, Skipped: 3.
Legacy deprecation notices (89)
OK src/Symfony/Bundle/FrameworkBundle
```

**2.8 after**

```go
Time: 12.69 seconds, Memory: 94.50Mb
OK, but incomplete, skipped, or risky tests!
Tests: 787, Assertions: 1159, Skipped: 3.
Legacy deprecation notices (85)
OK src/Symfony/Bundle/FrameworkBundle
```

----

**3.0 before**

```go
Time: 16.48 seconds, Memory: 73.75Mb
OK (741 tests, 1043 assertions)
OK src/Symfony/Bundle/FrameworkBundle
```

**3.0 after**

```go
Time: 11.49 seconds, Memory: 76.75Mb
OK (741 tests, 1043 assertions)
OK src/Symfony/Bundle/FrameworkBundle
```

Commits
-------

f6a078b [FrameworkBundle] Optimize framework extension tests
2016-01-17 17:17:04 +01:00
Paráda József
f6a078b96c [FrameworkBundle] Optimize framework extension tests 2016-01-17 17:17:03 +01:00
Fabien Potencier
ab43f389e2 minor #17401 [2.7] Use is_subclass_of instead of reflection (Ener-Getick)
This PR was merged into the 2.7 branch.

Discussion
----------

[2.7] Use is_subclass_of instead of reflection

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

Follows https://github.com/symfony/symfony/pull/17400

>
For performance reason, I replaced a reflection instantiation by ``is_subclass_of``.

Commits
-------

5af5d06 Use is_subclass_of instead of reflection
2016-01-16 19:10:37 +01:00
Tobias Schultze
aedeebb4f1 fix merge 2.3 into 2.7 for SecureRandom dependency 2016-01-16 18:29:47 +01:00
Ener-Getick
5af5d06f2e Use is_subclass_of instead of reflection 2016-01-16 14:49:28 +01:00
Ener-Getick
51e3652aeb Use is_subclass_of instead of Reflection when possible 2016-01-16 14:42:15 +01:00
Fabien Potencier
8d7b19fbbe Merge branch '2.3' into 2.7
* 2.3:
  Fixed correct class name in thrown exception
  Add gc_mem_caches() call for PHP7 after itoken_get_all() as new memory manager will not release small buckets to OS automatically
  Removed a duplicated test in CardSchemeValidatorTest
  Fix perf and mem issue when using token_get_all
  [SecurityBundle] fix SecureRandom service constructor args
  Normalize params only when used.
2016-01-16 05:55:21 +01:00
Fabien Potencier
7d72f93e90 bug #17373 [SecurityBundle] fix SecureRandom service constructor args (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[SecurityBundle] fix SecureRandom service constructor args

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

Commits
-------

50d55f6 [SecurityBundle] fix SecureRandom service constructor args
2016-01-16 05:53:05 +01:00
Paráda József
d7e3254438 [3.0] Remove calls to not-existent method 2016-01-16 01:08:58 +01:00
Paráda József
724031822a [3.0] Remove useless array declaration 2016-01-15 23:47:08 +01:00
Fabien Potencier
3223c2517e bug #17382 [TwigBridge] Use label_format option for checkbox and radio labels (enumag)
This PR was merged into the 2.8 branch.

Discussion
----------

[TwigBridge] Use label_format option for checkbox and radio labels

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

Commits
-------

6fbd9a7 [TwigBridge] Use label_format option for checkbox and radio labels
2016-01-15 18:05:52 +01:00
Fabien Potencier
0f6a32dac9 bug #17380 [TwigBridge] Use label_format option for checkbox and radio labels (enumag)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBridge] Use label_format option for checkbox and radio labels

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

Commits
-------

dc8f780 [TwigBridge] Use label_format option for checkbox and radio labels
2016-01-15 18:01:21 +01:00
Fabien Potencier
9d189137e3 minor #17364 [Bridge] [Doctrine] Normalize params only when used. [2.3] (SpacePossum)
This PR was merged into the 2.3 branch.

Discussion
----------

[Bridge] [Doctrine] Normalize params only when used. [2.3]

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

If no logger is set the params are not used so those don't have to be normalized.

Commits
-------

6852a46 Normalize params only when used.
2016-01-15 17:58:40 +01:00
Fabien Potencier
ac3111fe8a bug #17377 Fix performance (PHP5) and memory (PHP7) issues when using token_get_all (nicolas-grekas, peteward)
This PR was merged into the 2.3 branch.

Discussion
----------

Fix performance (PHP5) and memory (PHP7) issues when using token_get_all

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

Although it's not the case anymore on PHP 7, on PHP 5, `is_array` checks are much slower than `isset` checks.

Also from @peteward in #17384:
>  New PHP7 memory manager will not release small buckets to OS automatically in cases exposed by `token_get_all()`. This function call addition specifically for PHP7 will reclaim this memory to keep the footprint down of long processe

> See above ticket and suggested actions by PHP internals team for long-running tasks (https://bugs.php.net/70098) - I think `cache:clear/warmup` on a heavy app justifies this.

> We're running on cloud-based hosting platforms under memory limitations (Platform.sh). When memory is exceeded we're into swap and the cache clearing process goes from seconds to minutes for the initial deployment, which really slows our development workflow and also causes holding page delays.

Commits
-------

e555aad Add gc_mem_caches() call for PHP7 after itoken_get_all() as new memory manager will not release small buckets to OS automatically
d1f72d8 Fix perf and mem issue when using token_get_all
2016-01-15 17:52:13 +01:00
Robin van der Vleuten
c847feb5f3 Fixed correct class name in thrown exception 2016-01-15 15:32:28 +01:00
Nicolas Grekas
4d99d4ded0 Merge branch '2.7' into 2.8
* 2.7:
  [ClassLoader] Use symfony/polyfill-apcu
  [HttpFoundation][Cookie] Cookie DateTimeInterface fix
  bumped Symfony version to 2.7.10
  updated VERSION for 2.7.9
  updated CHANGELOG for 2.7.9
  bumped Symfony version to 2.3.38
  updated VERSION for 2.3.37
  update CONTRIBUTORS for 2.3.37
  updated CHANGELOG for 2.3.37

Conflicts:
	composer.json
	src/Symfony/Component/ClassLoader/Tests/ApcClassLoaderTest.php
	src/Symfony/Component/HttpKernel/Kernel.php
2016-01-15 10:29:29 +01:00
Nicolas Grekas
f9caa244f4 Merge branch '2.3' into 2.7
* 2.3:
  [ClassLoader] Use symfony/polyfill-apcu
  [HttpFoundation][Cookie] Cookie DateTimeInterface fix
  bumped Symfony version to 2.3.38
  updated VERSION for 2.3.37
  update CONTRIBUTORS for 2.3.37
  updated CHANGELOG for 2.3.37

Conflicts:
	.travis.yml
	src/Symfony/Component/ClassLoader/composer.json
	src/Symfony/Component/HttpKernel/Kernel.php
2016-01-15 10:26:56 +01:00
Peter Ward
e555aade12 Add gc_mem_caches() call for PHP7 after itoken_get_all() as new memory manager will not release small buckets to OS automatically 2016-01-15 10:01:44 +01:00
Javier Eguiluz
197413168c Removed a duplicated test in CardSchemeValidatorTest 2016-01-15 09:07:14 +01:00
Jérôme Vasseur
2bb5f45aea Refactor serializer normalize method 2016-01-14 23:02:18 +01:00
Jáchym Toušek
6fbd9a7cf6 [TwigBridge] Use label_format option for checkbox and radio labels 2016-01-14 21:01:28 +01:00
Jáchym Toušek
dc8f780f6b [TwigBridge] Use label_format option for checkbox and radio labels 2016-01-14 20:10:56 +01:00
Tobias Schultze
eaef88c565 bug #17358 [ClassLoader] Use symfony/polyfill-apcu (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[ClassLoader] Use symfony/polyfill-apcu

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

Fixes APC usage on PHP 7 or when APCu bc-layer is disabled

Commits
-------

623595f [ClassLoader] Use symfony/polyfill-apcu
2016-01-14 19:12:34 +01:00
Nicolas Grekas
623595f0d6 [ClassLoader] Use symfony/polyfill-apcu 2016-01-14 18:42:51 +01:00
Wouter de Wild
f1f9754bcb [HttpFoundation][Cookie] Cookie DateTimeInterface fix 2016-01-14 17:21:08 +01:00
Fabien Potencier
4ff05e0e5e bumped Symfony version to 2.8.3 2016-01-14 14:31:24 +01:00
Nicolas Grekas
d1f72d8ef4 Fix perf and mem issue when using token_get_all 2016-01-14 14:27:10 +01:00
Tobias Schultze
50d55f6855 [SecurityBundle] fix SecureRandom service constructor args 2016-01-14 14:17:14 +01:00
Fabien Potencier
1c3b1c73ce updated VERSION for 2.8.2 2016-01-14 13:00:59 +01:00
Fabien Potencier
07673dcd38 bumped Symfony version to 2.7.10 2016-01-14 12:52:48 +01:00
Fabien Potencier
c9b1a84656 updated VERSION for 2.7.9 2016-01-14 11:41:45 +01:00
Possum
6852a46423 Normalize params only when used. 2016-01-14 11:04:11 +01:00
Fabien Potencier
bbbb0796f4 bumped Symfony version to 2.3.38 2016-01-14 10:59:28 +01:00
Fabien Potencier
2f98f158c9 updated VERSION for 2.3.37 2016-01-14 10:14:51 +01:00
Fabien Potencier
2918fdff6f Merge branch '2.7' into 2.8
* 2.7:
  added missing requirement
  removed obsolete tests, fixed composer.json
  do not ship with a custom rng implementation
2016-01-14 10:10:32 +01:00
Fabien Potencier
f898fa7f53 added missing requirement 2016-01-14 10:08:21 +01:00
Fabien Potencier
dea8f08bc1 Merge branch '2.3' into 2.7
* 2.3:
  removed obsolete tests, fixed composer.json
  do not ship with a custom rng implementation
2016-01-14 10:07:40 +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
Nicolas Grekas
45feb164c2 bug #17253 [Console] HHVM read input stream bug (mbutkereit)
This PR was squashed before being merged into the 2.8 branch (closes #17253).

Discussion
----------

[Console] HHVM read input stream bug

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

HHVM readline() function requires a parameter  see:

https://github.com/facebook/hhvm/blob/master/hphp/runtime/ext/readline/ext_readline.php

But the php readline does not require one.
```
In   Symfony\Component\Console\Helper\QuestionHelper
 …
 readFromInput($stream)
 …
```
we use readline() without a parameter.

HHVM Version:
```
HipHop VM 3.10.1 (rel)
Compiler: tags/HHVM-3.10.1-0-g689b4969a141620ee5a282ce0dbf72278c84d44b
Repo schema: 6c99ee1f98340f6f3ef397a332583f0e843a627d
```

Docker Container:
```
docker run --rm -it -v `pwd`:`pwd` -w `pwd` brunoric/hhvm:deb hhvm test.php ls
```
Test.php
```
<?php
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\Question;

use Symfony\Component\Console\Helper\QuestionHelper;

require_once  "vendor/autoload.php";

$console = new Application();

$console
    ->register('ls')
    ->setDescription('Try input')
    ->setCode(function (InputInterface $input, OutputInterface $output) {

        $question = new Question('Your email address: ');
        $question->setValidator(
            function ($answer) {
                return $answer;
            }
        );
        $question->setMaxAttempts(5);
		    $helper = new QuestionHelper();
	      $email = $helper->ask($input, $output, $question);

        $output->writeln(sprintf('Email Adress: <info>%s</info>', $email));
    })
;
$console->run();
```

composer.json
```
{
    "require": {
        "symfony/console": "^3.0"
    }
}
```

Result:
No input is possible and you got a warning
```
Your email address:
Warning: readline() expects exactly 1 parameter, 0 given in /clitest/vendor/symfony/console/Helper/QuestionHelper.php on line 436
Email Adress:
```

Fix:
Add a empty string parameter to  readline() or use fgets() for hhvm.

Commits
-------

e7f17a7 [Console] HHVM read input stream bug
2016-01-14 09:33:16 +01:00
Marvin Butkereit
e7f17a794a [Console] HHVM read input stream bug 2016-01-14 09:33:14 +01:00
Fabien Potencier
c3003468e2 Merge branch '2.8' into 3.0
* 2.8:
  Fix max width for multibyte keys in choice question
  [Console] Display console application name even when no version set
  Remove empty statements.
2016-01-14 09:27:24 +01:00
Fabien Potencier
8d53763a74 Merge branch '2.7' into 2.8
* 2.7:
  Fix max width for multibyte keys in choice question
  [Console] Display console application name even when no version set
  Remove empty statements.
2016-01-14 09:26:52 +01:00
Fabien Potencier
5c29e717a2 Merge branch '2.3' into 2.7
* 2.3:
  [Console] Display console application name even when no version set
  Remove empty statements.
2016-01-14 09:26:43 +01:00
Marek Pietrzak
5d2463b925 Fix max width for multibyte keys in choice question 2016-01-14 09:06:07 +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
Paráda József
37fb4e2725 Remove calls to non-existing method 2016-01-14 01:18:51 +01:00
Possum
4491c970b3 Remove empty statements. 2016-01-13 18:07:01 +01:00
Nicolas Grekas
f5db5397a0 Merge branch '2.8' into 3.0
* 2.8:
  [Yaml] Fix tests on PHP 7.0.2
  [FrameworkBundle] Don't log twice with the error handler
  [2.7] Workaround https://bugs.php.net/63206
  [2.3] Workaround https://bugs.php.net/63206
  Add closing parenthesis
  [Serializer] Unset object_to_populate after using it
  [Serializer] Allow to use proxies in object_to_populate

Conflicts:
	src/Symfony/Component/Debug/ErrorHandler.php
	src/Symfony/Component/HttpFoundation/JsonResponse.php
2016-01-13 11:30:06 +01:00
Nicolas Grekas
26979ed6ca Merge branch '2.7' into 2.8
* 2.7:
  [Yaml] Fix tests on PHP 7.0.2
  [2.7] Workaround https://bugs.php.net/63206
  [2.3] Workaround https://bugs.php.net/63206
  Add closing parenthesis
  [Serializer] Unset object_to_populate after using it
  [Serializer] Allow to use proxies in object_to_populate
2016-01-13 11:28:07 +01:00
Nicolas Grekas
3c6d1a93dd Merge branch '2.3' into 2.7
* 2.3:
  [Yaml] Fix tests on PHP 7.0.2
  [2.3] Workaround https://bugs.php.net/63206
  Add closing parenthesis
2016-01-13 11:26:43 +01:00
Kévin Dunglas
eac37cd4ae bug #17328 [Serializer] Allow to use proxies in object_to_populate (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Serializer] Allow to use proxies in object_to_populate

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

Allows to populate a proxy (or any class having the given type).

Commits
-------

b16b5b9 [Serializer] Allow to use proxies in object_to_populate
2016-01-13 11:07:31 +01:00
Nicolas Grekas
c60053e0fd bug #17202 [FrameworkBundle] Don't log twice with the error handler (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[FrameworkBundle] Don't log twice with the error handler

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

ping @Tobion @yapro does it work as expected with this patch?

Commits
-------

5926ff2 [FrameworkBundle] Don't log twice with the error handler
2016-01-13 10:41:30 +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
Nicolas Grekas
5926ff2f95 [FrameworkBundle] Don't log twice with the error handler 2016-01-13 09:37:36 +01:00
Nicolas Grekas
d44e0b7212 [2.7] Workaround https://bugs.php.net/63206 2016-01-13 08:57:33 +01:00
Nicolas Grekas
c5479dde8c [2.3] Workaround https://bugs.php.net/63206 2016-01-13 08:28:48 +01:00
omerida
5cdccc4350 Add closing parenthesis 2016-01-12 14:46:23 -05:00
Kévin Dunglas
ff18b68e77 [Serializer] Unset object_to_populate after using it 2016-01-12 19:26:02 +01:00
Fabien Potencier
a5c0b8f8b9 Merge branch '2.8' into 3.0
* 2.8:
  Typo fix
  [WebProfiler] Fixed sf-minitoolbar height
  [2.3] Static Code Analysis for Components
  [Serializer] Use $context['cache_key'] to enhance caching
  Fixed erroneous deprecation notice for extended Interfaces
  [Routing] cs fix
  Added support \IteratorAggregate for UniqueEntityValidator
  Update AbstractChoiceListTest.php
  Fix #17306 Paths with % in it are note allowed (like urlencoded)
  Use proper class to fetch $versionStrategy property
  Added sort order SORT_STRING for params in UriSigner
  Remove normalizer cache in Serializer class
  [Serializer] ObjectNormalizer: context can contain not serializable data
2016-01-12 18:46:41 +01:00
Fabien Potencier
4ed54a39ab Merge branch '2.7' into 2.8
* 2.7:
  Typo fix
  [2.3] Static Code Analysis for Components
  Added support \IteratorAggregate for UniqueEntityValidator
  Update AbstractChoiceListTest.php
  Fix #17306 Paths with % in it are note allowed (like urlencoded)
  Use proper class to fetch $versionStrategy property
  Added sort order SORT_STRING for params in UriSigner
  Remove normalizer cache in Serializer class
2016-01-12 18:46:01 +01:00
Fabien Potencier
da655a9368 Merge branch '2.3' into 2.7
* 2.3:
  Typo fix
  [2.3] Static Code Analysis for Components
  Added support \IteratorAggregate for UniqueEntityValidator
  Fix #17306 Paths with % in it are note allowed (like urlencoded)
  Added sort order SORT_STRING for params in UriSigner
  Remove normalizer cache in Serializer class
2016-01-12 18:44:11 +01:00
Fabien Potencier
3331c8ac2a bug #17199 [Serializer] Allow context to contain not serializable data (dunglas, nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[Serializer] Allow context to contain not serializable data

| 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

Allow the context to contain not serializable data even for the `ObjectNormalizer` (BC break fix).

Commits
-------

996f69d Merge pull request #2 from nicolas-grekas/ser-cache
8560c13 [Serializer] Use $context['cache_key'] to enhance caching
c1740fc [Serializer] ObjectNormalizer: context can contain not serializable data
2016-01-12 18:19:17 +01:00
Fabien Potencier
51a5a2659c bug #17334 [WebProfiler] Fixed sf-minitoolbar height (yceruto)
This PR was merged into the 2.8 branch.

Discussion
----------

[WebProfiler] Fixed sf-minitoolbar height

| 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

![toolbar-sf-2 8](https://cloud.githubusercontent.com/assets/2028198/12245117/d293c178-b874-11e5-981b-0ca335a8c3aa.png)

EDIT: This bug occurs when we use
```css
* {
    box-sizing: border-box;
}
```
in the stylesheet (TwitterBootstrap for instance)

Commits
-------

9d1e65d [WebProfiler] Fixed sf-minitoolbar height
2016-01-12 18:13:32 +01:00
Yonel Ceruto González
9d1e65dc02 [WebProfiler] Fixed sf-minitoolbar height
added box-sizing

Restore padding box (no visual changes)
2016-01-12 09:10:28 -05:00
David Lima
1ccc15d871 [HttpFoundation] Fixed Request HTTP_USER_AGENT on 3.X versions 2016-01-12 11:37:31 -02: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
Nicolas Grekas
9eb522ecfc bug #17320 [Debug] Fixed erroneous deprecation notice for extended Interfaces (peterrehm)
This PR was merged into the 2.8 branch.

Discussion
----------

[Debug] Fixed erroneous deprecation notice for extended Interfaces

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

Replaces #16775.

Commits
-------

5f4e968 Fixed erroneous deprecation notice for extended Interfaces
2016-01-12 10:07:55 +01:00
Nicolas Grekas
8560c1367e [Serializer] Use $context['cache_key'] to enhance caching 2016-01-12 09:13:32 +01:00
Tobias Schultze
0df74c8ba4 minor #17332 [2.8] [Routing] cs fix (HeahDude)
This PR was merged into the 2.8 branch.

Discussion
----------

[2.8] [Routing] cs fix

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

- remove unused use statement in `ServiceRouterLoader`
- add missing param in phpdoc in `RouteCollectionBuilder`

Commits
-------

9982f96 [Routing] cs fix
2016-01-12 01:20:05 +01:00
Peter Rehm
5f4e968cb9 Fixed erroneous deprecation notice for extended Interfaces 2016-01-11 19:57:09 +01:00
Jules Pietri
9982f96caa [Routing] cs fix
- remove unused use statement in `ServiceRouterLoader`
- add missing param in phpdoc in `RouteCollectionBuilder`
2016-01-11 17:43:36 +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
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
mantulo
0f8da347f8 Update AbstractChoiceListTest.php
fixed phpdoc namespace
2016-01-11 11:03:27 +01:00
Kévin Dunglas
b16b5b9d86 [Serializer] Allow to use proxies in object_to_populate 2016-01-11 10:59:43 +01:00
Pavel Batanov
de7b4d73c6 Fix #17306 Paths with % in it are note allowed (like urlencoded) 2016-01-09 15:55:11 +03:00
Diego Saint Esteben
e38fa135ab Use proper class to fetch $versionStrategy property 2016-01-07 19:01:12 +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
a16c752bbb Merge branch '2.8' into 3.0
* 2.8:
  [WebProfilerBundle] Remove loading status from AJAX toolbar after error
  Add missing apostrophe in setSaveHandler phpdoc
  [VarDumper] Fix typo
  [FrameworkBundle] Add case in Kernel directory guess for PHPUnit
  [FrameworkBundle] Add case in Kernel directory guess for PHPUnit
2016-01-07 14:38:51 +01:00
Fabien Potencier
4555fecf53 Merge branch '2.7' into 2.8
* 2.7:
  Add missing apostrophe in setSaveHandler phpdoc
  [VarDumper] Fix typo
  [FrameworkBundle] Add case in Kernel directory guess for PHPUnit
  [FrameworkBundle] Add case in Kernel directory guess for PHPUnit
2016-01-07 14:38:40 +01:00
Fabien Potencier
19da1850f6 bug #17279 [2.7][FrameworkBundle] Add case in Kernel directory guess for PHPUnit (tgalopin)
This PR was merged into the 2.7 branch.

Discussion
----------

[2.7][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
-------

a7b7766 [FrameworkBundle] Add case in Kernel directory guess for PHPUnit
2016-01-07 14:29:06 +01:00
Fabien Potencier
c4cc147e8d Merge branch '2.3' into 2.7
* 2.3:
  Add missing apostrophe in setSaveHandler phpdoc
  [FrameworkBundle] Add case in Kernel directory guess for PHPUnit
2016-01-07 14:28:07 +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
48b4bcfa47 bug #17063 bug #14246 [Filesystem] dumpFile() negates default file permissions (Hidde Boomsma)
This PR was merged into the 3.0 branch.

Discussion
----------

bug #14246 [Filesystem] dumpFile() negates default file permissions

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

Remain BC compatible with Symfony 2.8.
Without this change a chmod is needed after calling `dumpFile`, making it non atomic.

Commits
-------

53d6d4b bug #14246 [Filesystem] dumpFile() negates default file permissions
2016-01-07 14:25:41 +01:00
Jakub Kucharovic
079ab73302 [WebProfilerBundle] Remove loading status from AJAX toolbar after error 2016-01-07 14:22:28 +01:00
pawel-lewtak
e32f5a2cd2 Add missing apostrophe in setSaveHandler phpdoc 2016-01-07 14:19:31 +01:00
Nicolas Grekas
cb7036093e [VarDumper] Fix typo 2016-01-07 12:12:32 +01:00
Hidde Boomsma
53d6d4b5b3 bug #14246 [Filesystem] dumpFile() negates default file permissions 2016-01-06 14:42:56 +01:00
Titouan Galopin
a7b7766983 [FrameworkBundle] Add case in Kernel directory guess for PHPUnit 2016-01-06 11:27:30 +01:00
Nicolas Grekas
d14eae4b8a Merge branch '2.8' into 3.0
* 2.8:
  [Process] Fix potential race condition
  [PhpUnitBridge] Re-enable the garbage collector
  typo
  [FrameworkBundle] Allow to autowire service_container
  [FrameworkBundle] Set the kernel.name properly after a cache warmup
  Fix toolbar display when nvd3 is loaded on page
  Removed spaces before semicolon
  cast arrays to objects after parsing has finished

Conflicts:
	src/Symfony/Bridge/PhpUnit/bootstrap.php
	src/Symfony/Bundle/FrameworkBundle/Resources/config/services.xml
	src/Symfony/Component/Console/Helper/DialogHelper.php
2016-01-06 11:01:25 +01:00
Nicolas Grekas
111f51dfa5 Merge branch '2.7' into 2.8
* 2.7:
  [Process] Fix potential race condition
  [PhpUnitBridge] Re-enable the garbage collector
  typo
  [FrameworkBundle] Set the kernel.name properly after a cache warmup
  Removed spaces before semicolon
2016-01-06 10:59:23 +01:00
Nicolas Grekas
6cd79e92f6 Merge branch '2.3' into 2.7
* 2.3:
  [Process] Fix potential race condition
  typo
  [FrameworkBundle] Set the kernel.name properly after a cache warmup
  Removed spaces before semicolon
2016-01-06 10:57:37 +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
Nicolas Grekas
478710f984 [PhpUnitBridge] Re-enable the garbage collector 2016-01-06 07:53:30 +01:00
Jáchym Toušek
eab7e11be7 typo 2016-01-05 16:32:23 +01:00
Kévin Dunglas
4e2eef08ed [FrameworkBundle] Allow to autowire service_container 2016-01-04 22:21:22 +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
Fabien Potencier
5991565286 bug #17197 [Yaml] cast arrays to objects after parsing has finished (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[Yaml] cast arrays to objects after parsing has finished

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

Casting arrays to objects must happen after the complete YAML string has
been parsed to avoid errors when parsing subsequent lines.

Commits
-------

8251d67 cast arrays to objects after parsing has finished
2016-01-04 17:50:38 +01:00
Fabien Potencier
674c07070d bug #17247 Fix toolbar display when nvd3 is loaded on page (Seldaek)
This PR was merged into the 2.8 branch.

Discussion
----------

Fix toolbar display when nvd3 is loaded on page

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

Minor CSS fix for the toolbar, as nvd3 sets `svg { display: block }` so you end up with something like:

![image](https://cloud.githubusercontent.com/assets/183678/12079564/974aa694-b235-11e5-897e-ecb31ba20f26.png)

Commits
-------

d7010c0 Fix toolbar display when nvd3 is loaded on page
2016-01-04 17:49:06 +01:00
Tobias Schultze
431ea6b4ef Merge branch '2.8' into 3.0 2016-01-04 15:51:01 +01:00
Tobias Schultze
3686ed64b8 Merge branch '2.7' into 2.8 2016-01-04 15:50:03 +01:00
Tobias Schultze
fff265d451 Merge branch '2.3' into 2.7 2016-01-04 15:49:16 +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
Martin Hasoň
7335dee927 [WebProfilerBundle] Removed duplicated HTML attributes 2016-01-03 23:41:47 +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
Jordi Boggiano
d7010c0e41 Fix toolbar display when nvd3 is loaded on page 2016-01-03 16:17:23 +00:00
Fabien Potencier
5931ef7288 Merge branch '2.8' into 3.0
* 2.8:
  updated copyright year
  updated copyright year
  Update copyright year
  [2.3] Static Code Analysis for Components
2016-01-03 16:35:16 +01:00
Fabien Potencier
c0b894d4c2 updated copyright year 2016-01-03 16:34:36 +01:00
Fabien Potencier
0606d9c8b4 Merge branch '2.7' into 2.8
* 2.7:
  updated copyright year
  Update copyright year
  [2.3] Static Code Analysis for Components
2016-01-03 16:33:41 +01:00
Fabien Potencier
6dbef8ccb8 updated copyright year 2016-01-03 16:33:06 +01:00
Fabien Potencier
d6f503660f Merge branch '2.3' into 2.7
* 2.3:
  Update copyright year
  [2.3] Static Code Analysis for Components
2016-01-03 16:32:00 +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
e469ef4d18 Merge branch '2.8' into 3.0
* 2.8:
  [Process] Clean tested process on tear down
2015-12-31 11:59:47 +01:00
Nicolas Grekas
eb7f2f7443 Merge branch '2.7' into 2.8
* 2.7:
  [Process] Clean tested process on tear down
2015-12-31 11:59:32 +01:00
Nicolas Grekas
bd97e51e0b Merge branch '2.3' into 2.7
* 2.3:
  [Process] Clean tested process on tear down
2015-12-31 11:59:19 +01:00
Nicolas Grekas
80e11071cc [Process] Clean tested process on tear down 2015-12-31 11:29:46 +01:00
Kévin Dunglas
c1740fcc82 [Serializer] ObjectNormalizer: context can contain not serializable data 2015-12-31 11:23:14 +01:00
Christian Flothmann
8251d6711d cast arrays to objects after parsing has finished
Casting arrays to objects must happen after the complete YAML string has
been parsed to avoid errors when parsing subsequent lines.
2015-12-31 10:59:55 +01:00
Nicolas Grekas
217be2399a minor #17194 [Bridge/Doctrine] Fix test case (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[Bridge/Doctrine] Fix test case

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

The choice_list vs choice_loader change is already applied on 3.0,
the `@group legacy` tags a test case that has been already removed in 3.0.
@webmozart or anyone else could you please have a quick look here and confirm it's ok?

Commits
-------

4ef2c33 [Bridge/Doctrine] Fix test case
2015-12-31 10:10:07 +01:00
Nicolas Grekas
98f013fe0c Merge branch '2.7' into 2.8
* 2.7:
  bug #14246 [Filesystem] dumpFile() non atomic
2015-12-31 10:09:35 +01:00
Nicolas Grekas
ddab6278a2 Merge branch '2.3' into 2.7
* 2.3:
  bug #14246 [Filesystem] dumpFile() non atomic

Conflicts:
	src/Symfony/Component/Filesystem/Filesystem.php
2015-12-31 10:09:12 +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
Hidde Boomsma
e4015d5cc3 bug #14246 [Filesystem] dumpFile() non atomic 2015-12-31 09:33:44 +01:00
Nicolas Grekas
4ef2c33aef [Bridge/Doctrine] Fix test case 2015-12-31 09:26:04 +01:00
Nicolas Grekas
78a08f3a68 Merge branch '2.8' into 3.0
* 2.8:
  Fix merge
  [Process] Fix running tests on HHVM>=3.8
  [Form] Improved performance of ChoiceType and its subtypes
  Removed an object as route generator argument

Conflicts:
	src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php
	src/Symfony/Bundle/FrameworkBundle/Resources/config/form.xml
2015-12-30 19:45:14 +01:00
Nicolas Grekas
3676c3b61c Fix merge 2015-12-30 19:31:26 +01:00
Nicolas Grekas
d38278fd12 Merge branch '2.7' into 2.8
* 2.7:
  [Process] Fix running tests on HHVM>=3.8
  [Form] Improved performance of ChoiceType and its subtypes
2015-12-30 19:23:12 +01:00
Nicolas Grekas
c457f7beb7 Merge branch '2.3' into 2.7
* 2.3:
  [Process] Fix running tests on HHVM>=3.8
2015-12-30 19:22:28 +01:00
Nicolas Grekas
a47208bea9 [Process] Fix running tests on HHVM>=3.8 2015-12-30 19:16:06 +01:00
Tobias Schultze
140ed985be feature #16747 [Form] Improved performance of ChoiceType and its subtypes (webmozart)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Improved performance of ChoiceType and its subtypes

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

I found out today that, although CachingFactoryDecorator is part of Symfony 2.7, it is not configured to be used in the DI configuration. This simple in-memory cache improved the page load by 50% for one considerably large form with many (~600) choice/entity fields that I was working on today.

Also, caching of query builders with parameters was broken, since the parameters are represented by objects. PHP's object hashes were used to calculate the cache keys, hence the cache always missed. I converted parameters to arrays for calculating the cache keys to fix this problem.

Commits
-------

a0ef101 [Form] Improved performance of ChoiceType and its subtypes
2015-12-30 16:04:43 +01:00
Christophe Coevoet
a22a0707d4 bug #17179 [WebProfiler] Removed an object as route generator argument (iltar)
This PR was merged into the 2.8 branch.

Discussion
----------

[WebProfiler] Removed an object as route generator argument

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

Commits
-------

43fd7bb Removed an object as route generator argument
2015-12-30 12:38:15 +01:00
Nicolas Grekas
52c4304084 Merge branch '2.8' into 3.0
* 2.8:
  [Form] fix Catchable Fatal Error if choices is not an array
  [Process] Fix a transient test
  [Process] Fix potential race condition leading to transient tests
  [DoctrineBridge] [PropertyInfo] Catch Doctrine\ORM\Mapping\MappingException
  [Routing] removed unused variable in PhpMatcherDumperTest class.
  [travis] use github token to fetch deps from ZIP files
  [DependencyInjection] fixes typo in triggered deprecation notice.
  [Form] improve deprecation messages for the "empty_value" and "choice_list" options in the ChoiceType class.
  [Form] Fixed regression on Collection type
  add missing symfony/polyfill-php55 dependency

Conflicts:
	src/Symfony/Component/DependencyInjection/SimpleXMLElement.php
	src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php
	src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php
	src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php
	src/Symfony/Component/HttpFoundation/composer.json
2015-12-30 11:41:35 +01:00
Nicolas Grekas
7fc30463e2 Merge branch '2.7' into 2.8
* 2.7:
  [Form] fix Catchable Fatal Error if choices is not an array
  [Process] Fix a transient test
  [Process] Fix potential race condition leading to transient tests
  [Routing] removed unused variable in PhpMatcherDumperTest class.
  [travis] use github token to fetch deps from ZIP files
  [DependencyInjection] fixes typo in triggered deprecation notice.
  [Form] improve deprecation messages for the "empty_value" and "choice_list" options in the ChoiceType class.

Conflicts:
	src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php
2015-12-30 11:33:57 +01:00
Nicolas Grekas
2c2daf184c Merge branch '2.3' into 2.7
* 2.3:
  [Process] Fix potential race condition leading to transient tests
  [Routing] removed unused variable in PhpMatcherDumperTest class.
  [travis] use github token to fetch deps from ZIP files
2015-12-30 11:27:24 +01:00
Bernhard Schussek
a0ef1018d6 [Form] Improved performance of ChoiceType and its subtypes 2015-12-30 11:11:52 +01:00
Iltar van der Berg
43fd7bba44 Removed an object as route generator argument 2015-12-30 10:32:18 +01:00
Nicolas Grekas
9305aab3e0 minor #17176 [Process] Fix a transient test (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Process] Fix a transient test

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

Commits
-------

7e2c67c [Process] Fix a transient test
2015-12-30 10:15:14 +01:00
Nicolas Grekas
b78eab561e bug #17163 [Form] fix Catchable Fatal Error if choices is not an array (Gladhon, nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] fix Catchable Fatal Error if choices is not an array

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

Since 2.7.8 I got a BC-Break Error

Catchable Fatal Error: Argument 1 passed to Symfony\Component\Form\Extension\Core\Type\ChoiceType::normalizeLegacyChoices() must be of the type array, null given

normalizeLegacyChoices work only with array, so if choices not an array, just don't try to normlize.

Commits
-------

f3c2a9b [Form] fix Catchable Fatal Error if choices is not an array
2015-12-30 10:03:39 +01:00
Gladhon
f3c2a9beda [Form] fix Catchable Fatal Error if choices is not an array 2015-12-30 10:03:36 +01:00
Nicolas Grekas
7e2c67c9dc [Process] Fix a transient test 2015-12-30 09:47:47 +01:00
Nicolas Grekas
99fc428bdc [Process] Fix potential race condition leading to transient tests 2015-12-30 09:46:06 +01:00
Fabien Potencier
ddc508bbd4 bug #17152 [DoctrineBridge] [PropertyInfo] Catch Doctrine\ORM\Mapping\MappingException (dunglas)
This PR was squashed before being merged into the 2.8 branch (closes #17152).

Discussion
----------

[DoctrineBridge] [PropertyInfo] Catch Doctrine\ORM\Mapping\MappingException

| 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

Sometimes the Doctrine ORM `ClassMetadataFactory` throws a `Doctrine\Common\Persistence\Mapping\MappingException` exception, sometime a `Doctrine\ORM\Mapping\MappingException`.
This PR catch both.

Port of dunglas/php-property-info#10.

Commits
-------

ceded10 [DoctrineBridge] [PropertyInfo] Catch Doctrine\ORM\Mapping\MappingException
2015-12-29 19:38:50 +01:00
Kévin Dunglas
ceded10f67 [DoctrineBridge] [PropertyInfo] Catch Doctrine\ORM\Mapping\MappingException 2015-12-29 19:38:48 +01:00
Hugo Hamon
26d31eb9ac [Routing] removed unused variable in PhpMatcherDumperTest class. 2015-12-29 18:08:17 +01:00
Hugo Hamon
ba7213c280 [DependencyInjection] fixes typo in triggered deprecation notice. 2015-12-29 17:31:38 +01:00
Nicolas Grekas
d9467799c4 bug #17156 [HttpFoundation] add missing symfony/polyfill-php55 dependency (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[HttpFoundation] add missing symfony/polyfill-php55 dependency

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

The `json_last_error_msg()` function used in the `JsonResponse` class
requires PHP 5.5.

Commits
-------

3cc4e4d add missing symfony/polyfill-php55 dependency
2015-12-29 15:27:25 +01:00
Hugo Hamon
787853673b [Form] improve deprecation messages for the "empty_value" and "choice_list" options in the ChoiceType class. 2015-12-29 10:59:52 +01:00