Commit Graph

27202 Commits

Author SHA1 Message Date
Nicolas Grekas 0d9dacc6db [VarDumper] Fix extra whitespace 2016-09-20 15:04:49 +02:00
Fabien Potencier 826fc39dd2 Merge branch '2.8' into 3.1
* 2.8:
  [TwigBridge] removed Twig null nodes (deprecated as of Twig 1.25)
  [Console] Fix empty optionnal options with = separator in argv
2016-09-19 13:28:39 -07:00
Fabien Potencier 4d2cfd08fb Merge branch '2.7' into 2.8
* 2.7:
  [TwigBridge] removed Twig null nodes (deprecated as of Twig 1.25)
  [Console] Fix empty optionnal options with = separator in argv
2016-09-19 13:28:05 -07:00
Fabien Potencier 79e25a9848 bug #19983 [TwigBridge] removed Twig null nodes (deprecated as of Twig 1.25) (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBridge] removed Twig null nodes (deprecated as of Twig 1.25)

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes (more about removing deprecation notices from newer versions of Twig)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a (see twigphp/Twig#2123)
| License       | MIT
| Doc PR        | n/a

Commits
-------

12350c2 [TwigBridge] removed Twig null nodes (deprecated as of Twig 1.25)
2016-09-19 13:27:49 -07:00
Fabien Potencier 12350c2eb1 [TwigBridge] removed Twig null nodes (deprecated as of Twig 1.25) 2016-09-19 12:59:08 -07:00
Fabien Potencier 8b7c3d38b3 minor #19974 Make redis host configurable in tests (jakzal)
This PR was squashed before being merged into the 3.1 branch (closes #19974).

Discussion
----------

Make redis host configurable in tests

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

Makes running tests on dockerized environments possible, since we can now export the `REDIS_HOST` environment variable:

```
REDIS_HOST=redis ./phpunit src/Symfony/Component/Cache
```

If this gets merged, in master we can later replace the `SYMFONY__REDIS_HOST` usage in the FrameworkBundle with the new `env(REDIS_HOST)`.

Commits
-------

c87de00 Make redis host configurable in tests
2016-09-19 12:25:04 -07:00
Jakub Zalas c87de00e9a Make redis host configurable in tests 2016-09-19 12:25:01 -07:00
Robin Chalas eed3cc5b52
[Console] Escape default value and question in SymfonyStyle::ask() 2016-09-18 17:48:17 +02:00
Fabien Potencier 2d08be14f5 bug #19946 [Console] Fix parsing optionnal options with empty value in argv (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Fix parsing optionnal options with empty value in argv

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

If a command takes an option accepting an optional value, passing an empty value to this option will make it parsed as `null`, e.g:

`bin/console dummy --foo ""` gives `['foo' => null]`.
`bin/console dummy --foo=""` gives `['foo' => null]`.

Problems appear when adding an argument with a required value (let's call it `bar`):

`bin/console dummy --foo "" "bar-val"` gives `['foo' => null, 'bar' => 'bar-val']` which is OK.

But:

`bin/console dummy --foo="" "bar-val"`

>  [RuntimeException]
  Not enough arguments (missing: "bar").

The empty value is never considered, as `$argv` just return `"--foo="` for the option, the current implementation doesn't handle the empty value when using an equal as separator, so the `bar` argument value is considered  as the `foo` one, giving a missing required argument at runtime.

This fixes it by explicitly considering the empty value if there is nothing immediately after the equal sign, so args/options correctly take their respective values.

Commits
-------

8952155 [Console] Fix empty optionnal options with = separator in argv
2016-09-17 09:41:34 -07:00
Robin Chalas 8952155f92
[Console] Fix empty optionnal options with = separator in argv 2016-09-17 14:42:06 +02:00
Roland Franssen e0e5f0c379 apply rtrim 2016-09-16 16:53:37 +00:00
Fabien Potencier ad7bc0322a Merge branch '2.8' into 3.1
* 2.8:
  added a comment about a workaround
  [Finder] no PHP warning on empty directory iteration
  fixed CS
2016-09-14 15:47:38 -07:00
Fabien Potencier 0ae3838dc6 Merge branch '2.7' into 2.8
* 2.7:
  added a comment about a workaround
  [Finder] no PHP warning on empty directory iteration
  fixed CS
2016-09-14 15:47:13 -07:00
Fabien Potencier b28cd81575 added a comment about a workaround 2016-09-14 14:04:40 -07:00
Fabien Potencier 23cae581b8 bug #19636 [Finder] no PHP warning on empty directory iteration (ggottwald)
This PR was squashed before being merged into the 2.7 branch (closes #19636).

Discussion
----------

[Finder] no PHP warning on empty directory iteration

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | Since RecursiveDirectoryIterator::SKIP_DOTS is set as flag, opendir gets a warning if an empty directory is reached

Commits
-------

695e341 [Finder] no PHP warning on empty directory iteration
2016-09-14 14:03:47 -07:00
Götz Gottwald 695e341258 [Finder] no PHP warning on empty directory iteration 2016-09-14 14:03:47 -07:00
Fabien Potencier 3a4eaf968b bug #19784 [HttpKernel] Fixed the nullable support for php 7.1 and below (iltar)
This PR was squashed before being merged into the 3.1 branch (closes #19784).

Discussion
----------

[HttpKernel] Fixed the nullable support for php 7.1 and below

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

This PR gives support for for the new php 7.1 and will only work in beta3 or higher. I've had to backport the support to 3.1 because I consider this a bug that it won't work, even though 3.1 won't be supported for much longer. ~~The deprecation I've added in the `ArgumentMetadata` should not be triggered as all framework cases create it with the argument. Just for developers who for some reason implemented this manually, I've added the deprecation.~~

~~*If needed, I can re-open this against 3.2 and leave 3.1  "broken"*~~

On 7.1 lower than beta3 this will happen but shouldn't affect any higher versions (I hope).
```
There was 1 failure:

1) Symfony\Component\HttpKernel\Tests\ControllerMetadata\ArgumentMetadataFactoryTest::testNullableTypesSignature
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
     0 => Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata Object (...)
     1 => Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata Object (
         'name' => 'bar'
-        'type' => 'stdClass'
+        'type' => 'Symfony\Component\HttpKernel\Tests\Fixtures\Controller\stdClass'
         'isVariadic' => false
         'hasDefaultValue' => false
         'defaultValue' => null
         'isNullable' => true
     )
     2 => Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata Object (...)
 )

/home/ivanderberg/projects/symfony/src/Symfony/Component/HttpKernel/Tests/ControllerMetadata/ArgumentMetadataFactoryTest.php:123
```

Commits
-------

4a1ab6d [HttpKernel] Fixed the nullable support for php 7.1 and below
2016-09-14 13:38:12 -07:00
Iltar van der Berg 4a1ab6dcd5 [HttpKernel] Fixed the nullable support for php 7.1 and below 2016-09-14 13:37:40 -07:00
Fabien Potencier 81e9713c80 fixed CS 2016-09-14 13:34:59 -07:00
Fabien Potencier 0d5dbb75ee Merge branch '2.8' into 3.1
* 2.8:
  [Form] Fix typo in doc comment
  [Config] Handle open_basedir restrictions in FileLocator
  [bugfix] [Console] Set `Input::$interactive` to `false` when command is executed with `--quiet` as verbosity level
  Use JSON_UNESCAPED_SLASHES for lint commands output
  Fixed collapsed ChoiceType options attributes
  Fixed the nullable support for php 7.1 and below
2016-09-14 13:33:02 -07:00
Fabien Potencier be3a827ef1 Merge branch '2.7' into 2.8
* 2.7:
  [Form] Fix typo in doc comment
  [Config] Handle open_basedir restrictions in FileLocator
  [bugfix] [Console] Set `Input::$interactive` to `false` when command is executed with `--quiet` as verbosity level
  Use JSON_UNESCAPED_SLASHES for lint commands output
  Fixed collapsed ChoiceType options attributes
  Fixed the nullable support for php 7.1 and below
2016-09-14 13:31:12 -07:00
Fabien Potencier c1cc6ca40e bug #19923 [bugfix] [Console] Set `Input::$interactive` to `false` when command is executed with `--quiet` as verbosity level (phansys)
This PR was merged into the 2.7 branch.

Discussion
----------

[bugfix] [Console] Set `Input::$interactive` to `false` when command is executed with `--quiet` as verbosity level

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

Closes #19899.

Commits
-------

4214311 [bugfix] [Console] Set `Input::$interactive` to `false` when command is executed with `--quiet` as verbosity level
2016-09-14 13:28:32 -07:00
Fabien Potencier ce73768d0f bug #19811 Fixed the nullable support for php 7.1 and below (2.7, 2.8, 3.0) (iltar)
This PR was merged into the 2.7 branch.

Discussion
----------

Fixed the nullable support for php 7.1 and below (2.7, 2.8, 3.0)

| Q             | A
| ------------- | ---
| Branch?       | 2.7, 2.8, 3.0
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/19784#issuecomment-243852825
| License       | MIT
| Doc PR        | ~

Fixes the nullable support for 2.7, 2.8 and 3.0, can probably be partially merged into 3.1 but not 100% sure.

/ping @fabpot

Commits
-------

9c48756 Fixed the nullable support for php 7.1 and below
2016-09-14 12:08:00 -07:00
Nicolas Grekas bc850b60dd minor #19934 [Form] Fix typo in doc comment (fbourigault)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fix typo in doc comment

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

Commits
-------

82415a1 [Form] Fix typo in doc comment
2016-09-14 10:11:47 +02:00
Fabien Bourigault 82415a1667 [Form] Fix typo in doc comment 2016-09-14 09:33:27 +02:00
Nicolas Grekas 156269d1e0 Merge branch '2.8' into 3.1
* 2.8:
  Fix version constraint
  Fixed bad merge
  [DoctrineBridge][PropertyInfo] Treat Doctrine decimal type as string
  Make ReflectionExtractor compatible with ReflectionType changes in PHP 7.1
2016-09-14 08:13:19 +02:00
Nicolas Grekas c555d64390 Fix version constraint 2016-09-14 08:12:49 +02:00
Fabien Potencier 3d0d709d84 bug #19853 [PropertyInfo] Make ReflectionExtractor compatible with ReflectionType changes in PHP 7.1 (teohhanhui)
This PR was merged into the 2.8 branch.

Discussion
----------

[PropertyInfo] Make ReflectionExtractor compatible with ReflectionType changes in PHP 7.1

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/19677#issuecomment-244671828
| License       | MIT
| Doc PR        | N/A

Commits
-------

4a041e9 Make ReflectionExtractor compatible with ReflectionType changes in PHP 7.1
2016-09-13 17:30:09 -07:00
Fabien Potencier 26e2846c8a bug #19904 [Form] Fixed collapsed ChoiceType options attributes (HeahDude)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fixed collapsed ChoiceType options attributes

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

Commits
-------

7806e2a Fixed collapsed ChoiceType options attributes
2016-09-13 17:22:22 -07:00
Fabien Potencier da565de0af bug #19872 [Filesystem] Consider the umask setting when dumping a file (leofeyer)
This PR was merged into the 3.1 branch.

Discussion
----------

[Filesystem] Consider the umask setting when dumping a file

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

`Filesystem::dumpFile()` does not consider the umask setting and thus creates files with write permissions for everyone (`0666`). Other `chmod()` calls in Symfony do consider the umask setting (see e.g. [here](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/File/File.php#L101) or [here](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/File/UploadedFile.php#L230)), therefore I have adjusted the `dumpFile()` method accordingly.

Commits
-------

fdd266f Consider the umask setting when dumping a file.
2016-09-13 17:18:46 -07:00
Fabien Potencier 354e8fdc2d bug #19908 [Config] Handle open_basedir restrictions in FileLocator (Nicofuma)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #19908).

Discussion
----------

[Config] Handle open_basedir restrictions in FileLocator

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

Commits
-------

e870819 [Config] Handle open_basedir restrictions in FileLocator
2016-09-13 17:08:34 -07:00
Tristan Darricau e8708195e2 [Config] Handle open_basedir restrictions in FileLocator
Silence `file_exists()` call to avoid open_basedir restrictions warning. (can happen when using relative imports)
2016-09-13 17:08:34 -07:00
Fabien Potencier c2b660dc60 bug #19893 [FrameworkBundle] Remove cache clearer default value in config (nicolas-grekas)
This PR was merged into the 3.1 branch.

Discussion
----------

[FrameworkBundle] Remove cache clearer default value in config

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | yes
| Tests pass?   | yes
| License       | MIT

`cache.default_clearer` is already the default behavior (tested), but duplicating this in the configuration prevents inheriting the `clearer` setting when configuring child pools.

Commits
-------

193542f [FrameworkBundle] Remove cache clearer default value in config
2016-09-13 17:01:35 -07:00
Fabien Potencier 18a24fff0a bug #19924 [DoctrineBridge][PropertyInfo] Treat Doctrine decimal type as string (teohhanhui)
This PR was merged into the 2.8 branch.

Discussion
----------

[DoctrineBridge][PropertyInfo] Treat Doctrine decimal type as string

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

Using `float` for decimal type defeats the purpose of avoiding rounding errors / loss of precision.

See http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/types.html#decimal

Commits
-------

62d28f9 [DoctrineBridge][PropertyInfo] Treat Doctrine decimal type as string
2016-09-13 16:52:44 -07:00
Fabien Potencier 0c927d74d4 bug #19932 Fixed bad merge (GrahamCampbell)
This PR was submitted for the 3.1 branch but it was merged into the 2.8 branch instead (closes #19932).

Discussion
----------

Fixed bad merge

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

Commits
-------

d30374d Fixed bad merge
2016-09-13 16:47:15 -07:00
Graham Campbell d30374d7eb Fixed bad merge 2016-09-13 16:47:15 -07:00
Fabien Potencier 946b96b70d bug #19922 [Yaml][TwigBridge] Use JSON_UNESCAPED_SLASHES for lint commands output (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[Yaml][TwigBridge] Use JSON_UNESCAPED_SLASHES for lint commands output

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

Slashes are escaped when sing the `lint:twig` and `lint:yaml` commands with the `format` option set to `json`, giving such results:

```json
[
    {
        "file": "yaml\/wrong\/1.yml",
        "valid": false,
        "message": "Unable to parse at line 1 (near \";:cc`\")."
    }
]
```

That's not convenient as file paths may be reused (e.g. copy-pasted).
Results stay fine as error messages are already escaped:

```json
[
    {
        "file": "yaml/wrong/1.yml",
        "valid": false,
        "message": "Unable to parse at line 1 (near \";:cc`\")."
    }
]
```

Commits
-------

0427594 Use JSON_UNESCAPED_SLASHES for lint commands output
2016-09-13 16:35:36 -07:00
Nicolas Grekas 476dadcfa1 Merge branch '2.8' into 3.1
* 2.8:
  [ci] Fix build-packages.php
  [Validator] Update IpValidatorTest data set with a valid reserved IP
2016-09-13 13:54:29 +02:00
Nicolas Grekas fc97aa5e3b Merge branch '2.7' into 2.8
* 2.7:
  [ci] Fix build-packages.php
  [Validator] Update IpValidatorTest data set with a valid reserved IP
2016-09-13 13:53:53 +02:00
Nicolas Grekas f32198954d bug #19928 [Validator] Update IpValidatorTest data set with a valid reserved IP (jakzal)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] Update IpValidatorTest data set with a valid reserved IP

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

The validator uses PHP filter which was recently fixed (see https://bugs.php.net/bug.php?id=72972).

Commits
-------

86a151c [Validator] Update IpValidatorTest data set with a valid reserved IP
2016-09-13 13:51:44 +02:00
Nicolas Grekas 68b8dab5aa minor #19929 [ci] Fix build-packages.php (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[ci] Fix build-packages.php

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Tests pass?   | yes
| License       | MIT

Already validated in #19927

Commits
-------

221e21c [ci] Fix build-packages.php
2016-09-13 13:48:59 +02:00
Nicolas Grekas 221e21cf40 [ci] Fix build-packages.php 2016-09-13 13:44:15 +02:00
Jakub Zalas 86a151c9f5 [Validator] Update IpValidatorTest data set with a valid reserved IP
The validator uses PHP filter which was recently fixed (see https://bugs.php.net/bug.php?id=72972).
2016-09-13 12:11:56 +01:00
Teoh Han Hui 62d28f9204
[DoctrineBridge][PropertyInfo] Treat Doctrine decimal type as string 2016-09-13 16:50:50 +08:00
Javier Spagnoletti 4214311a1c [bugfix] [Console] Set `Input::$interactive` to `false` when command is executed with `--quiet` as verbosity level 2016-09-13 00:14:14 -03:00
Robin Chalas 04275945ef
Use JSON_UNESCAPED_SLASHES for lint commands output 2016-09-12 23:15:58 +02:00
Fabien Potencier fad40286ee Merge branch '2.8' into 3.1
* 2.8:
  [travis/appveyor] Wire simple-phpunit
  [Console] fixed PHP7 Errors are now handled and converted to Exceptions
  Fix #19721
  Fix translation:update command count
  bumped Symfony version to 2.8.12
  updated VERSION for 2.8.11
  updated CHANGELOG for 2.8.11
  bumped Symfony version to 2.7.19
  updated VERSION for 2.7.18
  update CONTRIBUTORS for 2.7.18
  updated CHANGELOG for 2.7.18
  [Security] Optimize RoleHierarchy's buildRoleMap method
2016-09-12 11:17:37 -07:00
Fabien Potencier 1e91ed7783 Merge branch '2.7' into 2.8
* 2.7:
  [travis/appveyor] Wire simple-phpunit
  [Console] fixed PHP7 Errors are now handled and converted to Exceptions
  Fix #19721
  bumped Symfony version to 2.7.19
  updated VERSION for 2.7.18
  update CONTRIBUTORS for 2.7.18
  updated CHANGELOG for 2.7.18
  [Security] Optimize RoleHierarchy's buildRoleMap method
2016-09-12 11:14:50 -07:00
Fabien Potencier 2a9be06bc8 minor #19917 [travis/appveyor] Wire simple-phpunit (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[travis/appveyor] Wire simple-phpunit

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| Tests pass?   | yes
| License       | MIT

Commits
-------

9eb8524 [travis/appveyor] Wire simple-phpunit
2016-09-12 11:10:35 -07:00
Nicolas Grekas 9eb8524d18 [travis/appveyor] Wire simple-phpunit 2016-09-12 17:58:10 +02:00